...

View Full Version : How to make textfield string insertion invisible to user



pa2stepper
10-21-2003, 01:04 AM
I have a textfield that I populate with a string when the user clicks a button elsewhere on the page. Is there a way to make the populating of the field invisible to the user?
Thanks!
Mary

zoobie
10-21-2003, 01:19 AM
Please read the forum rulez as this sounds like your other question. :p
Try style="display:none"

pa2stepper
10-21-2003, 01:38 AM
I want to hide the programmatic INSERTION OF TEXT, not the actual field....

Willy Duitt
10-21-2003, 03:49 AM
Hi;

Instead of a textfield use a hidden form input.

<form name="myForm">
<input type="hidden" name="programmatic" value="Text String">
</form>

...Willy

Willy Duitt
10-22-2003, 01:55 PM
Did ^^^^that^^^^ answer your question?

pa2stepper
10-22-2003, 03:14 PM
Hi Willy,
Not quite but I appreciate the answer just the same. I have a search field that the user can input what he wants. And I have a button that says "display sold products" and it works good too. I just didn't want to have the user watch as the search field was being populated programmatically with the word "sold" - kind of cheesy. Any ideas??
Thanks a ton!
M

scroots
10-22-2003, 07:46 PM
<form name="myForm">
<input type="hidden" name="programmatic" value="Text String">
<input type="text" name="searchfield" value="my search">
</form>

<script>
function foo(){
var ght=document.myForm.programmatic.value;
ght+=document.myForm.programmatic.value;
document.myForm.programmatic.value=ght;

alert(ght);
alert('is now in the progmatic form box');
}
</script>

then just call function foo before the search is submitted.

scroots



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum