Click to See Complete Forum and Search --> : Defaut value in <input type = "number"


notageek
11-27-2005, 03:33 PM
In my multi-frame html document I defined a java-script variable a1 in frame[0]. I want this variable to be loaded in frames[1] as the 'value' in:
<input type = "number" ...
I can't use a static assignment, e.g.:
Value = 5
because the value to be loaded changes.

I tried:
VALUE=top.frames[0].a1
and
VALUE=eval(top.frames[0].a1)

I can't make 'onload' running either.
Help please...

Fang
11-28-2005, 01:31 AM
In the child frame:onload=function() {
document.getElementById(anID).value=top.a1;
}

felgall
11-28-2005, 02:31 PM
There is no such thing as type="number" you need to use type="text" and then test what is entered is numeric.

notageek
11-29-2005, 08:52 PM
In the child frame:onload=function() {
document.getElementById(anID).value=top.a1;
}

Big thanks, referring by element ID worked nicely.

notageek
11-29-2005, 08:53 PM
There is no such thing as type="number" you need to use type="text" and then test what is entered is numeric.
thanks, I'll keep it in mind