- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2015 09:37 AM
Have written a simple code section in the UI Macro to call the gsftsubmit, not sure why its not calling the UI action.
in a further debug in chrome it seems to be calling the gsftSubmit function of SN and going till f.submit() but doesn't gets into UI Action.
For a simple debug just wrote gs.log in ui action.
<script> | |||||
function moveTo(str) | |||||
{ | |||||
alert('moveTo 1'); | |||||
//var form = document.getElementById("change_request.do"); | |||||
var form = gel("change_request.do"); | |||||
gsftSubmit(null, form, 'ss_move_to'); | |||||
//gsftSubmit(null, form, 'sysverb_update'); | |||||
alert('moveTo 2'); | |||||
} | |||||
</script> |
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2015 08:49 AM
Thanks all for your kind replies and time got the issue it was nothing wrong in the way the code was written.
Sometime we devs are bit impatient the old code was cached not sure for some reason. cache.do helped
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2015 11:52 PM
yes using it as exact name, to simplify the code have simplified the code further.
Client Script where the script looks like this.
function onLoad() {
//Type appropriate comment here, and begin script below
}
function moveTo(str)
{
alert('moveTo 1');
g_form.setValue('description', 'This is from the Client Script.');
gsftSubmit(null, g_form.getFormElement(), 'ss_move_to');
//gsftSubmit(null, g_form.getFormElement(), 'sysverb_update');
alert('moveTo 2');
}
The UI Action is again with the action name ss_move_to
action.setRedirectURL(current); | |
current.update(); |
Now if i call this button via form on click it updates the changes. But when called via gsftSubmit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2015 01:04 AM
First try with the below script in XML field,
function moveTo(str)
{
alert('moveTo 1');
gsftSubmit(gel('ss_move_to'));
}
if it is not working ,write the same code in client script field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2015 02:46 AM
instead fo
gsftSubmit(null, form, 'ss_move_to'); |
try
g_form.save();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2015 08:49 AM
Thanks all for your kind replies and time got the issue it was nothing wrong in the way the code was written.
Sometime we devs are bit impatient the old code was cached not sure for some reason. cache.do helped
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2015 08:54 AM
The snnipet of code which i am using
gsftSubmit(null, g_form.getFormElement(), 'ss_move_to'); |
This was in earlier code was commented and first var form was used to contain this value.
But as said please check cache.do as sometime it didnt happened for some reason when i tried this in incident.
Again thanks all for responses and really great to see this forum is very responsive.