|
| |
|
|
rubyaim
Posts: 757 Joined: 6/22/2005 Status: offline
|
Javascript Random Images - 8/25/2005 0:38:55
Hello, I was wondering if using Javascript for random images would effect accessibility at all? Basically all I want to do is swap images on page load (the images are only for 'pretty' and not for content). Have read through Creating Accessible JavaScript and think it will be okay if I use alt="", but am not 100% sure. Have found some articles on doing this without Javascript, but they all use server side scripting and I'd rather keep this as html. Thanks for any advice Sally
|
|
|
|
Tailslide
Posts: 6046 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: Javascript Random Images - 8/25/2005 3:19:12
Hi Sally As long as it's "just for pretty" stuff I'd say you're ok. I'd use the alt="" for images that that are structural for instance lines or bullets or for something that would generally be more confusing and annoying than enlightening for someone using a text reader. I tend to include structural images in the CSS and they don't have any sort of Alt tag so I guess you're effectively doing the same thing. I've no idea what Alt="" will do to your validation if you do that though!
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
Tailslide
Posts: 6046 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: Javascript Random Images - 8/26/2005 3:03:09
Sally What exactly is it falling down on because I've got this sort of thing to work in the past at xhtml 1.0 strict? I find that commenting the script out like this helps too (sorry if you're already doing it!): <script type="text/javascript">
//<![CDATA[
document.write('blah blah')
//]]>
</script> Or if it's still causing you problems then can you remove the script itself to an external .js file?
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
khai87
Posts: 15 Joined: 10/14/2005 From: Singapore Status: offline
|
RE: Javascript Random Images - 10/14/2005 21:13:37
Hey there, I just wanna know, if i want to include the the image and the links plus the text on that random image. How would the code be cos i know rank image plus link only, its like this images[3] = "<a href = 'http://www.computerhope.com/history/newslet.htm'><img src='http://www.computerhope.com/banners/banner5.gif' alt='Computer Hope Newsletter'></a>"; i hope that you guys can help me on how to include the text after that random image and link.
|
|
|
|
rubyaim
Posts: 757 Joined: 6/22/2005 Status: offline
|
RE: Javascript Random Images - 10/16/2005 19:12:26
Hi, you should be able to include your text along with the image path and link like:
image[1]= "<a href=\"http://www.computerhope.com/history/newslet.htm\"> <img src=\"http://www.computerhope.com/banners/banner5.gif\" alt=\"Computer Hope Newsletter\"></a> <p>Here is some text.</p>";
Is that what you are after?
_____________________________
Sally
|
|
|
|
khai87
Posts: 15 Joined: 10/14/2005 From: Singapore Status: offline
|
RE: Javascript Random Images - 10/17/2005 6:47:34
Alright, yeay. Thanks a million. I appreciate it!
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|