Keep and Share logo     Log In  |  Mobile View  |  Help  
 
Visiting
 
Select a Color
   
 
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>

or

<a href="#" onclick="document.formName.submit();">Submit Form</a>
 
Bug
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:00pm     Last modified date: Jan 20, 2005 2:07am   Last visit date: Dec 5, 2024 11:42am
    Report Objectionable Content