Hi
I'm trying to load a form into a div (that's hidden and then set to visible) = the form gets a page and stores it inside.
I activate it by pressing a button.
Then the div will fill in some values in the form elements that it has.
however this doesn't work.
the page is loaded but document.getEle mentById doesn't find it. When I look in
the HTML it's all there.
I'm trying to load a form into a div (that's hidden and then set to visible) = the form gets a page and stores it inside.
I activate it by pressing a button.
Then the div will fill in some values in the form elements that it has.
however this doesn't work.
the page is loaded but document.getEle mentById doesn't find it. When I look in
the HTML it's all there.
Code:
var moth = document.getElementById("sk_p");
if(moth== null)
{
alert(moth);
}
var intothis = doc.getElementById("sk");
if(intothis == null)
{
alert(intothis)
}
//null without ff or no alert in the beginning
for(i=0; i<moth.options.length; i++)
{
var newopt = document.createElement("OPTION");
newopt.value = moth.options[i].value;
newopt.text = moth.options[i].text;
intothis.options.add(newopt);
}
//providity etc
var prov = document.getElementById("provide")
if(prov!= null)
{
prov.checked = document.getElementById("provide").checked;
}
Comment