[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
XWidgetSoft Forum • View topic - HELP: problem with alarm in the Time widget

XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently April 19th, 2024, 6:42 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: December 18th, 2013, 9:08 am 
Offline

Joined: October 30th, 2012, 10:48 am
Posts: 38
Why when I enter a value in the edit field 08 or 09, the text displays 0 or 00? Other numbers are displayed normally. But if I enter only 8 or 9 (without 0 in front) all OK.
I do not understand where is the problem
preview.png
preview.png [ 36.29 KiB | Viewed 1775 times ]

My code:

function buttOKOnClick(Sender)
{
ah = parseInt(edit_h.Text);
text_h.text=ah;
if (ah>23)
{
timercore5.Enabled = true;
text_h.text="- ";
}
if (edit_h.Text=="")
{
timercore5.Enabled = true;
text_h.text="- ";
}
am = parseInt(edit_m.Text);
text_m.text=am;
if (am<10)
{
text_m.text=("0"+am);
}
if (am>59)
{
timercore5.Enabled = true;
text_m.text=" -";
}
if (edit_m.Text=="")
{
timercore5.Enabled = true;
text_m.text=" -";
}
timercore5.Enabled = true;
alarmTime.visible = true;
msg.visible = true;
memo.visible = false;
alarm.visible = false;
imAlarm.visible = true;
imAlarm1.visible = false;
}

function timercore5OnUpdate(Sender)
{
if (hours.text==ah)
{
if(minutes.text==am)
{
T23OnClick();
PlaySound("sound.wav");
time_Zone.visible = false;
bell_hourly.visible = false;
clock_calendar.visible = true;
alarmTime1.visible = true;
alarmTime.visible = false;
alarmTime1.InitAnimateChange;
alarmTime1.AnimateChange.Style = 21;
alarmTime1.StartAnimateChange;
edit_h.text="";
edit_m.text="";
text_h.text="";
text_m.text="";
text_h1.text=ah;
text_m1.text=am;
}
else
{
alarmTime1.visible = false;
}
}
}


Top
 Profile  
 
PostPosted: December 18th, 2013, 5:56 pm 
Offline
User avatar

Joined: June 10th, 2012, 5:57 am
Posts: 313
it's a problem of parseInt()

you should add its second parameter parseInt(edit_h.text,10)

parseint is a function of javascritp.you can get more details from google


Top
 Profile  
 
PostPosted: December 19th, 2013, 9:46 am 
Offline

Joined: October 30th, 2012, 10:48 am
Posts: 38
Thank you, qiancang, for the help!!!
It work OK!
I never guessed about it without you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 62 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Powered by phpBB® Forum Software © phpBB Group