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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Client side script

Status
Not open for further replies.

enak

Programmer
Jul 2, 2002
412
US
I have a page that I need to be able to clear several textboxes. When the page initially loads the textboxes will be populated from a database so I can not use a reset button.

Currently, this is how I populate a textbox:
<input type=edit name=txtPhone value=&quot;<%=rs(&quot;phone&quot;)%>&quot;>

But, because I have used the &quot;value&quot; property I can not see the textbox when I try to access it by typing frmMyForm.txtPhone.value.

How should I set this up?

TIA
Nate
 
Try using 'getElementById' in your script. It works in N6^ and IE5.5^.

EX----- in JavaScript ---------------------------------

function ClearBoxes(){
var objTemp=document.getElementById('txtPhone');
objTemp.value=&quot;&quot;;
}

------------------------------------------------------- &quot;did you just say Minkey?, yes that's what I said.&quot;

MrGreed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top