Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



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.
Trades: 0
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
 
 
Register now for full access!
Old 06-24-2009, 09:36 AM Re: need help on time alert
Extreme Talker

Posts: 246
Trades: 0
what is addappt? Is this something you created as an object? Where does begintime and endtime come from?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to need help on time alert
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.15629 seconds with 12 queries