Jump to content

Timer/Delay on Button


Recommended Posts

Heres my issue, I am looking for help to had a simple 15sec delay timer on the <?php print $next_pg; ?> button that exist. I know enough about coding to be able to read it, (very slowly), however i don't know enough to be able to right it myself. Long ago a colleague of mine contracted out some work to his friend to code a course into my webpage. The colleague is no longer employeed with me and his friend wants me to pay him lots to add this in.

This section of code is used on every single page of the course, (it is the Navigation Bars).

 

I've tried to do it myself using....

setTimeout

and

hide().delay()

 

but i have no idea where to actually insert my coding into the existing coding to make this work.

 

#################################################################################

<td width="117">
        
    <?php if ($enable_next_button == "yes") {
            // very last quiz of Module 5 should reveal I Agree button and it is required, thus we should enforce it...
            // the JavaScript checkAcceptance() function is defined on the module_5_18 page, as well as "i_agree" form with
            // acceptance checkbox.
            if ($_SESSION['module5_5_completed'] == 1 && $pg == "5_18") {
    ?>
            <a href="javascript:void();"><img src="images/Navigation_Forward_Up.gif" border="0" name="Forward" onMouseOver="document.Forward.src=ForwardOver.src" onMouseOut="document.Forward.src=ForwardUp.src" onClick="checkAcceptance(i_agree);"></a>
    <?php         
            } else { ?>

       <a href="<?php print $_SERVER['PHP_SELF']; ?>?pg=<?php print $next_pg; ?>"><img src="images/Navigation_Forward_Up.gif" border="0" name="Forward" onMouseOver="document.Forward.src=ForwardOver.src" onMouseOut="document.Forward.src=ForwardUp.src"></a>

    <?php     
            }
        } //  if ($enable_next_button == "yes") {
    ?>
    </td>

#################################################################################

 

Any help is appreciated. Thank you.

Link to post
Share on other sites

Php is on the server side and can only send data to the client. If you want to delay output or make anything after the page has been loaded javascript is the language to use. It runs on the client side and can manipulate the page after loading

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...