Add URL parameters using catalog client script without reloading the form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi All,
I am trying to append a value of a URL using on load catalog client for a order guide. My requirement is I need to have a parent catalog variable value appended in URL when user clicks on next button in order guide. I wrote an on load client script on the child catalog item level as when user clicks on next it will display that catalog item. The script is appending the parameter in URL, but the form is reloaded and moved back to order guide initial form itself.
I tried many options like history.pushState(), history.replaceState() and other methods mentioned in community and other sources. But nothing worked out to me and everytime value added in URL it starts reloading and move backs to parent catalog item (i.e.) the order guide form itself.
The script which I am trying:
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I'm confused as to what value you're trying to achieve. Could you not just do an Item Variable Assignment and assign the value you're trying to pass directly into a variable on the form you're submitting?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Jennifer,
Actually I need to get a catalog variable value from a widget so I thought of if i append the variable value in URL I would get the variable value in widget server script using $.getParameter('my_url_paramter_variable') and with value I will query the table as needed for me.
