473,395 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to make a textbox visible

Hi..
I have made a table in html whose first column contains checkboxes...On click of a checkbox i want a textbox to appear in that corresponding row....I have made a textbox but initially it's vixsibility is set to false...How can i make it visible for a particular row using javascript or anything related...

Thanks & Regards,
Ashima
Mar 6 '08 #1
1 9545
hsriat
1,654 Expert 1GB
Hi..
I have made a table in html whose first column contains checkboxes...On click of a checkbox i want a textbox to appear in that corresponding row....I have made a textbox but initially it's vixsibility is set to false...How can i make it visible for a particular row using javascript or anything related...

Thanks & Regards,
Ashima
[html]<input type="checkbox" id="ch01" onclick="showInp(this)" /><input type="text" id="tch01" />[/html]
Expand|Select|Wrap|Line Numbers
  1. function showInp(x) {
  2.     document.getElementById('t'+x.id).style.visibility = x.checked ? 'visible' : 'hidden';
  3.     //or use this
  4.     //document.getElementById('t'+x.id).style.display = x.checked ? '' : 'none';
  5. }
Initially, set visibility:hidden instead of visibility:true

And in case of display, initially use display:none

And prefix t to the id of checkbox to make the id of the text input.
Mar 6 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Carlos Lozano | last post by:
I have a windows form (compact framework) which has three hidden controls (label, textbox and listbox) at startup. The controls are enabled, set visible and shown programatically but I am not able...
4
by: Rodrigo DeJuana | last post by:
Howdy, I'm new to this .net stuff and really have little to no training. Im trying to create a new page for a web form, so i have been pretty much jsut coping code. I having some issue with...
2
by: Sumana | last post by:
Hello all, I have 3 labels,1 textbox, 2 dropdowns which i need to toggle in a certain part of my application. all are working fine except the TaxID label and textbox which when set to visible=true...
3
by: tshad | last post by:
I am using the footer of my Datalist to add a row into my database. Is there a way to make the footer invisible when not adding a row, making it visible when a button is pushed and making it...
2
by: A. Nonymous | last post by:
Hello, I am trying to set up a panel that appears on a page that prompts a user to enter in a note. This panel object is initially invisable and appears when the user clicks on a button. ...
6
by: Selden McCabe | last post by:
I have a form with a bunch of image buttons. When the user moves the mouse over a button, I want to do two things: 1. change the Imagebutton's picture, and 2. make another control visible. I'm...
5
by: hanolo | last post by:
Does anyone ever see this happen. I build a form with couple of textbox server control. When user inputs character ` in there, after form post back, the textbox become a line of string such as...
4
by: NH | last post by:
Hi, I just cannot get this to work. I want to make a cell editable in a datagrid only if the value of another cell is something specific. I am able to capture the value of the other cell via the...
2
by: Eniac | last post by:
*argh* ... *pull hairs* I've recently started developing from ASP to ASP.NET The switch was fairly smooth since i had done some VB.net before ... then came...FORMS! :) I find it astounding...
0
KalariaNitya
by: KalariaNitya | last post by:
Hello, could anybody help me? i have gridview, inside gridview i have one Update button & textbox update button update the quantity entered in textbox. i want to update the quantity on textbox on...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.