trying to write java script given in april 2009 FastTrack

Status
Not open for further replies.

nileshkumar

Right off the assembly line
Hello frinds,
i am a kind of new to this web scripting and java, i was just trying to write the script given in April 2009 Fast Track, but i am getting error and the script is not running can anybody tell me as to what is going wrong.
my script is as given below.

<html>
<head>
<title>My Favorite Movies</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" language="javaScript">
function addmovie(nameid,listid){
moviename=document.getElementById('nameid').value;
document.getElementById('nameid').value='';
document.getElementById('listid').innerHTML +='<li><a href="#">'+moviename+'</a></li>';
}
</script>
<noscript>
<p> scripting is not supported </p>
</noscript>
</head>
<body>
<h1>A List of my Favorite Movies</h1>
<h2>Movie Series:</h2>
<ul id="sermovies">
<li><a href="#">The Matrix Series</a></li>
<li><a href="#">The Lord of the Rings Series</a></li>
<li><a href="#">Star Wars Series</a></li>
</ul>
<input id="newseries" type="text" />
<input type="button" onclick="addmovie('newseries','sermovies')" value="Add Series"/>
<h2>Individual Movies:</h2>
<ul id="indmovies">
<li><a href="#">Memento</a></li>
<li><a href="#">Batman Begins</a></li>
<li><a href="#">The Dark Knight</a></li>
<li><a href="#">Gattaca</a></li>
<li><a href="#">Shawshank Redemption</a></li>
</ul>
<input id="newmovie" type="text" />
<input type="button" onclick="addmovie('newmovie','indmovies')" value="Add Movie"/>
<p></p>
<div class="footer">
<a href="*www.google.com/">To get your other favorite movies search here </a>
</div>
</body>
</html>

Also in Aptana i have tried but no luck their also.....

if anyone pl. guide me where am i going wrong.
 
Last edited:
Status
Not open for further replies.
Top Bottom