Log In  |  Help  |  Mobile View  
Visiting Richard Carr's Shares (account name: richard)
 Links: How to have a link go back a page, submit a form

For an html link

<a href="javascript:history.back()">back</a>  

For an button

Don't forget the following code must be in a form

<input name="button3" type="button" onClick="self.location='javascript:history.back()'" value="Go Back" >  
How to have a link submit a form

Using links just to submit a form is a very poor usage of them (see misusing links), such as:

<a href="javascript:document.formName.submit();">Submit Form</a>


<a href="#" onclick="document.formName.submit();">Submit Form</a>
2005-01-20 Bug - In month view if user clicks on a day name to go to that week the month calendar is not saved first.  Caused because user is clicking on a hyper link which doesn't cause the form date to be submitted to show_month.php to be saved.  Need to use a link to submit the form, but also need to somehow pass the date of the day clicked on.  Don't know how to do that since a submit() will be used.  Maybe pass the date inside of the submit("2005-01-20")

Creation date: Dec 2, 2003 4:00 pm     Last modified date: Jan 20, 2005 2:07 am   Last visit date: Oct 7, 2016 8:20 am     link & embed ?...
    Report Objectionable Content   
Select a Color