This is driving me nuts!
I have a webpage which is a form that requires completion and submission as they do.
I want to check that the required fields have been completed and if all correct proceed with submission of the form.
On submission it goes to a script which generates a PDF file for printing and then should automatically redirect to the home page (quote.php).
I have tried the following at the submit end of the page...
and can get either Javascript command to work but not both.PHP Code:</tr>
<tr bgcolor='$html_table_td_bgcolor' >
<td nowrap align='left'><input type='button' name='back' value='<- Back' onClick='self.history.back();'></td>
<td align='right'><input type='submit' name='submit' value=' Print Delivery Note ' onClick=\"return CheckRequiredFields(); onClick=document.location = './quote.php';return true\" ></td>
</tr>
</form>
The CheckRequiredFields is a function that does exactly that and works OK alone. I have tried a single comma separating the two but the Javascript error pops up, as it should, but then everything closes and redirects to the quote.php page when you click OK.
Can this be done this way?
Thanks
Hebbs



Reply With Quote
) then redirect itself - not close.
Bookmarks