Jump to content

hidden values to a textbox?


kabucek

Recommended Posts

There many ways,.

 

text boxes display content entered into them. Are you trying to hide information entered into a text box and save it off in a hidden var somewhere?

 

If so, you could probably do something like this on a key down event of a textbox.

<script>
function hideText(obj)
{
   hiddenField = document.getElementById("myHiddenField");
   hiddenField.value += obj.value;
   obj.value = "";
}
</script>

 

&

 

First off, options for select aren't hidden. They are the things that actually get shown.

 

You could use a hidden field

 

<form action="#" method="POST">
    <input type="text" name="textBox" />
    <input type="hidden" name="hiddenName" value="someValue" />
    <input type="submit" value="Submit" />
</form>

 

i want to have textbox ( i think the idea is similar to a login box)

where someone will type in date (ex. Feb 2)

if Feb 2 is one of the values

                                  (1 - jan 2

                                  2 - feb 2

                                  3 - jul 6 )

then form will know in the next

page of code that the value of the texbox is feb 2, which is code 2

 

 

thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.