URL for "Do you want to cancel?" dialog

This public forum is for user-to-user discussions of ASPMaker. Note that this is not support forum.

URL for "Do you want to cancel?" dialog

Postby ready4data » Tue Nov 21, 2017 3:56 am

I have users only going to a xxxadd.asp page. I do not want to show them the list page.
If they start adding a record and click Cancel, the dialog box comes up with OK and Cancel. If they click OK, it takes them to the xxxlist.asp page which I do not want them to see.
How can I change where the cancel dialog (OK) takes them?

Thanks,
Scott
ready4data
 
Posts: 276
Joined: Mon Nov 19, 2012 8:24 pm

Re: URL for "Do you want to cancel?" dialog

Postby motfs » Tue Nov 21, 2017 9:58 am

Use Startup Script to modify the "data-href" attribute for Cancel button in Edit Page. View HTML source to find out the element ID and use jQuery .attr() (http://api.jquery.com/attr/) to modify it.
motfs
 
Posts: 710
Joined: Tue Sep 08, 2015 4:55 pm

Re: URL for "Do you want to cancel?" dialog

Postby ready4data » Tue Nov 21, 2017 9:24 pm

>Use Startup Script to modify the "data-href" attribute for Cancel button in Edit Page.
This is actually for the add page.

I don't see an ID for the OK button, just for the pop-up dialog. How do I identify the OK button to set the attribute?
<div id="ewPrompt" class="modal in" role="dialog"
aria-hidden="true" style="z-index: 1050; display:
block; padding-right: 17px;">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<div>Do you want to cancel?
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary ewButton" style="">OK</button>
<button type="button" class="btn btn-default ewButton" data-dismiss="modal" style="">Cancel</button>
</div>
</div>
</div>
</div>
ready4data
 
Posts: 276
Joined: Mon Nov 19, 2012 8:24 pm

Re: URL for "Do you want to cancel?" dialog

Postby ready4data » Tue Nov 21, 2017 10:27 pm

I figured it out using your suggestion and some investigating.
On the add page
Client Scripts>Add/Copy Page>Startup Script
$("#btnCancel").attr("data-href", "YourWebPageHere");

Thanks,
Scott
ready4data
 
Posts: 276
Joined: Mon Nov 19, 2012 8:24 pm


Return to General Discussion (ASPMaker)