Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

submitting a form when a confirmattion box ok button is click

Status
Not open for further replies.

robo15717

Programmer
Feb 23, 2005
4
US
i need my page to do all the actions that it would normally do when you click the OK button on a corfirm box as it would when you click the submit button
<td align="right" class="l">
<input type="Submit" name="action" value="Update Tip" ID="Submit5">&nbsp;&nbsp;

<input type="Hidden" name="tipId" value="<%=tip_id%>" ID="Hidden1">
<input type="Hidden" name="rollbackID" value="<%=flagR%>" ID="Hidden11">
<input type="Hidden" name="forwardID" value="<%=flagF%>" ID="Hidden12">
<input type="hidden" name="textEditor" value="" ID="Hidden5">

</td>
is the problem i am having because of the name of the submit button,"action
 
Where's the confirm()? Do you want something like this?
Code:
<script>
function conf(){
  return confirm('Are you sure?');
}
</script>
<form onsubmit="return conf()">
  <input type="Hidden" name="tipId" value="<%=tip_id%>" ID="Hidden1">
  <input type="Hidden" name="rollbackID" value="<%=flagR%>" ID="Hidden11">
  <input type="Hidden" name="forwardID" value="<%=flagF%>" ID="Hidden12">
  <input type="hidden" name="textEditor" value="" ID="Hidden5">

Adam
 
No the corfirmation box appears as a result of a timer clicking on ok of the corfirmation box should perform the same function as of the user had clicked on the submit
 
I see, that's easy enough.
Code:
if(confirm('U sure?')) document.formName.buttonName.click();

Adam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top