guys i have for buttons in html form...edit, back, submit, reset but the problem is how to go back to previous page....i m performing this using onlick event but not working...
my code is....

<form method="post" action="" enctype="" name="Qform" onsubmit="return validateForm(this); ">

<div class="centerform" >
<div id="divbox">
<label  id="label">Name : </label>
<input id="input" type="text" name="txtPGrade" onBlur="validate(this.form.txtPGrade.value,'txtPGrade');"/>
<label id="CName">Invalid Data</label> 

</div>



<hr>

<input class="button" type="submit" name="btnsubmit" value="Edit" style="margin-left:150px;">


///here i want to perform back action to previous page..

<input class="button" type="button" name="btnBack" value="Back" style="margin-top:-150px; " onClick= "Job_PayGrades_Add.php">

waiting for solution...
regards..
Farhad

Recommended Answers

All 3 Replies

try this:
OnClick="history.go(-1)"

You should be able to use the history.go or history.back method.

window.history.back();

Thanks JorgeM...Its working..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.