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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JS & Iframes 2 Questions

    #1. Problem
    I have the highlighter roller script from here that I modified the <div> tag on to center the text array's and remove the highlighting. It works perfectly both locally and on line, inside the iframe with FF, Opera etc. but NOT with IE. IE gives an error of "beginclip" not defined when I display the script inside the iframe. (The script is in a seperate html file that loads in the iframe.) When I try the script stand alone in the html file locally or on line it works fine with IE but NOT inside the iframe !

    This is the script:http://www.javascriptkit.com/script/cut57.shtml

    Here is how I modified the <div> tag after a suggestion on these boards.

    <div style="position:relative;left:0px;top:0px;">
    <p id="highlighter" style="width: 100%;text-align: center;position:absolute;left:0;top:0;font-size:11px;font-family:arial;font-weight:bold;background-color:white;clip:rect(0px 0px auto 0px)"></p>
    </div>

    #2 Problem.

    I have an iframe with a link to an anchor on the same page further down as the iframe. When you click it, the entire page reloads THEN jumps to the anchor. How can I get the link to simply jump to the anchor without reloading ? (<a href="index.html#DISASTER">) Is there a js way to do it ? Using a "target" tag does not work.

    Thanks for all the great help and scripts btw.

  • #2
    New to the CF scene
    Join Date
    Sep 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Solved the problem with IE
    The script had a line:

    clearTimeout(BeginClip)

    I deleted the (BeginClip) part and it's fine in IE, FF, Opera iframes or not, on server or local. <<<<<<<<<<<<<is a puzzlement

    However
    I still cannot get a link referencing an anchor OUTSIDE the iframe on the same page to work without reloading the parent page first. Weird.

    <a href="index.html#DISASTER"> so if anyone has a JS code that will do this
    I would be grateful.

    TIA


  •  

    Posting Permissions

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