<snip>
Quote:
1. It's Safari 3.2.1
2. My program is rendering HTML and javascript on the server. Sometimes it
renders 'element' and sometimes it doesn't. document.getElementById works
properly in Safari when 'element' is there, so I know the browser supports
the function. When 'element' is not there it's as if Safari never returns
from the function instead of returns null. |
1) Is the id always unique when it occurs?
2) Did you try renaming "element" to something less 'dangerous'
sounding? These pages recommends against using "element":
http://www.javascripter.net/faq/reserved.htm http://www.felgall.com/jsref1.htm http://www.quackit.com/javascript/ja...rved_words.cfm
3) What does this code do?
function findid(id){
var unique_element = document.getElementById(id);
if (unique_element == null){
alert('Unknown section id: "' + id + '"');
}else{
alert('An element with the id: "' + id + '" was Found!'
}
}
Mike