This topic is locked

adding javascript and times operations

6/30/2008 9:31:24 AM
PHPRunner General questions
W
webimmagine author

hi,
can you please tell me how can i add javascript without having smarty errors like adding scripts between head tag and body tag , actually i m trying to include a time picker in an adding sheet.
second issue
how can i calculate the diffence between 2 fields :
i have a field called deconnection_start_time and another one called deconnection_end_time , actually i want to have 2 new field automaticly filled by the result like :
deconnection_start_time - deconnection_end_time = value(for the first field) then value(for the second field converted in seconds)
i don t know if i m clear enough <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=8882&image=1&table=forumtopics' class='bbc_emoticon' alt=':unsure:' /> but maybe someone tried to use some javascripts code in the phprunner applications, or a times operations .
i know i m asking a lot from you guys but any help will be more than appreciated.
thanks a lot

J
Jane 7/1/2008

Hi,
if you use curly brackets in your JavaScript code add {literal} and {/literal} around your code:

{literal}

<script>

...

</script>

{/literal}


To calculate values use Date methods.

Here are some links:

http://www.htmlgoodies.com/series.php/23571

http://www.w3schools.com/JS/js_obj_date.asp

W
webimmagine author 7/2/2008

thank you so much i m gonna try it <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=30749&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

W
webimmagine author 7/3/2008

up <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=30770&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />

worked for me 100 per 100 thanks