san_crazy
09-10-2008, 01:06 PM
I wrote following script
function show_menu_pages(menu_args)
{
if(menu_args=="home")
{
window.open('http://localhost/WebSite/homepage.html','_parent','','');
}
if(menu_args=="interest")
{
window.open('http://localhost/WebSite/interestspage.html','_parent','','');
}
}
and the html code snippet
<html>
<head>
<script language="javascript" type="text/javascript" src="http://localhost/WebSite/externals/scripts/showpage.js"></script>
</head>
<body>
<input onclick="javascript:show_menu_pages('home')" style="position:absolute; left: 3%; top: 3% " title="Home" type="image" name="" value="Home" src="http://images.orkut.com/orkut/albums3/ATUAAAAyKldQQ9gs8VK3W_zH4xemWwBi7RboeTY-Qgp5w-GNb2e1TacR9I0bZqMw7UsrG5W4AoV7W6d8fZbG0_l-4cwnAJtU9VDRWV-0d-p5Lr6d_8tcO3w-zjoatg.jpg">
<input onclick="javascript:show_menu_pages('interest')" style="position:absolute; left: 3%; top: 8% " type="image" name="interest" value="See" src="http://images.orkut.com/orkut/albums3/ATUAAACaxeATh4Si8c5iaCZMRp6QiqUIk8_0L6_VxN3sQ6ZDAn2tepoUHi7UJ2xsIvlJYRTjBE3JMyu0V5EWkGCW19R7AJtU9VBo B1gvzCOa_x3hdNMgP49ELF2Ebg.jpg">
</body>
</html>
but when i click on input element, nothing happens like the function is not getting called.
what mistake am i doing?
function show_menu_pages(menu_args)
{
if(menu_args=="home")
{
window.open('http://localhost/WebSite/homepage.html','_parent','','');
}
if(menu_args=="interest")
{
window.open('http://localhost/WebSite/interestspage.html','_parent','','');
}
}
and the html code snippet
<html>
<head>
<script language="javascript" type="text/javascript" src="http://localhost/WebSite/externals/scripts/showpage.js"></script>
</head>
<body>
<input onclick="javascript:show_menu_pages('home')" style="position:absolute; left: 3%; top: 3% " title="Home" type="image" name="" value="Home" src="http://images.orkut.com/orkut/albums3/ATUAAAAyKldQQ9gs8VK3W_zH4xemWwBi7RboeTY-Qgp5w-GNb2e1TacR9I0bZqMw7UsrG5W4AoV7W6d8fZbG0_l-4cwnAJtU9VDRWV-0d-p5Lr6d_8tcO3w-zjoatg.jpg">
<input onclick="javascript:show_menu_pages('interest')" style="position:absolute; left: 3%; top: 8% " type="image" name="interest" value="See" src="http://images.orkut.com/orkut/albums3/ATUAAACaxeATh4Si8c5iaCZMRp6QiqUIk8_0L6_VxN3sQ6ZDAn2tepoUHi7UJ2xsIvlJYRTjBE3JMyu0V5EWkGCW19R7AJtU9VBo B1gvzCOa_x3hdNMgP49ELF2Ebg.jpg">
</body>
</html>
but when i click on input element, nothing happens like the function is not getting called.
what mistake am i doing?