Web Analytics Made Easy -
StatCounter action stop,do something then forward - CodingForum

Announcement

Collapse
No announcement yet.

action stop,do something then forward

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • action stop,do something then forward

    i coding with jsp and i need something with javascript...

    i have simple text based link that forwarding to another page....

    all i want is after clicking that link,before forwarding, i need to add something to my Sessions with jsp then forward that page...

    a type of secure parameter passing

    thanks a lot for any help

    Burak

  • #2
    there are many ways u can do this...the more complex of which will be an AJAX solution...a more simpler solution would be to use a popup..

    Code:
    <a href="#" onclick="sessionPopup(sesVal, where)">..
    Code:
    function sessionPopup(sesVal,where) {
      window.open("someJSP.jsp?setvalue=" + sesVal + "&forwardTo=" + where);
    }
    the someJSP.jsp should output the following code after it has set the session

    Code:
    <script type="text/javascript">
    window.opener.location.href = <%= request.getParameter("forwardTo") %>;
    setTimeout("self.close();", 5000);
    </script>
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow

    Comment


    • #3
      thanks for the quick response...
      thats also a way but popups are usually not friendly...

      so can u plz explain that ajax one or how can i find the information about it

      Comment

      Working...
      X