Aussie Bloggers Forum
Welcome,
Guest
. Please
login
or
register
.
March 19, 2010, 03:52:55 pm
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Visit the Aussie Bloggers Blog
Search:
Advanced search
45953
Posts in
3789
Topics by
1206
Members Latest Member:
-
Ben-123
Most online today:
13
- most online ever:
275
(December 30, 2007, 07:51:23 pm)
Forum Rules
Forum Rules
Recent Posts
Why Did I Buy That...
by
California Girl
[October 06, 2009, 10:10:11 am]
My Passion...
by
California Girl
[October 06, 2009, 10:05:49 am]
Blog competitions
by
benny
[October 06, 2009, 04:00:34 am]
how do I stop this?
by
CrystalsQuest
[October 04, 2009, 03:32:49 am]
How can I make a pdf file...
by
SnakyPoet
[October 01, 2009, 07:15:38 am]
Very Cool Software for se...
by
squadron
[September 29, 2009, 03:55:23 pm]
Yum Cha - Favs?
by
Tamsyn
[September 29, 2009, 03:54:31 pm]
Favourite Ice-Cream
by
Tamsyn
[September 29, 2009, 03:53:26 pm]
Themes
Helios_Multi TP
oxygen11final
Stats
Members
Total Members: 1206
Latest:
Ben-123
Stats
Total Posts: 45953
Total Topics: 3789
Online Today: 13
Online Ever: 275
(December 30, 2007, 07:51:23 pm)
Users Online
Users: 0
Guests: 11
Total: 11
Visit the Aussie Bloggers Blog
Aussie Bloggers Forum
Forum
Archive
Blogging in General
CSS and function()
Pages: [
1
]
« previous
next »
Author
Topic: CSS and function() (Read 1419 times)
maccasenior
Fair Dinkum
Posts: 28
Gidday!
CSS and function()
«
on:
August 15, 2008, 06:47:51 am »
Hi! Thanking anyone for a reply. Blog - Blogger Blog, IE7. I'm just starting to learn about CSS and would like to know:
Q. Can I run a function eg. function gotoshow () within a blogger blog or do I have to have a self hosted site for this?
Regards
Peter
Logged
~ Peter McCartney - St Vincent's Hospital Darlinghurst - Male Nurses ~
"Life is like a suppository. You always know you’re gonna get in the end."
goatlady
Administrator
Deadset Legend
Posts: 817
\m/
Re: CSS and function()
«
Reply #1 on:
August 15, 2008, 07:43:49 am »
Hey Peter,
CSS is not a scripting language, it's a markup language - it doesn't have things like variables and functions.
Are you perhaps thinking of JavaScript or PHP?
If it's JavaScript, I believe you can run anything you like on a Blogger blog. But if you mean PHP, then you do need to be self-hosted.
Hope that helps!
Logged
the goatlady
aka
clever starfish
kay smoljak
Hell Bent for Wacken
maccasenior
Fair Dinkum
Posts: 28
Gidday!
Re: CSS and function()
«
Reply #2 on:
August 15, 2008, 07:54:17 am »
Hi goatlady and thank you. This example at:
http://www.dynamicdrive.com/dynamicindex14/image4.htm
is what I've tried to put into my blog. All works well except for the links for each image. An error comes up with the function gotoshow(). I'm guessing I need to be self hosted. The link to the image was a workaround but not satisfactory.
Regards,
Peter
«
Last Edit: August 15, 2008, 07:55:52 am by maccasenior
»
Logged
~ Peter McCartney - St Vincent's Hospital Darlinghurst - Male Nurses ~
"Life is like a suppository. You always know you’re gonna get in the end."
macgirvin
Top Sort
Posts: 217
Matrix Mangler
Re: CSS and function()
«
Reply #3 on:
August 15, 2008, 08:58:02 am »
There are a couple of gotchas. First the 'filter:' CSS construct is only available on IE and I don't think there are any plans to support it in FF.
But even if this was OK with you, you may run into a problem using Javascript functions from CSS on blogger (or any community site). It all depends on how strict their XSS filtering is - but some of the most infamous hacker attacks of the last few years have been accomplished through embedded javascript in style sheets.
Blogger/Google will have to have a filter to trap badness. I don't know what they allow and what they don't but it is customary in the industry to disallow any attempts at code execution in style information. Most other community sites disallow javascript (and CSS) altogether because there are only about a half million ways to exploit it and steal another person's session.
Google has the resources to parse the entire CSS, check all these half a million different exploits and make a decision about whether or not there's evil code in it. But evil XSS code almost always contains either "javascript:" or "filter:" - so your CSS is going to be highly scrutinized and quite possibly changed when you submit it.
Logged
Electronic Communications Technologist
Mike Macgirvin -
Macgirvin.com
Need a name? -
NameThingy.com
Code is not poetry. Get over it.
goatlady
Administrator
Deadset Legend
Posts: 817
\m/
Re: CSS and function()
«
Reply #4 on:
August 15, 2008, 09:15:36 am »
Quote from: maccasenior on August 15, 2008, 07:54:17 am
Hi goatlady and thank you. This example at:
http://www.dynamicdrive.com/dynamicindex14/image4.htm
Ahh, that explains it. Like macgirvin explained, that's actually using JavaScript functions within the CSS and it's IE only. I would avoid hacks like this like the plague - they are very difficult to get right and then will only show for a section of your audience anyway.
Logged
the goatlady
aka
clever starfish
kay smoljak
Hell Bent for Wacken
maccasenior
Fair Dinkum
Posts: 28
Gidday!
Re: CSS and function()
«
Reply #5 on:
August 15, 2008, 10:57:14 am »
Hi Macgirvin and Goatlady. Thank you so much for the detailed advise you have given me. It is greatly appreciated.
To Macgirvin: What you have explained to me is pretty hair-raising. I had no idea. From the link I supplied I was able to get the effect I wanted in my blogger blog, except for the links to each changing image. My post was published before I sought this advise. Looking at your advise now, I'm glad the function () didn't work. To date, one person with FireFox has been able to see the effect. As it works for me, I imagine it will work for those with IE. I'm now wondering whether I should delete the post! Thanking you again - Peter.
To Goatlady: Coming from that site, I didn't consider it a hack. I will certainly take your advise on board re future posts.
To both of you again, thank you - take care - Peter
Logged
~ Peter McCartney - St Vincent's Hospital Darlinghurst - Male Nurses ~
"Life is like a suppository. You always know you’re gonna get in the end."
goatlady
Administrator
Deadset Legend
Posts: 817
\m/
Re: CSS and function()
«
Reply #6 on:
August 15, 2008, 11:04:45 am »
Quote from: maccasenior on August 15, 2008, 10:57:14 am
To Goatlady: Coming from that site, I didn't consider it a hack. I will certainly take your advise on board re future posts.
heh - well, a Microsoft-sanctioned hack. But as far as I'm concerned, a hack nonetheless
Logged
the goatlady
aka
clever starfish
kay smoljak
Hell Bent for Wacken
maccasenior
Fair Dinkum
Posts: 28
Gidday!
Re: CSS and function()
«
Reply #7 on:
August 15, 2008, 12:13:47 pm »
Hi Goatlady. Please excuse my ignorance. In my endeaavour to learn more, "What is the difference between a hack and accepted code?"
I'm confused as I can see that I'm allowed to enter HTML/Javascript within my blogger blog.
Regards,
Peter
Logged
~ Peter McCartney - St Vincent's Hospital Darlinghurst - Male Nurses ~
"Life is like a suppository. You always know you’re gonna get in the end."
macgirvin
Top Sort
Posts: 217
Matrix Mangler
Re: CSS and function()
«
Reply #8 on:
August 15, 2008, 12:33:25 pm »
I've had a closer look at the source and it appears that the "filter:" only adds a cross-fade between images, and is only enabled for IE. So FF users still see the image rotation, just without a cross-fade.
As for the links - I see that the javascript for gotoshow() isn't even there, but slideit() is. If you indeed uploaded it correctly, you might try again and do a view of the page source to see if it survived intact. My guess is that the gotoshow() function may have gotten filtered out as possibly malicious, either that or you somehow missed pasting it in.
You don't need to remove anything. You aren't doing anything wrong. I'm just alerting you that people do, and sites usually take (undocumented) steps to counteract these things that may affect what you're trying to do.
On most any other multi-user site you wouldn't be able to get the word javascript: into a tag at all. I'm actually impressed that Google is able to allow it.
Logged
Electronic Communications Technologist
Mike Macgirvin -
Macgirvin.com
Need a name? -
NameThingy.com
Code is not poetry. Get over it.
goatlady
Administrator
Deadset Legend
Posts: 817
\m/
Re: CSS and function()
«
Reply #9 on:
August 15, 2008, 12:54:39 pm »
Quote from: maccasenior on August 15, 2008, 12:13:47 pm
Hi Goatlady. Please excuse my ignorance. In my endeaavour to learn more, "What is the difference between a hack and accepted code?"
I'm confused as I can see that I'm allowed to enter HTML/Javascript within my blogger blog.
Sorry maccasenior - I'm a web developer by trade and guilty of talking jargon at times. Bad goatlady!
Technically speaking, I consider any code that is not included in the
W3C's Specifications
to be a "hack". This includes pretty much anything that will only work in one browser (typically it's Microsoft that have done this in the past). However, unless you're a web developer there's no way you can be expected to know that, so don't worry about it!
If you need any more help, we're here...
Logged
the goatlady
aka
clever starfish
kay smoljak
Hell Bent for Wacken
maccasenior
Fair Dinkum
Posts: 28
Gidday!
Re: CSS and function()
«
Reply #10 on:
August 15, 2008, 01:01:16 pm »
Hi Macgirvin. Yes, that's correct, gotoshow() is not there. As that part failed to work after publishing, I removed it and republished again. Thanks heaps for looking into this for me. Take Care - Peter
Logged
~ Peter McCartney - St Vincent's Hospital Darlinghurst - Male Nurses ~
"Life is like a suppository. You always know you’re gonna get in the end."
maccasenior
Fair Dinkum
Posts: 28
Gidday!
Re: CSS and function()
«
Reply #11 on:
August 15, 2008, 01:07:09 pm »
No need to apologise Goatlady. I've learnt heaps from you and Macgirvin. Take care - Peter
Logged
~ Peter McCartney - St Vincent's Hospital Darlinghurst - Male Nurses ~
"Life is like a suppository. You always know you’re gonna get in the end."
Pages: [
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Announcements
-----------------------------
=> Forum Guidelines
===> Forum & Blog News
===> Forum How To Guides
===> Technical Glitches
-----------------------------
Coffee Lounge
-----------------------------
=> Introduce Yourself
=> Kaos And Mayhem
-----------------------------
Technical Assistance & Blogging Discussion
-----------------------------
=> Blogging In General
=> Pimp Your Blog
=> Wordpress
=> Google Blogger & Blogspot
=> Other Blog Platforms
=> Social Media
=> Tools & Resources
=> Blog Post Suggestions and Requests
-----------------------------
Thorny Blog Issues
-----------------------------
=> Ways To Promote Your Blog
=> Ways To Monetize Your Blog
-----------------------------
Archive
-----------------------------
=> Tools and Resources
=> Ways to Promote Your Blog
=> Introduce Yourself
=> Blogging in General
=> Kaos and Mayhem
=> Wordpress
=> Forum Archive
Show unread posts since last visit
Visit the Lazy Bloggers Post Generator
- Our present to you.
Happy Birthday To Aussie Bloggers Forums!
Visit the Lazy Journalists Plane Story Generator
- Another present to you.
Enjoy!