- 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-17-2014 06:13 AM
Can you tell me what is the requirement exactly? Is it a custom iFrame or something OOB?
Thanks & Regards,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2014 06:54 AM
here are the steps/actions I need to be accomplished:
- check a field (International) in the sys_user table
- automatically save the sys_user table
- this works using gsftSubmit(null, g_form.getFormElement(), 'Filter_sysverb_update_and_stay');
- run a BR that looks for the check in the international field of the sys_user table that will add the user to a group called "international".
- this group will be used to filter service catalog items by using the ' available for group' field
- this works as well
- refresh/reload the I-frame next to it — having issues doing this, all suggestions so far provides an error that null is not in object
- I need to refresh to occur in order to remove/add service catalog items based on the group.
The I-frame contains a query to service catalog items

- 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-17-2014 06:55 AM
Updated.
Your 2nd script does work.
My first look was clicking a check box in the backend, directly in the sys_user table. It gives an error since there is no iframe. However, on the portal it works correctly.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2015 10:36 PM
Brad, When i try to apply the code to add scroll-bar in IE9 it does not work , where as it is working for Mozilla.