...

View Full Version : Input



lebronletchev
12-06-2006, 01:29 AM
Hi,


I have an INPUT like this:

<input type="text" size="15" name="look_for2" value="*****" >

The value "******" is necessary . I need have my form INPUT with something, however I need change it with something always I enter a data.

Do you know how I do this?

Thanks

Lebron

david_kw
12-07-2006, 12:01 AM
I don't understand what you are trying to do. Typically the user is the one that changes an input textbox. Are you saying you need to set a default value to it or something? If so, you want to do it when the page loads or some other time?

david_kw

lebronletchev
12-07-2006, 03:17 AM
Yes.

I need to have a default valuein the input box. When the user return to original page, the default value it shown automatically.

Thank you

Lebron

david_kw
12-07-2006, 03:54 AM
You can set it in the onload function.

window.onload = function () {
document.f.look_for2.value = oldvalue; // however you get your old value
}

<form name="f">
<input type="text" size="15" name="look_for2" value="*****" />
</form>

david_kw

mrhoo
12-07-2006, 06:53 AM
<input type="text" size="15" name="look_for2" value="*****" defaultValue="*****" />



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum