|
|
What can you use instead of the iFRAME element?
|
|
|
|
Mac Elite
Join Date: Nov 2006
Location: here
Status:
Offline
|
|
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!
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
A div tag with overflow set to scroll, dimensions defined, and Javascript used to dynamically modify the HTML contents of the div tag block.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Nov 2006
Location: here
Status:
Offline
|
|
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?
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Nov 2006
Location: here
Status:
Offline
|
|
I'm already browsing for Javascript books. One has been written in 2004? Could it be outdated?
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Oct 2000
Status:
Offline
|
|
Originally Posted by Veltliner
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.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Nov 2006
Location: here
Status:
Offline
|
|
Originally Posted by Synotic
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.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Nov 2006
Location: here
Status:
Offline
|
|
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
|
|
|
|
|
|
|
|
|
Moderator Emeritus
Join Date: Mar 2004
Location: Copenhagen
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|