Jump to content

Help.. i am a beginner!!


aparna_881

Recommended Posts

Hey there guys... I have been trying to run this code.. and wonder what is wrong with it as it does not run... the click button appears but when clicked says that tere is an error on page.. pl help... Apps<html><head><script type="text/vbscript">sub Age()dim ageage = inputbox("Please type your age")msgbox("Your age is :" age)end sub</script></head><body><form><input type="button" value="Click"onclick="call Age()"></fom></body></html>

Link to comment
Share on other sites

You forgot to use an & sign to join the string and dim in the msgbox ie msgbox("Your age is :" & age)works fine now :)

<html><head><script type="text/vbscript">sub Age()dim ageage = inputbox("Please type your age")msgbox("Your age is :"& age)end sub</script></head><body><form><input type="button" value="Click" onclick="call Age()"></fom></body></html>

Link to comment
Share on other sites

Hey there... Thanks a ton... :) Apps

You forgot to use an & sign to join the string and dim in the msgbox ie msgbox("Your age is :" & age)works fine now  :)
<html><head><script type="text/vbscript">sub Age()dim ageage = inputbox("Please type your age")msgbox("Your age is :"& age)end sub</script></head><body><form><input type="button" value="Click" onclick="call Age()"></fom></body></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...