473,493 Members | 4,355 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Hide text input

Hi.
I wrote a form that has few text inputs
Is it possible to hide unused text input ?

Could you show me how?

Thanks.
Leszek
Jan 27 '06 #1
5 6728
"Leszek" <le*******@poczta.onet.pl> wrote in message
news:dr**********@news.onet.pl...
Hi.
I wrote a form that has few text inputs
Is it possible to hide unused text input ?

Could you show me how?


Define "unused text input".

CSS' display and visibile can be used to "hide" HTML.

But it's not clear what you want to do.

An inoput box would only be "unused" (empty?) at
the point at which the form is submitted and why
would you want to hide it then?

Jan 27 '06 #2
onblur="if(this.value=='')this.stle.display='none' ;" or
onblur="if(this.value=='')this.stle.visibility='hi dden';"

add this code in your all inputs. if cursor click and not wrotes
something than cursor moves other input, former input will hide.

Jan 27 '06 #3
sorry, change this.stle.... >> this.style...

Jan 27 '06 #4
nothingrows said the following on 1/27/2006 5:23 AM:

Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at
the top of the article, then click on the "Reply" at the bottom of the
article headers.
onblur="if(this.value=='')this.stle.display='none' ;" or
onblur="if(this.value=='')this.stle.visibility='hi dden';"

add this code in your all inputs.
No. Do not add that code to all your inputs. Use the onsubmit handler to
trigger a function that will loop through the inputs and hide the ones
that aren't used.
if cursor click and not wrotes something than cursor moves
other input, former input will hide.


And if the user accidentally hits the tab key and moves to the next
field? They have no way to correct the mistake.

Or, if they do not click into the input at all? They are left visible.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 27 '06 #5
In article <11*********************@z14g2000cwz.googlegroups. com>,
ko*******@gmail.com says...
sorry, change this.stle.... >> this.style...


Are you replying to something? Please quote correctly. Even Google
Groups has this capability.

--

Hywel
http://kibo.org.uk/
Jan 27 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
148518
by: Steve Speirs | last post by:
Hi I'm trying to show/hide a simple piece of text and a text field on a form based on what choice is made from a drop down box. <select name="dropdown" size="1"> <option selected...
2
30012
by: Xerxes | last post by:
Hi, can you tell me how I can make a <label> hidden? I have hidden the field after the label: var M_Hide = isNS4?'hide':'hidden'; var M_Show = isNS4?'show':'visible'; ..... <label...
7
4114
by: Mad Scientist Jr | last post by:
Through messing around I got IE6 (win xp) to show/hide a table row. I gave my <TR> an ID of "trRow" and trRow.style.display='none'; hides it trRow.style.display='block'; displays it (will any...
19
6850
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
11
7996
by: jimstruckster | last post by:
I have a table with 10 rows, I want all rows except for the first to be hidden when the page first opens up. If the user puts a value in a text box in the first row then I want the second row to...
1
16719
by: asilverpeach | last post by:
Hey Guys! Found some great scripts here on this topic but have to make to changes to the code that I can't seem to figure out. First, In the following code clicking on the headers shows the...
5
8411
by: ali | last post by:
Hello every one i need you help regarding div hide and show. i am having a link like <a href="#" onClick="expandWin()">show/hide </a> <div id=showHide> </div> within div i have lots of...
11
19178
by: C.W.Holeman II | last post by:
I what to hide an input element and the following text. I have the selector for the input working and just need to grab the text following it. CSS: form{ display:table; text-align:center; }
1
4150
by: pamate | last post by:
hi, I want to show hide layers. I am able to show and hide layers but i am facing problem that, cant view the cursor in Mozilla,but i can type in input text box, its overlapping the layers. ...
15
3769
by: worked | last post by:
I have a script that hides / shows form elements, and wrapped in a tab script (tab navigation). When the code is duplicated (per tab content), the hide / show function works for the first tab but...
0
7118
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
6862
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7364
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5452
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4886
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1397
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.