Results 1 to 11 of 11

Thread: Inputbox in ASP(vbscript)..?

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2004
    Posts
    37

    Inputbox in ASP(vbscript)..?

    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.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    VB Code:
    1. Dim StrInput
    2. StrInput = InputBox("Whooze yer daddy?")

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2004
    Posts
    37
    Originally posted by mendhak
    VB Code:
    1. Dim StrInput
    2. StrInput = InputBox("Whooze yer daddy?")
    I tested this code, but it doesnt work, there is an error occur....
    Attached Images Attached Images  

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    This code works on Client Side only.

  5. #5

    Thread Starter
    Member
    Join Date
    Apr 2004
    Posts
    37
    Originally posted by mendhak
    This code works on Client Side only.
    What do you mean by client side only? Do I need to remove this this <% ..... %> ?

    Could you gimme some simple program.... ?

    Anyway, thank you...

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    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>

  7. #7
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    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>
    Froggy, you encouraging people to use VBScript in client side, thats not good .

    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>
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by Danial
    Froggy, you encouraging people to use VBScript in client side, thats not good .


    [/code]
    I can't help it... I work for a Microsoft Partner.

  9. #9
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by mendhak
    I can't help it... I work for a Microsoft Partner.
    That make sense ...


    *Ticks off mendhak from the possible ASP forum moderator List nominees.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  10. #10
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    *sigh*
    You too, Danial?


  11. #11
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by mendhak
    *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.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width