Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts

    Question Open a page in iframe at a <a name>

    In the parent page I need something like

    function bla(){

    open a page in iframe at <a name="blabla">

    {

    or to call a function written in that child page which can be called from parent... I don't know how would be better.

    Has anyone any ideea, please?
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,074
    Thanks
    0
    Thanked 256 Times in 252 Posts
    try:
    Code:
    function bla(){
      window.open("pageInIframe.htm#blabla");
    }
    or if you want to put the code in the iframe page itself and the named anchor is in the SAME page the iframe is currently in:
    Code:
    function bla(){
      location.href="#blabla";
    }
    then call it in the parent like this:
    Code:
    top.frames["nameOfTargetIframe"].blah();
    Last edited by glenngv; 10-21-2003 at 10:47 AM.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    thanks, second variant is what I needed. It works... I was not sure, theoretically speaking, how to call a function in iframe from a parent, that was the real problem. Thanks a lot.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •