Bug Tracker

Opened 8 years ago

Closed 8 years ago

#7831 closed bug (invalid)

JQuery 1.3.1

Reported by: densanki@… Owned by: densanki@…
Priority: low Milestone: 1.6
Component: unfiled Version: 1.3.1
Keywords: Cc:
Blocked by: Blocking:

Description

Hallo Jquery Bugtracking Team,

following issue appeared by build commercial script.

Senario Build a IFrame that loads sub content from the same domain. After Load the Links in the IFrame must be changed.

But the Jquery.Load Browser Event don't trigger a Event when the Iframe Content come out of the browser Cache. Also the Event Bind "load" and "onload" of the IFrame cause no trigger.

When I use the Javascript onload Event to a Funktion with same JQuery code its working correct and trigger every time when the Iframe load or use the browser cache.

Example Code of not working version:

<iframe scrolling="no" height="700" frameborder="0" width="740" style="overflow: hidden;" id="DBFrame" src="example.htm?value=index.html"></iframe>

<script type="text/javascript">

function StartIt() {

console.log('Load of IFrame found. Skript begins'); $("#DBFrame[src*='example.htm?value=']").contents().find("a:not(:contains('www.stueber.de'))").each( function() {

var temp = this.href.replace('http://www.example.de/temp/',); this.href = "example.htm?value=" + temp;

}); $("#DBFrame[src*='example.htm?value=']").contents().find("a:contains('www.stueber.de')").attr('target','_blank'); console.log('Skript ends');

}

console.log('Code loaded'); $(document).ready(function(){

$("#DBFrame").load(function(){

StartIt();

});

)};

</script>

Working Version with Javascript Trigger

<iframe scrolling="no" height="700" frameborder="0" width="740" style="overflow: hidden;" id="DBFrame" src="example.htm?value=index.html" onload="StartIt()"></iframe>

<script type="text/javascript">

function StartIt() {

$("#DBFrame[src*='example.htm?value=']").contents().find("a:not(:contains('www.stueber.de'))").each( function() {

var temp = this.href.replace('http://www.example.de/temp/',); this.href = "example.htm?value=" + temp;

}); $("#DBFrame[src*='example.htm?value=']").contents().find("a:contains('www.stueber.de')").attr('target','_blank');

}

</script>

Thanks for Help

Change History (2)

comment:1 Changed 8 years ago by addyosmani

Owner: set to densanki@…
Priority: undecidedlow
Status: newpending

Thank you for submitting a bug to the jQuery Bug Tracker!. We appreciate you taking the time to share it with us.

Please note that we require each ticket to contain a reduced test-case on jsFiddle.net which reproduces the issue you are experiencing. This allows us to more easily verify the behaviour you are seeing.

Furthermore, please note that you will need to test your code using a more recent version of jQuery (1.4.4 is the current version) before we are able to assist further since 1.3.1 is considered a very old build of jQuery core at this point.

We look forward to hearing back from you.

comment:2 Changed 8 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.