Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Location
    Delhi, India
    Posts
    16

    Unanswered: self post the page and move to another page

    I have web page in tab fashion where each tab is an image <a href> to move to another page, Now i want to first self post this current page and then through response.sendRedirect(URL) move to another page which is being clilcked represented by the image. Currently the page contains a form and a button upon whose click a new record is being displayed on the same page after a self post. I hope I am able to make my problem clear....Please suggest...thnx in advance

  2. #2
    Join Date
    Aug 2003
    Posts
    40
    Well, it sounds like after a user clicks on any of the anchors you are
    submitting the same page, via the <form action=""> tag. So, you'll
    need to capture the values that you are sending on the re-submisssion
    (getParameter() or getParameterValues(), depending upon the HTML
    object) and prepare the HTML accordingly.

    For instance, if the user clicked on a "checkbox" object whose name
    is "cb1", you'll need to capture that the value was selected/checked and
    have it selected when your server-side language re-generates the page.

    Is I have not grasped what your problem really is, submit your code
    that is causing you problems.

  3. #3
    Join Date
    Oct 2003
    Location
    Delhi, India
    Posts
    16

    self post and redirect

    Actually I want to post my form on Anchor Href which seems to be difficult to me. I want to send the form data to some file by posting it and then move to another page represented by the link <a href> tag.
    I have tried giving it through querystring by appending the page name after self page name but then the page does not get self posted...

  4. #4
    Join Date
    Aug 2003
    Posts
    40
    You want to perform a form "submit()" when one or more anchors are
    selected and pass the URL info contained in that anchor?

    If so, you'll be using Javascript to perform this...
    1) On the anchor's "onClick()" event, call your JS function.
    2) In this function...
    a) Retrieve the href's info you desire and, possibly, assign it to
    a "hidden" object in the form or use this info and assign it to the
    form's <action> parameter.
    b) Issue your form submission.

    The entry in the "hidden" object will get passed to your new form and
    you can use whatever server-side language your currently using to
    retrieve the information you desire.
    Last edited by olerag; 01-02-04 at 12:45.

  5. #5
    Join Date
    Oct 2003
    Location
    Delhi, India
    Posts
    16

    self post and redirect

    yeah cheers ..... its working now.. thanx a ton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •