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

hide text fields? 2

Status
Not open for further replies.

AgentM

MIS
Jun 6, 2001
387
US
How can I hide text fields in ASP?

Rosh
 
Rosh, Your question is a bit vague...could you please be more specific about what your are trying to do? I am sure this forum will be able to help...and I am sure what you would like to do can be done...to many options to tell you about with such a broad question

Tal
 
You mean in the text written to the client?
<INPUT TYPE=HIDDEN .......> will not display on the screen BUT it is not for secret data since it can be easily viewed by VIEWING the SOURCE and there is no way to prevent that. Some early stupid shopping carts applications stored the cart data with prices in hidden fields and some bright individuals just modified them through the client side object model and sent them back to the browser, just like printing your own price labels before UPC scanning.
 
You mean in the text written to the client?
<INPUT TYPE=HIDDEN .......> will not display on the screen BUT it is not for secret data since it can be easily viewed by VIEWING the SOURCE and there is no way to prevent that. I heard (Internet Myth?) that some early stupid shopping carts applications stored the cart data with prices in hidden fields and some bright individuals just modified them through the client side object model and sent them back to the browser, just like printing your own price labels before UPC scanning.
 
Hi
Thank you people..

Well, here's what I am trying to do:

I want a Text field displayed in the browser when the user clicks a check box,
I want to do this without loading another page.

I hope that's more detailed and less vague.
If more info is needed pls let me know..

Rosh
 
O.K. I think I understand. Your trying to display a text box after a person selects a certain check box Like a check box that says other and if it is clicked then a text field will appear to enter in the Data for the Other. I would use a Style command to hide the text field then an onchange on the box to display the field if needed. Like this


Code:
<html>

<head>
<title>Selection</title>

</head>

<body>

<form method=&quot;POST&quot; name=&quot;myform&quot;>
	<p>Chose a favorite Flavor of Ice Cream</p>
	<p><input type=&quot;radio&quot; value=&quot;Vanilla&quot; checked name=&quot;radiobutton&quot; onchange=&quot;OtherFlavor.style.visibility='hidden'&quot;>Vanilla</p>
	<p><input type=&quot;radio&quot; value=&quot;Chocolate&quot; name=&quot;radiobutton&quot; onchange=&quot;OtherFlavor.style.visibility='hidden'&quot;>Chocolate</p>
	<p><input type=&quot;radio&quot; value=&quot;Chunky Monkey&quot; name=&quot;radiobutton&quot; onchange=&quot;OtherFlavor.style.visibility='hidden'&quot;>Chunky Monkey</p>
	<p><input type=&quot;radio&quot; value=&quot;Phish Food&quot; name=&quot;radiobutton&quot; onchange=&quot;OtherFlavor.style.visibility='hidden'&quot;>Phish Food</p>
	<p><input type=&quot;radio&quot; value=&quot;Other&quot; name=&quot;radiobutton&quot; onchange=&quot;OtherFlavor.style.visibility='visible'&quot;>Other</p>
	<p><input type=&quot;text&quot; name=&quot;OtherFlavor&quot; size=&quot;20&quot; value=&quot;Enter Flavor&quot; style=&quot;visibility:hidden&quot;></p>
</form>

</body>

</html>

Be careful these scripts ARE case sensitive with reguards to the names


Hope this helps


Tal mcMahon
 
Thank you Tal
That's just what the doctor ordered...

Rosh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top