|
|
|
|
![]() ![]() |
Jul 31 2006, 03:06 PM
Post
#1
|
|
|
Newbie [Level 1] ![]() Group: Members Posts: 15 Joined: 18-July 06 Member No.: 26,810 |
hi,
I am new in web development i want to make a page in which there are few buttons and on click of each button there is some hidden text field which becomes visible and user can enter the text he wish to in it. how can i ? |
|
|
|
Aug 1 2006, 03:07 AM
Post
#2
|
|
|
Master of All Typos ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 621 Joined: 30-July 06 From: Earth, Usa, Maine, Waterford, Member No.: 27,507 ![]() |
I have posted a few things that could help me about that stupid Cpanel
I am still looking what icon I click on to make the website!! In my one day of being here. I am kinda disapointed. I wish that the shoutbox was working |
|
|
|
Aug 1 2006, 01:13 PM
Post
#3
|
|
|
Newbie [Level 1] ![]() Group: Members Posts: 15 Joined: 18-July 06 Member No.: 26,810 |
same here for me ...
|
|
|
|
Aug 1 2006, 01:16 PM
Post
#4
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 34 Joined: 11-July 06 Member No.: 26,467 |
You guys should search for css tutorial.. it would help you... It's very easy... Look for it on google...
|
|
|
|
Nov 3 2006, 08:02 AM
Post
#5
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 29 Joined: 3-November 06 Member No.: 32,672 |
hi, I am new in web development i want to make a page in which there are few buttons and on click of each button there is some hidden text field which becomes visible and user can enter the text he wish to in it. how can i ? ok, i have some time let me have a try CODE // test.html <html> <head> <title>just a demo</title> <style type="text/css"> /*<![CDATA[*/ #div1 { display:none; } #div2 { display:none; } /*]]>*/ </style> <script type="text/javascript"> //<![CDATA[ function show(id) { if(id == 1) { document.getElementById('div1').style.display='block'; document.getElementById('div2').style.display='none'; } else { document.getElementById('div2').style.display='block'; document.getElementById('div1').style.display='none'; } } //]]> </script> </head> <body> <div id="div1"> <input type="text" name="txt1" value="here is text1 content" /> </div> <div id="div2"> <input type="text" name="txt2" value="here is text2 content" /> </div> <input type="button" value="button1" onclic="show(1);" /> <input type="button" value="button2" onclic="show(2);" /> </body> </html> |
|
|
|
Nov 3 2006, 08:23 AM
Post
#6
|
|
|
Incest is a game the whole family can play. ![]() Group: [MODERATOR] Posts: 1,227 Joined: 11-February 05 From: Heaven Member No.: 3,709 |
INTO HEAD:
CODE <script type="text/javascript"> function show_buttons(show) { if (show == 'content_A') { document.getElementById('content_B').style.visibility='hidden'; document.getElementById('content_A').style.visibility='visible'; } else { document.getElementById('content_A').style.visibility='hidden'; document.getElementById('content_B').style.visibility='visible'; } } </script> INTO BODY: CODE <input type="button" onclick="show_buttons('content_A');" value="Show A"> <input type="button" onclick="show_buttons('content_B');" value="Show B"> <input type="text" value="A" id="content_A" style="visibility: hidden"> <input type="text" value="B" id="content_B" style="visibility: hidden"> Both will give different results. Mine will reserve space on the page for text fields whereas derickkoo's won't. When a user displays his the content on the page will move down slightly - or so I believe. Try them both out. NB: CODE <input type="button" value="button1" onclic="show(1);" /> <input type="button" value="button2" onclic="show(2);" /> Should read: CODE <input type="button" value="button1" onclick="show(1);" />
<input type="button" value="button2" onclick="show(2);" /> |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 8th October 2008 - 05:49 AM |