Results 1 to 7 of 7

Thread: ASP & Msgbox

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2000
    Location
    Québec, Canada
    Posts
    212

    ASP & Msgbox

    I saw many of you agree on the fact of not to use msgbox.
    Many reasons were given, regarding mostly IIS.

    But then, how can you ask a question to the user ?
    ex.:
    Answer = Msgbox(Question, vbYesNo or vbQuestion, "!")

    Or have I missed something important ?

    Thanks
    Regards,

    El-Nino

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    You have to use the equivalent in client side script. In javascript its "alert('Something');"
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2000
    Location
    Québec, Canada
    Posts
    212
    I know the window.alert("MSG") part;
    But does this function returns something ?

    Like vb constant: vbyes, vbNo, vbCancel and so on ?
    Regards,

    El-Nino

  4. #4
    Lively Member harsoni's Avatar
    Join Date
    Oct 2000
    Posts
    118

    Lightbulb

    It is illegal to use msgbox or an alert in ASP code.

    sonia

  5. #5
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    It's not illegal. You can do it and it will even work if you have server side debugging enabled in IIS. If you don't it is ignored.

    That's not to say you should... cuz you shouldn't unless your debugging.

    As for eL_NiNo:

    Try
    window.alert()
    window.confirm()
    window.prompt()

    or just check out this MSDN article on the window object.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  6. #6
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    The reason why not is this; most people simply don't grasp the fact that...

    ASP runs on the SERVER side. If there were Msgboxes the SERVER would recieve them, not the client. That's why it looks like plain HTML when viewed from the client's side, the ASP is a bunch of instructions interpreted by the server. The server sends HTML back to the browser, it doesnt interperet ASP.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Oct 2000
    Location
    Québec, Canada
    Posts
    212
    Just what I thought !
    Look at the thread (VBScript Easy-one) to understand why I was starting to wonder !

    Thanks
    Regards,

    El-Nino

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