Reply
need help on time alert
Old 06-17-2005, 10:07 PM need help on time alert
waller's Avatar
Skilled Talker

Posts: 59
Location: North Borneo.
I have a form named "addappt". I have two field that is "begintime" and "endtime".
Both are dropdown list. Thier value format is "00:00". A time format.
My problem is, when i compare them, there were no value.As you can see in line
number 7 below. Even when I display them (begintime or endtime) using
document.write(begintime), it will display nothing.

How can i make this happen. Can anyone please
show me how to convert "begintime" and "endtime"
to numbers, or at least strip down
the ":" thing which is between them "00:00"
there.

PHP Code:
<script type="text/javascript">
function validate()
3    {
4    x=document.addappt
5    begintime
=x.begintime.value
6    endtime
=x.endtime.value
7    
if (endtime begintime)
8        {
9        alert("Invalid timeframe.")
10        return false
11        
}
12    else
13        {
14         return true
15         
}
16    }
17 </script> 
__________________
$id ="waxxer";
$id = str_replace('x', 'l', $id);
echo $id;
echo " and Marj";
waller is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Reply     « Reply to need help on time alert
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.10666 seconds with 12 queries