Hi everybody,
I've Googled some hours now to find a solution, but I'm really stuck.
This is my situation:
I have a <div id='content'> where the content is loaded with Ajax, and some buttons outside the div. Everything works perfect.
At some time I'm loading an <iframe id='frame'> in the content-div. The iframe has a php as source wich creates a form, and loads form.js
Then from outside the content-div I execute window.form1_frame.nws_check(210,y); to call the function nws_check in form.js to check and post the form. If everything is processed, I kill the iframe with document.getElementById('content').innerHTML="" and re-use the content-div for other content.
Everything is working fine untill I create <iframe id='frame'> for a second time.
In IE7 it works perfect, calls the functions again and so on...
but in Firefox (3.0.13) I get an error:
window.form1_frame.nws_check is not a function
when I check what js is loaded when the Iframe is killed, there is no form.js
and when I load the iframe the second time, form.js is there.
when I test in form.js with if(typeof nws_check == 'function') {alert("I'm here")}
it fires the alert, so the function is there, in the same iframe as the first time, in the same div.
But still I get the error.
Any solutions?
Regards, Michel