Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling in variables to clear form fields

Status
Not open for further replies.

spastica

Programmer
Sep 27, 2002
72
GB
i have a function which clears textboxes when a radio button is clicked. i have tested it, and the value of the variables is being passed correctly, but i'm not sure how to write the syntax to call the variable when clearing the form the following way:

document.mtgapp.(dt1).value="";

dt1 is the variable, and writing the line as above doesn't recognize it.

here is the function:

function clearDtBx(dt1,dt2,dt3)
{


document.mtgapp.(dt1).value="";
document.mtgapp.(dt2).value="";
document.mtgapp.(dt3).value="";


}


sorry if this is a stupid question, i'm still learning!
 
ok, i figured it out..sorry to bother you! here is my solution:


function clearDtBx(dt1,dt2,dt3)
{


document.mtgapp(dt1).value="";
document.mtgapp(dt2).value="";
document.mtgapp(dt3).value="";

}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top