PDA

View Full Version : who knows javascript?!



tehphp
02 Apr 2009, 05:07 PM
Hello... I am having trouble with something to do with iFrames and javascript! I am totally stumped on it...and i must finish it!!! :splat::splat:
So, once upon a time... I have an iFrame...



<iframe src="http://127.0.0.1/test.html">

And...I have a javascript function that detects if the `src` has changed of that iframe. All good? No!! When i change the `src` outside the iframe, it works and shows the message I want. But, when i change the url INSIDE the iframe, nothing happens. It's almost like...it doesn't change the src of the iFrame. Please help!

baniyagiri
07 Apr 2009, 12:04 PM
Once you have a JavaScript file, you simply need to refer to it in your HTML document. Use this tag:

<SCRIPT LANGUAGE="JavaScript" SRC="filename">
</SCRIPT>

If your script simply defines functions, you can place these tags in the <HEAD> section of the document; otherwise place it where its output should go. The closing </SCRIPT> tag is required, and you should not use JavaScript commands between the tags.