41 users online (1 members and 40 guests)  


  Results 1 to 5 of 5

Related

  1. Populating Form Field from URL    Forum: HTML Forum
    Replies: 0
  2. Replies: 2
  3. Form Action help    Forum: HTML Forum
    Replies: 1
  4. FROM: field in form    Forum: Website Scripts Forum
    Replies: 4
  5. Trigger form action    Forum: HTML Forum
    Replies: 2
  1. #1
    pkamath84's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2008
    Posts
    3

    Variable in Form action field

    Hi,

    I have the below script

    Code:
    <form name="form1" method="post" action="abcd.htm?">
    i lwant to have last visited browzer in action field,
    i tried below script,

    Code:
    <<form name="form1" method="post" action='window.history.backup(1)'>
    which doesnt work

    Can anybody help me here

    Thanks
    PK
    Last edited by vinyl-junkie; 07-16-2008 at 06:23 AM. Reason: Added code tags

  2. #2
    vinyl-junkie's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    721

    Re: Variable in Form action field

    This should work for you:


    Code:
    <input type="button" value="Go Back One Page" onclick="history.back();">
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more

  3. #3
    pkamath84's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2008
    Posts
    3

    Re: Variable in Form action field

    thanx i used it but it is trying to browze \history.back(); instead of last URL. looks like action item takes it as a string rather than a function!!!

  4. #4
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: Variable in Form action field

    Have you tried:
    Code:
    <form name="form1" method="post" action='history.back()'>
    But for what purpose? The information from the form will be sent to the previously viewed page.
    Anyway, hope it helps.
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  5. #5
    pkamath84's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2008
    Posts
    3

    Re: Variable in Form action field

    i want to post the form to one page after that i like to redirect page to last viewed page/or the current page as per the requirement...

    Ex:

    1) Post the form to abc.htm and stay in the same page window.location.href

    2) Post the form to abc.htm and go to the last viwed page history.back()



Tags for this Thread