tags:

views:

24

answers:

1

its kind of silly question. but i dont know what mistake i am making. if any one could help.

<html>  
<head>  
<script type="text /vbscript">  
function zips(s)  
  document.write(s)  
end function   
</script>  
</head>  

<body>  
<script type="text/vbscript">  
 dim x,y  
 x="sushant"  
<button onclick="zips(x)" id=button1 name=button1>clickme</button>  
</script>  
</body>  
</html>  

sorry i dont know how to format it. but i am no getting the desired output. any help is very much appreciated

+3  A: 

Your button tag should be outside of the script tag.

<script type="text/vbscript">  
 dim x,y  
 x="sushant"  
</script>  
<button onclick="zips(x)" id=button1 name=button1>clickme</button>  

The button is not part of the script but part of the HTML.

Oded
+1: good pick :)
Sarfraz
oh yeah . thanx. it was a stupid mistake to make.
sushant