Jump to content
  • 0
kpcollier

Script to Reload Page Once When Loaded

Question

I am using iframes for a navigation bar from the HowTo article posted Here. The pages inside this tabbed navigation share the same authentication. I have login re directions with their own authentications as well.

When I am redirected to the page with the iframes, I still need to log in to the other datapages on the tabs. From there, I can either log in again or refresh the entire page myself (or, really, I can just refresh the iframe I am in and that works too). I know iFrames are tricky and I really don't want to mess with them. I would rather have my employees have to endure another 1 1/2 seconds to have it working right. 

Could someone help me with a script that reloads the page ONCE when the page is fully loaded? I have been able to get it to refresh, but it keeps refreshing. I am working with onclick query string values so I am not too sure if appending the URL once loaded would work either.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Actually - it would work best if I could figure out how to refresh just the frames. I think this might be able to be done with sessionStorage? Not quite sure how I would target the individual frames, though. The ideal workflow would be a script that refreshes the iframe once the tab (link to iframe) is clicked. This would also help with data being refreshed to the pages. 

Share this post


Link to post
Share on other sites
  • 0

Hey @Harbinger, I should have replied to my post. I was messing around with different ways and got something that works for me. Way more simple than I was originally thinking. Used it for each id. I'm sure there's a "cleaner" way, but this worked.

var iframe = document.getElementById("frameId"); iframe.src = iframe.src

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...