Results 1 to 8 of 8

Thread: message box... check date/time

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    128

    message box... check date/time

    Hi all,
    as you can't display a message box using vb.net, i have had to use javascript...

    i am using a Popup Calendar that sent the value of text boxes to the dates selected
    i need to make sure that the end date is after the start date.

    this is what i am doing at the moment...

    function CheckTime(){
    if (document.CRC.txtStartDate.value >= document.CRC.txtEndDate.value){
    var ErrMsg = "End Date Must be later than Start Date";
    alert(ErrMsg);
    return false;
    }
    }

    the problem is; example
    StartDate = 23/12/2003
    EndDate = 13/11/2003

    the code thinks that beacuse the first number is greater, then the whole number is, so it doesn't work.

    please help.
    Thanks
    Tom

  2. #2
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435
    as you can't display a message box using vb.net, i have had to use javascript
    I'm not sure i'm with you here because you can display a message box in vb .net:

    VB Code:
    1. MessageBox.Show("Here is a message!")
    I'm not sure about the dates though.
    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    128
    MessageBox.Show("Here is a message!")

    this is not declared! ??

    p.s. i am using web application so system.windows.forms doesn't work, is there a function within web applications?
    Last edited by tmashley; Jan 23rd, 2003 at 04:48 AM.

  4. #4
    Addicted Member
    Join Date
    Nov 2002
    Posts
    216
    well for my game i would use
    VB Code:
    1. Private sub button1_click (....)
    2. msgbox("Hey, insert your message here")
    Thats how you show a msg box but with the calender thing i have to get on my other comp to check

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    128
    ok, that might work, but i am getting this error:

    It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

    my project is a web application, if that makes any different

  6. #6
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    ASP.NET can't show messageboxes you'll need to use some java code in there to do that. Also ASP.NET runs server side so if it could show a messagebox it'd end up on the server not the client.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    128
    thanks
    just found that out

  8. #8
    Member Ooogaleee's Avatar
    Join Date
    Nov 2002
    Location
    Jacksonville, FL
    Posts
    52
    Yep, no message boxes on ASP pages unfortunately. I usually put a well-placed label control on the page with the bgcolor the same as the page itself. That way if I need to use it, it's there, if not, it's invisible.

    For whatever it's worth...

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