NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Javascript help

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 10-31-2005, 05:33 AM THREAD STARTER               #1 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




Javascript help


will this javascript work, what i'm trying to do is change a list depending on what job the user selects:

Code:
<form name="form1" method="post" action="register2.php">
	    <label><span class="Style4">Your Job:</span> 
	    <select name="jobgroup" id="jobgroup" onSelect="JobTypeChange(this.form)">
	      <option value="MSeaman">Merchant Seaman</option>
	      <option value="Inet">Internet</option>
	      <option value="Office">Office Worker</option>
	      <option value="Education">Education</option>
	     </select>
		  <script language="javascript">
		  function JobTypeChange(form){
		  	var Item;
			Item = form.jobgroup.selectedIndex;
			var Result;
			Result = form.jobgroup.options[Item].text;
			
			if(Result == "MSeaman"){
				document.write("<select name='job' id='job' height='5'>
	      <option value='DPO'>DPO</option>
	     </select>");
			}else if(Result == "Inet"){
				document.write("<select name='job' id='job' height='5'>
	      <option value='Webmaster'>Webmaster</option>
	     </select>");
			}else if(Result == "Ofice"){
				document.write("<select name='job' id='job' height='5'>
	      <option value='Clerical'>Clerical</option>
	     </select>");
			}else if(Result == "Education"){
				document.write("<select name='job' id='job' height='5'>
	      <option value='Teacher'>Teacher</option>
	     </select>");
			}
		  }
		  </script>
	    </label>
	    <br>
	    <label>
	    <input type="submit" name="Submit" value="Submit">
	    </label>
	</form>
Barrucadu is offline  
Old 10-31-2005, 09:53 AM THREAD STARTER               #2 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




heeloo?
Barrucadu is offline  
Old 10-31-2005, 08:57 PM   #3 (permalink)
Senior Member
 
commes's Avatar
Join Date: May 2005
Location: Regina, Sask, Canada
Posts: 1,318
commes is just really nicecommes is just really nicecommes is just really nicecommes is just really nice
 



it should work, but dont take my word for it
commes is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading different images depending on the browser (JavaScript) Nevsan Programming 3 04-04-2004 10:36 AM
How I fill javascript array with php variables? wiedzim CODE 0 03-31-2004 03:45 AM
javascript vs asp.net validation tzigone Web Design Discussion 0 01-21-2004 01:37 AM
Javascript Functions: Your needs. Mp)Tarh Web Design Discussion 1 11-15-2003 06:50 AM
why is javascript causing sound problems? Rhino1616 Programming 0 04-28-2003 11:20 AM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 12:26 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger