|
-
Jan 21st, 2003, 09:25 AM
#1
Thread Starter
Addicted Member
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
-
Jan 21st, 2003, 11:34 AM
#2
Hyperactive Member
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:
MessageBox.Show("Here is a message!")
I'm not sure about the dates though.
-
Jan 23rd, 2003, 04:40 AM
#3
Thread Starter
Addicted Member
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.
-
Jan 23rd, 2003, 03:28 PM
#4
Addicted Member
well for my game i would use
VB Code:
Private sub button1_click (....)
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
-
Jan 24th, 2003, 04:01 AM
#5
Thread Starter
Addicted Member
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
-
Jan 24th, 2003, 04:26 AM
#6
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.
-
Jan 24th, 2003, 04:29 AM
#7
Thread Starter
Addicted Member
thanks 
just found that out
-
Jan 24th, 2003, 03:47 PM
#8
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|