Kamis, 15 November 2007

[JavaScript] javascript and forms changing multiple field values

I have a form which is setup traditionally using tables. I know its
not Web Standard but it is an older site built by someone else in
Frontpage. The form has a field category and subcategory with the
ability to make a new category and subcategory. When new is chosen I
want that field to turn from a select field to a text input field. I
am able to do that one at a time using onchange if the variable is new
call a PHP script using javascript which outputs one row. However I
cannot have it change two rows at one time. It appears that is not
supported using innerHTML. Does anyone know how I would do this or a
tutorial I could use. I'm a newbie and have a book on this on the way.


function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("txtHint").innerHTML=xmlHttp.responseText
}
}

Visit http://aiaiai.com for more groups to join
Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/JavaScript_Official/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/JavaScript_Official/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:JavaScript_Official-digest@yahoogroups.com
mailto:JavaScript_Official-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
JavaScript_Official-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/

Tidak ada komentar: