View Full Version : onclick textfield input help

sir pannels
06-29-2006, 04:56 PM
yo all,

need some help with javascript .. I have an onclick event, within it I have a line that reads ..


The textfield1 is on the page however when I click to get the onclick event to move, the page errors, it says 'textfield1 is undefined. I'm not a javascript coder, just play around .. do I need to define the textfield somewhere else?

Any info would be great,

Sir P

06-29-2006, 05:47 PM
<input type="text" name="textfield1"><br>
<input type="button" onclick="this.form.textfield1.value='GO'">

06-29-2006, 05:49 PM
try this:

function MyClickEvent(){



<form name='myFormName'>
<input type='text' name='MyFieldName' onClick='MyClickEvent();' />

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum