View Full Version : Is this the best way to display .html within .html?
u-stu.com
May 3rd, 2008, 02:35 PM
Here's the current site in question:
http://www.u-stu.com/index032.html
On the right side I have the latest content on every page of my site. The image and text "Films: Script Blueprints" are part of an iframe that links to latest.html Is this the best way to update the latest content without having to go through every page?
kdd
May 3rd, 2008, 04:20 PM
In my opinion, this is a good way. But, I'm sure some people will disagree with me. The reason for that is because there are many ways to accomplish this thing. For example, you can have one .php file bringing data from that file, and then you slap that data on this page. Similar to what you have here (but with .php and a db). But I think this is just fine.
u-stu.com
May 3rd, 2008, 04:36 PM
Yeah, I'd read things about using PHP but I didn't know what exactly to start looking for. I didn't want to learn a ton of PHP before I could even ask the question I had when iframes are working for me.
Templarian
May 3rd, 2008, 08:28 PM
If PHP is not an option then JS is usually better than an iFrame.
With a simple AJAX call you can dynamically load in HTML content from another page.
Example (copy and paste type script):
http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
Now unlike kdd, I know someone will disagree with me.
actionAction
May 3rd, 2008, 11:37 PM
I disagree with kdd and Templarian.
nobody
May 4th, 2008, 03:05 AM
I completely disagree with kdd because that is basically the worst way to do things, and sort of agree with temp. There's no real reason to take the client side hit to replicate a very common server side function. Any server side language can handle this and it's the most correct way to go about it.
The faux-server side AJAX stuff should be a last resort if your hosting can't support a server side language. Otherwise this is a great excuse to jump in and learn something new such as PHP or Ruby on Rails.
u-stu.com
May 4th, 2008, 03:43 AM
Amazon uses iframes for their affiliate ads so why not here?
thecharmed01
May 4th, 2008, 06:23 AM
Learning a language like php can be incredibly time-consuming and frustrating when you are trying to learn alone.
I dont use any myself, but that JS/Ajax idea looks quite interesting for those who may be ready to step it up from plain html, frames and iframes, but arent at a level high enough for php/asp etc....
u-stu.com
May 4th, 2008, 01:15 PM
Learning a language like php can be incredibly time-consuming and frustrating when you are trying to learn alone.
I dont use any myself, but that JS/Ajax idea looks quite interesting for those who may be ready to step it up from plain html, frames and iframes, but arent at a level high enough for php/asp etc....
But why not use iframes? I thought using JS would isolate the users who have it disabled.
ditt0
May 4th, 2008, 02:12 PM
Because :
- some screen readers, mobile phones, and search engines will have problems parsing the code
- you'll have invalid code
- you won't be able to print properly
- SEO might fail for those pages.
You can use .shtml to replicate what you were meaning to do with frames. Much tidier.
kdd
May 4th, 2008, 02:31 PM
That's why I said there are MANY DIFFERENT WAYS to accomplish this same thing.
u-stu.com
May 4th, 2008, 03:10 PM
Because :
- some screen readers, mobile phones, and search engines will have problems parsing the code
- you'll have invalid code
- you won't be able to print properly
- SEO might fail for those pages.
You can use .shtml to replicate what you were meaning to do with frames. Much tidier.
I don't care about mobile phones or any other internet browsing fads. I also don't need to optimize this specific area for search engines.
How exactly can I use .shtml. I don't really want to have to learn another area for this one thing. I already had to learn CSS because people gave me crap about using tables. Now CSS is acting up and being a lot less logical than tables.
Also, could someone go here (http://www.u-stu.com/films/equipment.html) and tell me if the submenu looks okay when you hover over "Films" on the main menu. For some reason when I create the submenu pages, the last one created adds padding to the left and right of it's submenu link. When I clear cache, temp files, etc. it fixes it but then I click refresh and it does it again. CSS just seems to do whatever it wants. So frustrating. This is why I don't want to jump into something else when iframes seems to be okay.
CSS is here (http://www.u-stu.com/core-style.css).
EDIT: It also centers the text along with the padding on left and right. I checked for inheritance but can't find anything.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.