h1dd3n
Jul 31 2006, 03:06 PM
| | 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 ? |
Reply
TypoMage
Aug 1 2006, 03:07 AM
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  Wahaa
Reply
h1dd3n
Aug 1 2006, 01:13 PM
same here for me ...
Reply
rapidget
Aug 1 2006, 01:16 PM
You guys should search for css tutorial.. it would help you... It's very easy... Look for it on google...
Reply
derickkoo
Nov 3 2006, 08:02 AM
QUOTE(h1dd3n @ Jul 31 2006, 11:06 PM)  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>
Reply
electriic ink
Nov 3 2006, 08:23 AM
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);" />
Reply
Recent Queries:--
onclick open tutorial - 4.65 hr back.
-
javascript onclick code open video and browser - 31.27 hr back.
-
html a onclick - 32.58 hr back.
-
onclick html - 51.51 hr back.
-
html "
-
javascript write html code onclick - 60.48 hr back.
-
html onclick open file - 62.26 hr back.
Similar Topics
Keywords : writing, html, code, onclick, open
- Kool Html
Could anyone tell me some sites with some kool html on them? (6)
- Ajax Code Need Help Debugging.
(9) I did a tutorial on ajax started to write my own It was all working well under safari but when i
tried to test it out on other broswers it doesnt seem to work at all. I've spend a few hours
already going over it and cant seem to figure it out at this stage. Heres the code that works under
safari function createRequestObject(){ var request_o; //declare the variable to hold the object.
var browser = navigator.appName; //find the browser name if(browser == "Microsoft Internet
Explorer"){ /* Create the object using MSIE's method */ request_o = new ActiveXObj....
- Web Applications: J2ee Or Javascript/css/html
(1) I'm currently programming web applications using AJAX/CSS/HTML and they're pretty
cross-browser. However when I heard of this language J2EE I had second thoughts. But I ran into GWT
(Google Web Toolkit) which compiles Java code to Javascript/HTML. With this said, my mind tells me
that Java developers desire to use Javascript/HTML languages to create web applications over Java.
So, which one should I start developing web applications in? Java? or Javascript....
- Ajax: Achieve Ajax Program In 5 Lines Of Code!
(1) Well Last night, after a week of irritation and errors I finally created an easy Javascript object
that easily and quickly allows you to develop an AJAX program in just 5 easy steps! Here's
the link to the object I've created: http://www.demolaynyc.astahost.com/ajaxConn/ajaxConn.js
Download it and read the Readme file that's under the same directory:
http://www.demolaynyc.astahost.com/ajaxConn/Readme.html Basically what this object does is to
connect to a server-side script (".php, .asp, .jsp, etc"), and what ever this script displays is
sent back ....
- My Code Does Not Connect To Database
always databases (1) Hi everyone! i am having
a database connection problem, i am using this code to connet
to the database -
*******************attempCounter = 0****
CODE public static Connection getDbConnection(String p_db, String p_schema) {
Connection conn = null; int attemptCounter = 0; while (conn==null && atte....
- How Do I Create An Array Of Objects?
The code in the tutorial I have read returns an error upon compilation (3) I want to create an array of type Cards. Is this the right way of doing it? CODE Card
decker[]; decker = new Card[5]; I always get the error DeckofCards: java:47:
missing return statement whenever I compile this.....
- Adding Rows & Columns In Html Table Using Javascript
(0) I'm trying to create a website with a form that collects some user information to store in MySQL
database. However, I've a problem when I want to dynamically add new rows and columns in the
HTML table so that the user can add more information in the dynamically added textboxes. Here's
what I have: CODE <table border="0" width="90%"
align="center" id="itemsTable"> <tr>
<td width="20%"> Quantity
<....
- Fire Effect Code
(0) Here's a good Fire code:- -easy to install -super small -lag free(in most browsers) -great
look/effect! Here's the image, it goes upwards... So basically, your forum would have
these fire images flying from bottom to the top. It is lag free, simple, looks great and best of
all, it takes very less space in ur wrapper... All you have to do is simply put this code in your
site in tags... <script language="JavaScript1.2"
src='http://tapsha6.mybesthost.com/fire.js'> That's it!!!All
done!! Code From:- htt....
- Countdown Code Help
I need help setting an image as the background. (3) Ok, now for scripts like this i am not to well of working with..and i am in need of a bit of help, i
would like to set a background image as the background not a color... CODE <script
language="JavaScript1.2"> /* Dynamic countdown Script- © Dynamic Drive
(www.dynamicdrive.com) For full source code, 100's more DHTML scripts, and TOS, visit
http://www.dynamicdrive.com */ function setcountdown(theyear,themonth,theday){
yr=theyear;mo=themonth;da=theday } //////////CONFIGURE THE COUNTDOWN SCRIPT HERE//////////////////
//STEP 1&....
- Picture Enlargement
javascript code (2) ok i have alot of pictures on my site and i need a way in which i can hold my mouse over the
pictures and the picture can get bigger. I know it will be some kind of javascript or flash trick
can anyone explain the prosess for it?....
- Writing & Reading Files With Jsp
How to do it? (1) I've a project on creating a Movie online booking website that is powered with JSP. Now I'm
trying to write and read from the file I wrote, but didn't know how. Can anyone with such
expertise please teach me.. It has to be done with JSP. Thanks in advance......
- Writing A Text File On Wen Host
write to the text file on the webhost (1) Hi! i need to write a text file with applet on the wen host. It is like a guest book that the
visitor enters his comments and the comments are stored in the text file. I found a website which
presents a method to write text files to the visitor's computer but i need to write the text
file to the webhost the applet is hosted. its like a log file or a guest book. I know there is a
way and it can be done but i can't figure it out! Any help would be appreciated!
Thanks! kvarnerexpress Topic title and description are VERY import to this forum. Edit ....
- Html:multibox
(1) I have a JSP where data is shown by use of a for:each loop. In this loop I have a multibox tag which
will display checkboxes next to each corresponding row. A user will have the ability to select all
or a few or none of the checkboxes and click print. From here, the action gets called where I need
to find out which rows were clicked. Right now if I click 3 checkboxes then the String in the form
is created with array = "checked", array = "checked", array = "checked". This does not help
because I need to know which columns were not checked. How can I do this? Kvarnere....
- Onclick & Ie
The not so new standards problem (1) I want to do some action when I click on a paragraph (for example). Here is the code: CODE ...
<script> function refresh_data(){ alert ('test'); }
</script> <p onClick='refresh_data();'>Refresh</p> ...
This works perfect on Firefox and on IE 6.0 and greater. The fact is, it doesn't work on IE 5.0.
What should I do? Re-design everything to allow all kind of browsers (including those not so old and
much used like IE5.0) or recommend users to upgrade their borwsers?. On an Intranet servi....
- Image Show With Thumbnail And Fade
Does anyone know were I can get this code? (2) Hi I would like to know if anyone knows a javascript that makes an thumbnail 'slideshow'
and when mouseover...it fades...and when you click...it enlarges!!! I saw it somewhere
here on the net but i cant finf it anymore!!! Can anyone help me...or does anyone know
a good javascript site???? THANKS ....
- How To Insert Code With Javascript
How to insert into a div an amount of code (7) Hi, I have the next html page CODE <html> <head> <script> <!--
function insertcode() { var code ="<p> blablabal babala
babababab</p><h1>here comes header</h1><span>fadfafa<a
href=\"fadfaf\">anchor</a>blalbababa</span>" var myText =
document.createTextNode(code);
document.getElementById("content").appendChild(myText); } -->
</script> </head> <body> <div id="content">....
- Onclick Image ->> Add Text To Input(text)field?
(3) when some images get clicked, a text should added to an input(textfield). Does someone know how this
can be done? I suppose it can be done via javascript. thanks in advance! /cool.gif' border='0'
style='vertical-align:middle' alt='cool.gif' /> If you need more information, just ask
/tongue.gif' border='0' style='vertical-align:middle' alt='tongue.gif' /> ....
- Eror 404 For Trap17
The Code is Pretty Nice! (5) OpaQue, where did you get that JavaScript for the error 404 page for Trap17? It's something
I've looked for for a long time! I 've tried before, but couldn't achieve the typing
effect with JavaScript. I'd be very happy if you could tell me where you got it. /wink.gif'
border='0' style='vertical-align:middle' alt='wink.gif' /> ....
- Java Script Drop Down Menu With Css
- a full code for a dynamic drop down (2) Introduction This is a code that I use to dynamically create the drop down menus. First, you have
to edit the following code and put it in your Javascript. Notice : /*** SET BUTTON'S FOLDER HERE
***/. Edit that to your folder. Also, the /*** SET BUTTONS' FILENAMES HERE ***/. This creates a
mouseover when the drop down is activated. Put all your onmouseover images under: oversources = new
array; and your onmouseout images under : upsources. Be sure to set your on and out images above
each other. CODE /*** SET BUTTON'S FOLDER HERE ***/ var buttonFold....
- Hammurapi
Java Code Review Tool (0) hi friends, I came across another useful tool, Hammurapi. It is a code review tool for Java. It
parses thru java source files and generates a report stating all the violations to the standards.
It is very much customizable so that u can define ur standards and it will report. It can be found
at www.hammurapi.org It can also be called from an ant build file. I feel it wud be very useful
for java projects and to maintain coding standards.....
Looking for writing, html, code, onclick, open
|
|
Searching Video's for writing, html, code, onclick, open
|
advertisement
|
|