Location.reload() not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2024 01:20 PM
Hi
i have multi layers of choice questions and I want to clear up the entire form when the top level choice value changes.
so I have created a catalog client script onChange on the variable that is present at the top level and added the location.reload() function in the script (nothing else). However, even after choice value change for that variable, the form does not reload.
what might be the issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2024 02:25 PM
Why do you want to reload the form when you have a option to clear the values?
Use below code:
g_form.clearValue("field_name");
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2024 03:07 PM
Hi Murthy
i don’t have to clear the values. I have to hide all questions that might be showing up on the form at that point when the choice value of the top level choice field changes. So I was thinking of using the reload method.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2024 06:17 PM
Hi @Saquib Mohammed ,
Why don't you try
Rampriya S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2024 05:28 PM
I suggest that you post your script for the Catalog client script. I see OOB examples that hide form fields with
g_form.setDisplay('<field_name>', false);
no form reload is needed it seems. Where is " location.reload()" documented/used?