Results 1 to 7 of 7

Thread: Swish + linking to an IFRAME

  1. #1
    A Straw? And Fruit? Bazzlad's Avatar
    Join Date
    Jul 2003
    Location
    The Big Rhesus House Stourbridge
    Posts
    3,072
    Thanks
    90
    Thanked
    78 times in 44 posts

    Swish + linking to an IFRAME

    I'm using a swish nav bar, and I have a HTML page with an iframe (ifrm2) in it.

    When I click the nav bar I want to news.html to open in ifrm2. But it won't. Why?!?!?!

    HEEEEEEEEEEEEEEEEEELP!

  2. #2
    HEXUS.net Webmaster
    Join Date
    Jul 2003
    Location
    UK
    Posts
    3,108
    Thanks
    1
    Thanked
    0 times in 0 posts
    This forum doesn't provide free crystal balls so you'll need to post code for us to have a hope in hell of assisting

  3. #3
    A Straw? And Fruit? Bazzlad's Avatar
    Join Date
    Jul 2003
    Location
    The Big Rhesus House Stourbridge
    Posts
    3,072
    Thanks
    90
    Thanked
    78 times in 44 posts
    Lol.

    I don't think I need to post the code. It's a simple link. But it doesn't work I wonder if it's a limitation of Swish.

    But for the purists, here's the code.

    Code:
    on(press){getUrl("news.html", "_ifrm2")
    ;}

  4. #4
    HEXUS.net Webmaster
    Join Date
    Jul 2003
    Location
    UK
    Posts
    3,108
    Thanks
    1
    Thanked
    0 times in 0 posts
    And what does the code for the getUrl function look like ? Is it a built in function for swish or by inheritance from the Flash player or did you write it yourself ?

    At a guess you've said the iframe is called "ifrm2" yet you refer to "_ifrm2" in your code. The underscore generally only precedes the generic target parameters _blank, _parent, _top, etc, not the frame you've created unless you've given it an underscore.

    In addition, javascript is funny about line breaks, the semi-colon should be on the same line as the function call.

    In all seriousnss, I'm at a complete loss as to how you think we could help without seeing the code ? I'm genuinely interested in your viewpoint in case I'm missing the obvious.

  5. #5
    A Straw? And Fruit? Bazzlad's Avatar
    Join Date
    Jul 2003
    Location
    The Big Rhesus House Stourbridge
    Posts
    3,072
    Thanks
    90
    Thanked
    78 times in 44 posts
    Because swish automatically writes the code for you, unless you go in depth.

    To link, you click on the functions, the on press option and type in the address and location and the code automates:

    on(press){getUrl("news.html", "_ifrm2");}

    Now I tried "Ifrm2", "_ifrm2" and "self/ifrm2", and it didn't work.

    Swish and Iframes don't go well - I've done it before, but that's with an Iframe in swish. However - I did presume that there would be a way to control an Iframe from a swish file. I may be wrong, I asked in case anyone here uses it often and thus may know.

    On the swishzone forums I'v ehad no answer either....I'm thinking something this simple shouldn't be difficult - maybe I'm wrong! :S


    Cheers

  6. #6
    HEXUS.net Webmaster
    Join Date
    Jul 2003
    Location
    UK
    Posts
    3,108
    Thanks
    1
    Thanked
    0 times in 0 posts
    I assume you set the name of the iframe ? A quick test would be to knock up a frameset, load your page into one frame and then change the link in swish to try and refer to the target of the other frame. I cant understand why it wouldn't work for an iframe over a frame as it will just be using the javascript DOM to find the relevant target and that should work irrespective of which type of frame you use.

    Best bet would be to paste the HTML you've used for your iframe (or even the whole page) here so we can perform more analysis

  7. #7
    A Straw? And Fruit? Bazzlad's Avatar
    Join Date
    Jul 2003
    Location
    The Big Rhesus House Stourbridge
    Posts
    3,072
    Thanks
    90
    Thanked
    78 times in 44 posts
    It should work. It just won't. :@

    Iframe
    Code:
    <iframe id="ifrm" name="ifrm" src="welcomepage.html" allowtransparency="true" scrolling="Auto" width="600" height="320" frameborder="0"></iframe>
    And to link I use this.....

    Code:
    <a href="news.html" target="ifrm">fefef</a>
    So in Swish, I use this...
    on(press){getUrl("news.html", "ifrm");}

    Thinking about it, you can use Javascript in swish, maybe I should hunt a iframe link in java and try that...


    I've renamed the frame and the links btw to ifrm

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Flash / Swish / Actionscript
    By Drunken Poncho in forum Software
    Replies: 0
    Last Post: 06-02-2004, 06:32 PM
  2. Linking 2 PCs using a USB Cable?
    By Bunjiweb in forum Networking and Broadband
    Replies: 11
    Last Post: 15-09-2003, 10:50 PM

Posting Permissions

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