- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2014 01:10 PM
First of all, I am doing this in order to create a filter on the service catalog.
I am looking for code that will refresh specific/all iFrames. Here is the problem.I have an iFrame on the left that contains a specific view of the user profile. I have been able to add a client script that will automatically save/update the profile if a box is checked. I then have a BR that adds that user to the group that was checked. I now need code that will update the iFrame on the right side.
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2014 06:13 AM
It sounds like you're inside of one iframe and trying to change the src on a different iframe. In this case when you call document, it's limited to the elements in your left iframe. In order to get around this, you should be able to use top to start at the top level document.
Try:
top.document.getElementById('gsft_main_az').src = top.document.getElementById('gsft_main_az').src
You could also do something like this:
top.document.getElementById('gsft_main_az').contentWindow.location.reload(true);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2014 01:28 PM
Give your iframe an id if it doesn't already have one, then:
document.getElementById('iframe_id').src += '';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2014 04:23 AM
Receiving this error. I have renamed the iframe to "gift_main_az".
onChange script error: TypeError: 'null' is not an object (evaluating 'document.getElementById('gsft_main_az').src') function onChange_sys_user_u_international_10(control, oldValue, newValue, isLoading, isTemplate) { if (isLoading || newValue == '') return; document.getElementById('gsft_main_az').src += ''; }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2014 05:19 AM
Try this:-
document.getElementById('iframeid').src = document.getElementById('iframeid').src
Thanks & regards,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2014 05:50 AM
Still getting an error. I have added my client script. It is based on the sys_user table, Since that is the table with the checkboxes. Again, based on the image above, when a checkbox is checked I use the below client script to call a UI action to automatically save the sys_user table. I then need to be able to see the I-frame next to it.
|
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue == '')
return;
gsftSubmit(null, g_form.getFormElement(), 'Filter_sysverb_update_and_stay');
document.getElementById('gsft_main_az').src = document.getElementById('gsft_main_az').src
}