Add my own clientscript after an item (options product) is added to the basket

Posted By [email protected] Mon 4 Feb 2019
Add to Favorites0

Add my own clientscript after an item (options product) is added to...

Author Message
[email protected]
 Posted Mon 4 Feb 2019
Supreme Being

Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)

Group: Forum Members
Last Active: Mon 17 Jun 2019
Posts: 8, Visits: 68
How can i add my own clientscript after an item (options product) is added to the basket?
Paul
 Posted Tue 5 Feb 2019
große Käse

große Käse - (522,046 reputation)große Käse - (522,046 reputation)große Käse - (522,046 reputation)große Käse - (522,046 reputation)große Käse - (522,046 reputation)große Käse - (522,046 reputation)große Käse - (522,046 reputation)große Käse - (522,046 reputation)große Käse - (522,046 reputation)

Group: Administrators
Last Active: Tue 10 Sep 2024
Posts: 807, Visits: 2,748
Try the following. Open up the user control ProductVersions.ascx

In there, look for the btnAdd_Options button.

Add
 onclientclick="myfunction();"

This should fire your own javascript function when the button is clicked.

I tested with a simple 'alert' dialog and this seems to work, the code continues when that is closed.

If you want to do something more elaborate, this might help:

https://stackoverflow.com/questions/21227506/how-to-call-a-javascript-function-before-and-after-button-click-event-call-in-as

It shows how to run javascript after the server side click event, using registerscripts. But this is more complicated in my experience, the clientclick one is best if you can make your code run that way.

--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb
Tue 5 Feb 2019 by Paul
[email protected]
 Posted Wed 10 Apr 2019
Supreme Being

Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)Supreme Being - (4,427 reputation)

Group: Forum Members
Last Active: Mon 17 Jun 2019
Posts: 8, Visits: 68
thanks

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top