Jump to content


Photo

self.close firefox


  • Please log in to reply
24 replies to this topic

#21 jaymc

jaymc
  • Members
  • PipPipPip
  • Advanced Member
  • 1,521 posts
  • LocationLiverpool

Posted 16 October 2006 - 02:00 AM

Yes your right, removing the OnClick handler does allow the content to load in the frame

But, I really do need the OnClick handler to work

So what is the solution or are you all stuck for answers?

Cheers
I would love to change the world, but they won't give me the source code

SEO Agency

#22 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 16 October 2006 - 02:41 AM

To be honest, I've never encountered this problem before, because I don't use pop-ups ever.  I don't think you can reference this pop-up from the IFRAME, though I don't really know... I'll think about it.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#23 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 16 October 2006 - 06:29 AM

This may help with targetting the a frame in the main window then set a small delay before closing the poup window.
I have yet to test this but give it a try..

function something() {
    if (opener.frames['yourFrame'].location.href = 'yourpage.html') {
        setTimeout('self.close();', 1000);
    }
}

then <a href="#" onclick="something();">Something</a>

Hope that helps,
Tom

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#24 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 16 October 2006 - 08:43 AM

Yea I tested that and it works fine in FF, Opera and IE6.. You could have less of a delay but you will still need one for fire fox.

Also, this will only work if you are trying to change the location of a frame on the page that you opened the popup from.

Good Luck,
Tom

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#25 jaymc

jaymc
  • Members
  • PipPipPip
  • Advanced Member
  • 1,521 posts
  • LocationLiverpool

Posted 16 October 2006 - 11:49 AM

Ive got it working

<a href='searchresults.php?viewresults=yes&criteria=f&searchby=ARTISTNAME' OnClick="opener.frames['artistnalbums'].location.href = 'searchresults.php?viewresults=yes&criteria=f&searchby=ARTISTNAME'; javascript: self.close();" target='artistnalbums'><b><u>Load results in main site</u></b></a>


I just had to put the location in an OnClick handler aswell and make sure it was before the self.close

Thanks for the help :D
I would love to change the world, but they won't give me the source code

SEO Agency




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users