LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-12-2004, 12:38 AM   #1
graziano1968
Member
 
Registered: Sep 2004
Posts: 223

Rep: Reputation: 30
how to create a chained js web form ?


Hello

I have 2 radio buttons

* CARS
o House

The html code is the following

Code:
<html>
<head>
<title>TEST</title>
</head>
<body>

<form method="POST" action="http://www.post.com">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="4%"><input type="radio" value="car" name="choose" checked></td>
<td width="96%">CAR</td>
</tr>
<tr>
<td width="4%"><input type="radio" value="house" name="choose"></td>
<td width="96%">House</td>
</tr>
</table>


<p><input type="submit" value="CONTINUE" name="B1"></p>
</form>
</body>

</html>
below the 2 radio modules above , I would have a disabled module like this

Code:
 
<select size="1" name="chooselesect"> 
<option value="audi" selected>audi</option>
</select>
When an user select the "Car" radio , a javascript code should activate
this

Code:
 
<p><select size="1" name="chooselesect">
<option value="audi" selected>audi</option>
<option value="mercedes">mercedes</option>
<option value="alfa romeo">alfa romeo</option>
</select></p>
When an user select the "House" radio , a javascript code should instead activate this

Code:
 
<p><select size="1" name="chooseselect">
<option value="audi">rent</option>
<option value="buy">buy</option>
</select></p>
Any way to do that with javascript ?

Thanks a lot
Graziano
 
Old 11-12-2004, 03:41 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
Put the lines to 'activate' on hidden <div> then use a javascript function to make those <div> visible
 
Old 11-12-2004, 03:55 AM   #3
graziano1968
Member
 
Registered: Sep 2004
Posts: 223

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Cedrik
Put the lines to 'activate' on hidden <div> then use a javascript function to make those <div> visible
can you give me more details on "Put the lines to 'activate' on hidden <div>" thank you!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
serial port to web form barnamos Linux - Hardware 6 04-26-2005 09:39 AM
Web form and database... Scrag Programming 4 12-22-2004 05:23 AM
Help with setting a Web form the_imax General 5 11-20-2004 04:57 PM
Your web form is off its not am its pm maximalred Linux - Distributions 2 04-08-2003 09:36 PM
Why does the form tag create blank bottom trailing space? Larry James Programming 9 03-15-2001 05:10 PM


All times are GMT -5. The time now is 08:53 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration