User Profile

Collapse

Profile Sidebar

Collapse
valhalen
valhalen
Last Activity: Mar 18 '08, 05:29 AM
Joined: Mar 8 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • UPDATE - the below code when put in page2.html works, but when I hit "cancel" on the dialog box, it refreshes the page2 - can this be prevented? thank you.

    [HTML]<head>
    <script language="Javas cript">
    <!--
    function onBak()
    {
    var chk_message = "do you want to continue?";
    var times = 0;
    if (times == 0)
    {
    var leave = confirm(chk_mes sage);...
    See more | Go to post
    Last edited by gits; Mar 12 '08, 01:39 PM. Reason: added code tags

    Leave a comment:


  • ok..i have now tried both of your suggestions - neither seems to be working
    so here's my code
    =============== ====page1.html= =============== ===========
    [HTML]<html>
    <head>
    <script>
    function nextPage()
    {
    window.location .href = "page2.html "

    }
    </script>
    <form name="next_page ">
    <tr>
    <td align="bottom">...
    See more | Go to post
    Last edited by gits; Mar 12 '08, 01:38 PM. Reason: added code tags

    Leave a comment:


  • redirect to another page when browser back button is clicked

    Hi,

    I am trying to redirect the user to another page (other than the previous one in the browser's history) when the browser's (IE's) BACK button is clicked. I found this snippet, but am finding it difficult in getting it to run :(

    [CODE=javascript]if (history.previo us)
    {
    document.locati on="page_to_go_ bak_to.html";
    }
    [/CODE]
    Could any of you please provide a small example...
    See more | Go to post
    Last edited by gits; Mar 12 '08, 09:43 AM. Reason: added code tags

  • valhalen
    replied to Navigating Pages and passing values
    thanks guys

    Fred - I will be sending a small set of values, so I am not worried about maxing out the length, but thx anyways.
    See more | Go to post

    Leave a comment:


  • valhalen
    replied to Navigating Pages and passing values
    thanks,

    I was trying to pass them via the URL but I can only pass static values
    ex: <input type="button" name="Button1" value="Go to 2nd Page" onclick="locati on.href='2ndpag e.html?attr1=20 &attr2=60'" disabled="disab led">

    whereas I want to pass variables whose values are not predetermined, I have tried something like below but it doesnt work
    ...
    See more | Go to post

    Leave a comment:


  • valhalen
    started a topic Navigating Pages and passing values

    Navigating Pages and passing values

    hi,

    I am creating a quiz application in Javascript where each page has one question. I would like to calculate the score and time taken to answer all questions at the very end - how do I achieve this? Can I pass values (like score for each question and time taken to answer that question) to the next page so that I can total it at the very end?

    OS: Windows

    thank you.
    See more | Go to post
No activity results to display
Show More
Working...