Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Enthusiast Zone > Art & Graphic Design > What can you use instead of the iFRAME element?

What can you use instead of the iFRAME element?
Thread Tools
Veltliner
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Jan 28, 2009, 01:47 AM
 
I'm trying to do this:

Have about 20 thumbnails on a page, and one frame.

Whichever thumbnail you click, this image appears in the frame.

I was recommended to use iframe, but it's not xhmtl strict. (I'm just learning html, so I go with the newest standard).

My research led to the object tag, and ended there. I have no idea how to create such a frame with the object tag.

Additional question: what if the images have different pixel dimensions? Can you do that in html at all, or do you need javascript?

Is it better to embed a ready-made flash slide show? (I prefer incorporating everything into my own design, but who knows: maybe I'm aiming too high for an html beginner).

Thanks!
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jan 28, 2009, 02:48 AM
 
A div tag with overflow set to scroll, dimensions defined, and Javascript used to dynamically modify the HTML contents of the div tag block.
     
Veltliner  (op)
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Jan 28, 2009, 05:33 AM
 
I thought I had to learn Javascript, too.

Well, looks like I have to get a better html book, too. Div I used so far only regarding id, defining logical blocks for float, etc.

So I'd better try to get some slideshow like couloir to embed in a page.

Regarding Javascript: there are so many flavors out there. What's your opinion to that?
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jan 28, 2009, 11:46 AM
 
There is only a single flavor of Javascript, but there are many toolkits used for making certain things easier in Javascript. I personally really like Prototype. What you want to do would require just a few lines of code with Prototype.
     
Veltliner  (op)
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Jan 28, 2009, 02:59 PM
 
I'm already browsing for Javascript books. One has been written in 2004? Could it be outdated?
     
Synotic
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
Feb 25, 2009, 02:19 AM
 
Originally Posted by Veltliner View Post
I'm already browsing for Javascript books. One has been written in 2004? Could it be outdated?
Yes. JavaScript is a moving target. For understanding the fundamentals, it's probably fine (particularly if it's Flanagan's), but for actual functioning code, you'll want something a little more recent.

I used to be big fan of Prototype. Then I was a big fan of YUI (I'm still a fan of it for certain things), but take a look at jQuery. It's lightweight and easy to pick up.
     
Veltliner  (op)
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Feb 25, 2009, 04:38 AM
 
Originally Posted by Synotic View Post
Yes. JavaScript is a moving target. For understanding the fundamentals, it's probably fine (particularly if it's Flanagan's), but for actual functioning code, you'll want something a little more recent.

I used to be big fan of Prototype. Then I was a big fan of YUI (I'm still a fan of it for certain things), but take a look at jQuery. It's lightweight and easy to pick up.
I saw there are many toolkits of Javascript out there.

Don't you think I should get a good book of the basics? Or do you know a book that teaches the basics AND has modern applications in it?

I heard about JQuery.
     
Veltliner  (op)
Mac Elite
Join Date: Nov 2006
Location: here
Status: Offline
Reply With Quote
Mar 17, 2009, 12:39 AM
 
Follow-up:

I got the iframe element to work fine, but I disabled scrolling.

Some images are less width than the iframe, but I set the background to black so it's not that bad.

As soon as I have learned some Javascript, I'll turn this solution into a more elegant one. But as it is, it works.

Javascript must be really important.

At the moment I notice, that images only load, when you click on a thumbnail, but I want them to load in the background. Maybe I could use an @import - not completely through with my apress html/css book.

After that, I'll get this book from the missing manual series.

It focuses on cross-browser compatible, easy to embed solutions without hassling too much on cleaning up the code on your own, using the JQery library.

http://www.amazon.com/exec/obidos/tg...X0DER&v=glance
     
Oisín
Moderator Emeritus
Join Date: Mar 2004
Location: Copenhagen
Status: Offline
Reply With Quote
Mar 17, 2009, 06:39 AM
 
At the moment I notice, that images only load, when you click on a thumbnail, but I want them to load in the background.
This is fine—but be aware that if you have 20 large images, your page will load a lot slower this way.

The easiest way (I’ve found) to do this is to simply put each image in a separate div element with the same class (but with distinct inline CSS styling to get the right size for the div, according to the actual size of the image it contains), and then using a simple JavaScript toggle function to switch the visibility/display type of the div, i.e., to hide or show the div when a thumbnail is clicked on.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:44 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,