UI action return false
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2013 01:28 PM
Hi everyone.
How do I make a UI action do nothing? By nothing, I mean don't even reload the page?
I have a button that shows up but I need it to only be clickable if a particular field is filled in. I don't want to make this a condition of the button because the button wouldn't be there unless the field was populated properly before the page loaded.. this would just mean they'd need to save the form after updating the field before the button would show up.
Instead, I want to just do something like
if (current.field == "empty") { return false; }
But that doesn't seem to be doing anything at all. It stops the rest of the UI action from processing but it still reloads the main form.
Any help would be much appreciated.
- Labels:
-
Orchestration (ITOM)
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2013 08:35 AM
Well the script doesn't really impact the UI action in this case. What is happening is you click on a button which is attempting to modify the record you're on. When you do this, any onsubmit script you have will still come into play. When you have one that returns false, it'll stop the form from doing anything. The script is acting like a blocker.