Html java script not working | Unix Linux Forums | Web Programming

  Go Back    


Web Programming Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, HTML, SEO, and other Web APIs and topics.

Html java script not working

Web Programming


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 07-11-2013
scriptscript scriptscript is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 16 November 2014, 9:00 AM EST
Posts: 75
Thanks: 21
Thanked 0 Times in 0 Posts
Html java script not working

Could anyone please let me know what went wrong with the below html code ..


Code:
<html>
<head>
<script type="text/javascript">
function check(elem) {
    document.getElementById('mySelect1').disabled = !elem.selectedIndex;
}
</script>
</head>
<body>
<form>
<select id="mySelect" onChange="enable();">
<option onSelect="disable();">No</option>
<option onSelect="enable();">Yes</option>
</select>
<select id="mySelect1" disabled="disabled" >
<option>Dep1</option>
<option>Dep2</option>
<option>Dep3</option>
<option>Dep4</option>
</select>
</form>
</body>


Thanks in advance ...
Sponsored Links
    #2  
Old 07-22-2013
blackrageous's Avatar
blackrageous blackrageous is offline
Registered User
 
Join Date: Jul 2013
Last Activity: 18 December 2014, 5:36 PM EST
Location: Texas
Posts: 432
Thanks: 8
Thanked 85 Times in 82 Posts
Get a better example

This looks way off. The only function I see is the check function. The actions you're trying to invoke, onchange and onselect of those forms elements aren't defined. Try an internet search for a form that resembles the functions you want to try "Google javascript forms"
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
crontab - runninf a java script just isn't quite working... MrCarter Shell Programming and Scripting 3 07-04-2012 07:17 AM
how to delete certain java script from html files using sed georgi58 Shell Programming and Scripting 2 04-25-2012 02:45 PM
Java plugin not working with Firefox 3 whetphish BSD 1 02-11-2009 06:05 PM



All times are GMT -4. The time now is 01:26 PM.