Please make sure
that each and every Input element has the name and
If you assign the Id with some name and ask call with that id.
It will work for you exactly.
Make sure that dont set the name property..
<input type=text id="t1" value="100">
, Kevin Duffey <andjarnic@. ..>
> Hey there,
> I am trying to figure out if the problem I am seeing is related to
the YAHOO api, or just the general way browsers deal with forms. I
have read and heard that forms are like a special object.
> My problem is, I use the yahoo dialog widget to display a popup
modal dialog. Instead of having the <div> stuff within the main page
and hidden, I dynamically add it to a simple StringBuffer, then
the innerHTML of the element inside the <div class="db"> tag, and it
all shows up nicely. The form, colors, etc.
save/close button is selected (I provide that as part of the
contents to show in the dialog), everything seems fine. I am able to
do something like:
> var inp = document.getElement ById("inputBox" );
> alert(inp.name) ; // works every time.. shows the right name
> alert(inp.type) ; // always shows TEXT
> alert(inp.value) ; // almost never works.
> The problem is, I basically use the AJAX post call to send data,
and do NOT submit forms. So since this dialog only has a single
input box, I simply grab the input box (it has id set), and read its
value that the user typed. So far tho, the value eludes me! Most of
the time!!! Thats the odd thing, sometimes the
value shows what I
typed, but most of the time its empty. It's as if the input box
isn't storing what I typed into the value property for me to access.
> I am wondering if the innerHTML does not properly add input boxes
and such to the document? I mean, if they work correctly, why
wouldn't I be able to get the value? I've even tried putting a
timeout in to see if after 1 second the value is available, still no
> Any help on why a form and/or input box wouldn't work when set
through the innerHTML would be very much appreciated.
> Thank you.
> ____________ _________ _________ _________ _________ __
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail. yahoo.com