IxxI
06-05-2003, 04:52 AM
I'm trying to check for a div in my main frame and to do this I'm using if (main.document.getElementById("sub3")) {some stuff} else {do nothing}. But it doesn't seem to be working, what am I doing wrong??
IxxI
IxxI
|
Click to See Complete Forum and Search --> : check for div IxxI 06-05-2003, 04:52 AM I'm trying to check for a div in my main frame and to do this I'm using if (main.document.getElementById("sub3")) {some stuff} else {do nothing}. But it doesn't seem to be working, what am I doing wrong?? IxxI IxxI 06-05-2003, 09:17 AM Sorry, forgot to say that although the element I'm looking for is in my main frame the javascript is in the index page - so it shouldn't matter. However I've tried all of those and none seem to work. Any other suggestions?? IxxI IxxI 06-06-2003, 02:42 AM In my index page (the one that contains my framesets) I have a javascript file, functions of which are called when I move my mouse over an object in the navigation frame. What I want to do is check to see if in my main frame (the one that contains my contents) there is an element called sub3, and if there is move it and if not do nothing. On some computers the code I posted seems to be working but on others it doesn't work, and I'm trying to work out why... IxxI IxxI 06-06-2003, 04:24 PM Yeah, I don't know what was stopping it working - I used that code when you gave it to me first, but it gave me errors. Must have been doing something horribly wrong though, cos I've been modifying the rest of the code and it now works. Sorry to have wasted your time Dave... IxxI webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |