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!
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!
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
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") ;}
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.
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
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
It should work. It just won't. :@
Iframe
And to link I use this.....Code:<iframe id="ifrm" name="ifrm" src="welcomepage.html" allowtransparency="true" scrolling="Auto" width="600" height="320" frameborder="0"></iframe>
So in Swish, I use this...Code:<a href="news.html" target="ifrm">fefef</a>
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
There are currently 1 users browsing this thread. (0 members and 1 guests)