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!

What I want is simple. I have a for

Status
Not open for further replies.

JeroenDortmans

Technical User
Aug 7, 2001
56
NL
What I want is simple. I have a form with a "Delete" button. When this button is clicked a message box appears which a yes / No button. When yes is clicked a page which runs the "Delete" query must be opened. I have almost finished the code, except for the part where the page with the "Delete" query must be opened. The "Delete" query page must be opened in the same browser and the same e frame. Who can help me?

<script language=&quot;VBScript&quot;>
Sub DeleteButton_onClick
Button = MsgBox (&quot;Weet U zeker dat deze record verwijderd mag worden?&quot;, vbYesNo + vbQuestion + vbDefaultButton1, &quot;Verwijder record!&quot;)
If Button = vbYes Then
open &quot;test.asp&quot;
End If
End Sub
</script>

<input type=&quot;button&quot; name=&quot;DeleteButton&quot; value=&quot;Delete!&quot; style=&quot;font-weight: bold&quot;>
 
This will work only in IE:
If Button = vbYes Then
parent.document.all.item(&quot;topnav&quot;).src = mydel.asp?id=77&del=1
End If

That is if the frame name is topnav.
 
JeroenDortmans,

I know this is a vbscript forum, but if you have users that use Netscape, your vbscript prompt will not work.

I use this at top of my ASP page that does processing.

<script language=&quot;javascript&quot;>
var clickok = window.confirm(&quot;This page will begin processing APPROVED Applicants.\n Click OK to continue. Click Cancel to stop.&quot;);

if (clickok == false) { document.location=&quot;MyNewRedirect.asp&quot;;}

</script>


fengshui_1998
 
How is this done when the &quot;Delete&quot; page is used without frames?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top