aparna_881 0 Posted April 13, 2006 Report Share Posted April 13, 2006 Hey there guys... I would like to know how to get info using a sub pro and then pass it to the function to work on it using conditional statment and then display the result... thanks in advance appspl take a look at this script i dont understand how to make it work.. I want to get the age from the user and if it is 30 then with print or put a msgbox saying "congrats"... <html><head><script type="text/vbscript">public sub ageinfo()dim ageage=inputbox("Please enter your age")end subfunction agegreet()i=ageif i=30 thendocument.write("Congrats")end ifend function</script></head><body><script type="text/vbscript">call ageinfo()call agegreet()</script></body></html> Quote Link to post Share on other sites
vinphetamin 0 Posted April 13, 2006 Report Share Posted April 13, 2006 Voila.... <html><head><script language="vbscript"><!--sub whatAge() age = trim(age) if isnumeric(age) then document.write("You Are "& age &" Years Old!") if age=30 then alert("Congrats, You Are 30!!") end if end ifend subdim ageage=inputbox("Please enter your age")--></script></head><body><script type="text/vbscript"> call whatAge()</script></body></html> Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.