Click here to Skip to main content
15,882,464 members
Home / Discussions / JavaScript
   

JavaScript

 
SuggestionRe: Coding Newbie Pin
Member 1395671021-Aug-18 6:28
Member 1395671021-Aug-18 6:28 
QuestionExsplicit JavaScript regular exspression Pin
calmchess16-Aug-18 13:17
calmchess16-Aug-18 13:17 
AnswerRe: Explicit JavaScript regular expression Pin
Richard Deeming17-Aug-18 7:02
mveRichard Deeming17-Aug-18 7:02 
QuestionUsing data from odata in react-native Pin
Mike V Baker12-Aug-18 16:59
Mike V Baker12-Aug-18 16:59 
AnswerRe: Using data from odata in react-native Pin
Richard MacCutchan12-Aug-18 21:03
mveRichard MacCutchan12-Aug-18 21:03 
QuestionWeb Application Pin
Awal Swed9-Aug-18 4:35
Awal Swed9-Aug-18 4:35 
AnswerRe: Web Application Pin
Richard MacCutchan9-Aug-18 5:48
mveRichard MacCutchan9-Aug-18 5:48 
Questioniframe history not cleaned up on refresh in Chrome and Opera Pin
CCTuss9-Aug-18 3:25
CCTuss9-Aug-18 3:25 
I'm testing in Chrome, Edge, FF, IE, and O.

The case is that a page has up to 5 iframes that show on a single page. A page is executed in each iframe. These pages have links to other pages that have links. A browser refresh returns the screen to the initial page state in all 5 browsers. But in Chrome and O, the history of the iframes of the set are not deleted. The browser back button or a JavaScript history(-1) button work as originally intended in FF, IE, and Edge. But in Chrome and O, these back buttons start to step back through the sequential history of all iframes.   And the same thing happens with a single frame.

I do a querySelectorAll('iframe') on exit and refresh/load and no iframes are indicated. Yet, in Chrome and Opera, when the page refreshes and the iframes are created again, they remember the history of the same named iframes that were there before the refresh.

I refresh in 3 different ways in this application including the browser refresh button, parent,location,reload(parent.location.href), and parent,location,reload with a particular function. These all work in Edge, FF, and IE. I refresh and can back out of the page to the calling page. In chrome and Opera, even though the iframes have been removed, the new iframes retain the history of the previous iframes. 

I have tried about half dozen approaches in JavaScript to insuring the iframes have been removed. My latest attempt follows. I'm not sure if I'm executing right, but the length is always 0.

var iframesx = document.querySelectorAll('iframe');
for (var i = 0; i < iframesx.length; i++) {
 iframesx.parentNode.removeChild(iframesx);
}

This is a real navigation problem for this application in Chrome and Opera, and I would think for any application in a similar situation. The browser Back button and JavaScript History() methods are fundamental page navigation tools.  Below is a link that demonstrates the problem. The page shows up to the 5 most recent years of a color map. All data is only for testing and some of the data was doubled up for testing.   I believe this is a Chrome and Opera error.   I've tried to find a way to clean up iframe history thouroghly, but with no success.

http://steepusa.no-ip.info/scx/gencm.cgi?str=0b%7ESKY%7EC%3A%2FSteep%2FUSA%20Data%2FState%2FKY%2F%7EC%3A%2FSteep%2FUSA%20Data%2FState%2FKY%2Fchildren2%2Eview

Bring the page up in Chrome or Opera. Take some links in a couple of iframes. Refresh and hit the browser Back button as if you are backing out of the page. In Edge, FF, and IE, instead of going through the history of the iframes before the refresh, the back out works.  

My platform is Windows 10 running Apache/2.0.64 (Win32), mod_perl/2.0.3, and Perl/v5.8.3. I am running the latest versions of all browsers being used in testing.   However, I think this problem exists independent of platform.

Any help will be appreciated. Thanks. 

AnswerRe: iframe history not cleaned up on refresh in Chrome and Opera Pin
F-ES Sitecore9-Aug-18 23:35
professionalF-ES Sitecore9-Aug-18 23:35 
GeneralRe: iframe history not cleaned up on refresh in Chrome and Opera Pin
CCTuss10-Aug-18 1:27
CCTuss10-Aug-18 1:27 
Questionhow to add image Pin
Member 139364115-Aug-18 22:35
Member 139364115-Aug-18 22:35 
AnswerRe: how to add image Pin
Nathan Minier7-Aug-18 2:49
professionalNathan Minier7-Aug-18 2:49 
AnswerRe: how to add image Pin
ZurdoDev7-Aug-18 3:43
professionalZurdoDev7-Aug-18 3:43 
AnswerRe: how to add image Pin
Shraddha_Patel15-Apr-19 19:40
Shraddha_Patel15-Apr-19 19:40 
Questionjavascript in sharepoint client page sending login user to url Pin
Member 139343701-Aug-18 6:14
Member 139343701-Aug-18 6:14 
Questionget last soap request and send the response Pin
Member 139138451-Aug-18 2:03
Member 139138451-Aug-18 2:03 
Questionfinds number of balls to overs Pin
mahi0024-Jul-18 19:16
mahi0024-Jul-18 19:16 
AnswerRe: finds number of balls to overs Pin
OriginalGriff24-Jul-18 19:29
mveOriginalGriff24-Jul-18 19:29 
QuestionRe: finds number of balls to overs Pin
ZurdoDev7-Aug-18 4:46
professionalZurdoDev7-Aug-18 4:46 
QuestionNPM dependency madness Pin
Mel Padden19-Jul-18 5:48
Mel Padden19-Jul-18 5:48 
AnswerRe: NPM dependency madness Pin
ZurdoDev7-Aug-18 4:46
professionalZurdoDev7-Aug-18 4:46 
AnswerRe: NPM dependency madness Pin
jkirkerx17-Aug-18 12:43
professionaljkirkerx17-Aug-18 12:43 
QuestionUpdate Google chart with dynamic data. Pin
Gopi24718-Jul-18 3:48
Gopi24718-Jul-18 3:48 
AnswerRe: Update Google chart with dynamic data. Pin
ZurdoDev7-Aug-18 4:47
professionalZurdoDev7-Aug-18 4:47 
QuestionIssue With JavaScript and ClearScript Pin
Alan Burkhart13-Jul-18 13:10
Alan Burkhart13-Jul-18 13:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.