SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: linking iframes

Hybrid View

  1. #1
    SitePoint Enthusiast lucifertje's Avatar
    Join Date
    Aug 2002
    Location
    belgium
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    linking iframes

    Hi

    i'm using iframes in my new webpage.
    Problem is that my navigation in in flash.
    I know how to call javascript in flash but I don't know how to change the content of the Iframe.

    let's say the frame is called "inside" and you want to change the source to links.html. Just to set an example.
    How would you do such a thing?

    It would look something like this:

    function javalinks (){

    ...

    }

    It's the ... I cant figure out.
    Thanks.

  2. #2
    American't awestmoreland's Avatar
    Join Date
    Sep 2002
    Location
    Grand Rapids, MI
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: linking iframes

    Originally posted by lucifertje
    let's say the frame is called "inside" and you want to change the source to links.html. Just to set an example.
    How would you do such a thing?
    Should just be something like:
    Code:
    document.all.inside.src="links.html";
    Don't forget that if you're using a path then you'll have to escape the slashes e.g. "mydir//links.html".

    If that doesn't solve your problem, I probably have some URLs somewhere that I used when investigating this kind of thing.


    Andy
    From the English nation to a US location.

  3. #3
    SitePoint Enthusiast lucifertje's Avatar
    Join Date
    Aug 2002
    Location
    belgium
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the quick reply

    "document.all.inside.url=..."

    But what does the 'all' do?

  4. #4
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    document: The current document (webpage), referring to the DOM (Document Object Model).
    all: All HTML elements in the document (webpage).
    inside: The HTML element (iframe) named 'inside'.
    src: The source for that HTML element. Where what will be shown in the iframe comes from.

    I hope that helped you a little.

  5. #5
    SitePoint Enthusiast lucifertje's Avatar
    Join Date
    Aug 2002
    Location
    belgium
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll try it tonight. Thanks


Bookmarks

Posting Permissions

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