So it works good now? Thats great!
So it works good now? Thats great!
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
Yes, that's the best way. If you call an iframe by its id in Firefox and most browsers you can access its src and other attributes of it as an element on the page. But if you want to access its properties as a window, like location, or its contained document, anything that relates to it as a window, you need to reference it as a frame. It's frames[#] is the best way to do that. Another alternative to do so is by name, ex:
HTML Code:<iframe name="whatever" . . .But that isn't as reliable as by its number because the name has to be unique, whereas the number (which relates to which frame starting at 0 that it is on the page/in the window), will always be unique.Code:window.frames.whatever.loadP3d(source);
An additional issue with names is that sometimes they can be confused with other things (like variables, functions, classes, or id's) in the document or window. And even when they are not, may not work anyway. So, when accessing the iframe as a window, the number is almost always the way to go.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Well not exactly, you have:
for:Code:<iframeid="pandaFrame"frameborder="0" vspace="0" hspace="0" marginwidth="0" marginheight="0" width="680" scrolling="no" height="480" src="p3dwrapper.html"> </iframe>
to have any chance of working, it needs to be the name of the frame:Code:window.frames.pandaFrame
But as you see, the number works. And as I say, the number is the best method. Sometimes it isn't possible to use the number though.Code:<iframename="pandaFrame"frameborder="0" vspace="0" hspace="0" marginwidth="0" marginheight="0" width="680" scrolling="no" height="480" src="p3dwrapper.html"> </iframe>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks