I have a 3 frame website in which one frame contains a menu of blog articles that load in a difference frame when clicked on. I'd like to address the website via a URL that loads one of the blogs initially. Can this be done, and how?
Thanks
ckm
Well, once you have the page loaded copy the URL and paste it into a blank window to test.
That's not possible, see http://htmlhelp.com/faq/html/frames.html#frame-address and http://htmlhelp.com/faq/html/frames.html#frame-problems
Depends on what the OP means.
Do you want this blog to always be loaded when people go to your frames page or only when you use a "special" URL?
I want to add that if those blogs aren't your own, it isn't exactly polite to frame other people's sites.
I'd like to use special URLs that load specific blog pages (mine) into the main frame. By default it loads the first on the list but I'd like to pass URLs to clients in emails that load a specific blog.
I think this is possible with JavaScript. By adding a query string to your URL, have JS read that query string and load the corresponding page. What say you, Christian?
There may be a little time lapse though. Never tried this, but I would expect so.
I tested a little. Lets say your frameset looks like this.
You can also just use different static frameset files for each combination (no javascript needed). Making different frameset files is not more work that adding to the javascript whitelist of pages.
Beware of making a javascript that works automatically with any querystring (pandy's doesn't), that would save some work but also opens up the frameset to cross site scripting. Possibly you could make it only work for pages on your own domain.
That's true. Didn't think of that.
Also, I made a critical typo in the query string in the mockup URL above. Corrected now.
(I wrote ?=htmlhelp instead of ?site=htmlhelp)
Thanks Christian and Pandy! Those suggestions helped.
I got it working.
$("#button").click(function () {
$("#frame").attr("src", "http://www.example.com/");
});
HTML:
<div id="mydiv">
<iframe id="frame" src="" width="100%" height="300">
</iframe>
</div>
<button id="button">Load</button>
here online web programming tutorial https://www.welookups.com
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)