Hi all, I want to know how to write the script to popup the inputbox(get the input) or msgbox(Yes/No)in vbscript, because i want to get the answer form the user.
Printable View
Hi all, I want to know how to write the script to popup the inputbox(get the input) or msgbox(Yes/No)in vbscript, because i want to get the answer form the user.
VB Code:
Dim StrInput StrInput = InputBox("Whooze yer daddy?")
I tested this code, but it doesnt work, there is an error occur....Quote:
Originally posted by mendhak
VB Code:
Dim StrInput StrInput = InputBox("Whooze yer daddy?")
This code works on Client Side only.
What do you mean by client side only? Do I need to remove this this <% ..... %> ?Quote:
Originally posted by mendhak
This code works on Client Side only.
Could you gimme some simple program.... ?
Anyway, thank you...
Client Side only means it'll work only on the user's computer. You need to put this in <script language="VBScript"> tags in the HTML code. You won't need <% %> there.
Code:<script language="VBScript">
Dim StrInput
StrInput = InputBox("Whooze yer daddy?")
</script>
Froggy, you encouraging people to use VBScript in client side, thats not good ;) .Quote:
Originally posted by mendhak
Client Side only means it'll work only on the user's computer. You need to put this in <script language="VBScript"> tags in the HTML code. You won't need <% %> there.
Code:<script language="VBScript">
Dim StrInput
StrInput = InputBox("Whooze yer daddy?")
</script>
DoneJoe try using JavaScript in Client Side as it works on most browser wheras VBScript will only work in IE.
Code:<script language=javascript>
var strInput;
strInput= confirm("I am your Daddy!");
if (strInput)
alert("Aww come to daddy..");
else
alert("Go to the Froggy :(");
</script>
I can't help it... I work for a Microsoft Partner. :DQuote:
Originally posted by Danial
Froggy, you encouraging people to use VBScript in client side, thats not good ;) .
[/code]
That make sense ...Quote:
Originally posted by mendhak
I can't help it... I work for a Microsoft Partner. :D
*Ticks off mendhak from the possible ASP forum moderator List nominees.
*sigh*
You too, Danial?
:(
Nah, we need an alien moderator with sense of humour. Just gotta do just a little MS bashing from time to time, its very popular :) Lol.Quote:
Originally posted by mendhak
*sigh*
You too, Danial?
:(