Jump to content


Photo

document.all in Safari


  • Please log in to reply
1 reply to this topic

#1 jenni_fur

jenni_fur
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 23 May 2006 - 03:38 PM

Hey

I have used the document.all function as part of an image gallery i am developing. Althought it works fine in IE and Mozilla, i have discovered it is not supported by Safar. What is the best method to correct this problem. Here is my code, I'm a javascript newbie...so i basically don't have a clue what to do.

As you can see it is combined with PHP so ignore all the extra slashes, i pretty much just want to fix it for Safari

"<a href ='#' onClick=";
"\"document.the_image.src=";
"'$large_dir$photos_large[$i]' ; document.all.ref.innerHTML='Ref: $photos_large[$i]'";
"\">";


<div id = \"ref\">Ref: $photos_large[1]</div>";

#2 nogray

nogray
  • Members
  • PipPipPip
  • Advanced Member
  • 930 posts
  • LocationSan Francisco CA

Posted 25 May 2006 - 12:39 AM

use document.getElementById('ref id here').innerHTML this should work in everything. (given that ref have an id).

NoGray.com





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users