Article
Dr Design - Javascript to PHP
Targeting A Frame
Doctor,
In a frameset, I've created a link to a page that should load in another frame. The link comes from "frame3" and the linked page should appear in "frame2" -- but it doesn't!!!!!!
No matter what I put into the "target" attribute the page still appears in "frame3" thus removing my navigation-bar. I have tried _top, _parent, default, _blank etc. in the "TARGET" field. Nothing seems to work. Help!!!
René
René, I'm sensing some frustration from your use of exclamation marks. Sometimes, as desperate as I might be to finish off some coding, when I feel like bashing my head against the monitor, I know it's time to ease off the caffeine and go outside, rediscover what sunlight is, and charge up on Vitamin D.
If you want to target a frame from another frame you need to use the target frame's name. Let's say we have the following frameset:
<frameset rows="50%,*">
<frame name="frame1" src="navigation.html">
<frame name="frame2" src="body.html">
</frameset>
And navigation.html (which is loaded into frame1) has the following link which will open up in frame2:
<a href="somepage.html" target="frame2">click here
to open the page inside frame2.</a>
Viola!
Lights, Camera, Action!
Doc, I designed some really snazzy rollover/navigation buttons for my Website in Swish and exported them as .swf (flash) files. I just can't get my HTML editor (Homesite 4.5) to call them out :( I thought:
<a href "main.html">img src"img/main.swf" width="200"
height="32" alt"" border="0"></a><br>
would do it, but no luck. Now I'm back to boring old .jpgs
Thanks for any advice,
Ryan
Aye-ah! That anchor tag is very mangled. Remember a tag always takes this form:
<tagType attribute=value attribute2=value2 attribute3=value3>
Values that are strings must be enclosed in quotes. For example:
<img src="myImage.jgp" width=100 height=100 border=0 alt="Just an image">
Anyway, that doesn't really get us any closer to solving the problem. I am happy to admit I'm out of my league on this one. You might want to look into adding actions to your Swish movies. Here's a tutorial that looks promising -- good luck! And don't forget to ask in the SitePoint Forums if you need quick advice from some pretty handy Swish users.
Including Headers and Footers
Dr. Design,
How can I include a header and footer in an html page?
Thanks,
Winston
Most Web servers support Server Side Includes (SSI). To be able to use SSI in an html page you need to use the file extension .shtml on your Web pages, so that the Web server knows to parse the file and process the include directives. Here is an example of using SSI to include a header and footer from different files:
<!--#include file="header.html" -->
<p>Some regular old HTML goes here.</p>
<!--#include file="footer.html" -->
Don't forget to save the page with the .shtml extension! You can also use SSI include directives in your ASP files. Which reminds me, I saw patient in the clinic two months back with a similar case of the includes. You can read the advice I gave then -- hope it helps.
Consulting hours are over, but make sure your questions get answered when the surgery opens again next month!