Topic awaiting preservation: Dynamic image not text (Page 1 of 1) |
|
---|---|
Neurotic (0) Inmate Newly admitted |
posted 01-16-2002 22:28
Ok Im looking for a way to display an image on page by clicking on a link. Awile back I was working with image scripts and pop-ups for thumbnail galleries, but this won't look right for this. I have this page that has some links on it. When I click on the link I want an image to be inserted below the links. I know how to do this with text, but with an image how would I do that. I do not want a pop-up of the image. |
Maniac (V) Mad Scientist From: New California |
posted 01-16-2002 23:12
The first thing that comes to mind is to do a document.write or innerHTML to a div on your page. You can write anything you want into it. I would make sure the image was pre-loaded so you didn't have to wait for it after the click. |
Neurotic (0) Inmate Newly admitted |
posted 01-16-2002 23:23
Yeah I have a place right under the links where I want the images to go. I'm not sure what you mean by "squeeze" in the image. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 01-16-2002 23:42
Bugs is suggesting the simplest way is to just use an image swap with a transparent gif and the image you want displayed. (If you already have the space). code: mmmmmmmmmm
|
Neurotic (0) Inmate Newly admitted |
posted 01-16-2002 23:53
Is there a way to make the image floating? Cause I'm really starting to think that maybe the image should jsut be inserted and be able to be dragged and moved. That way I wouldn't have to rezise anything and worry about expanding the content or trying to make a space where everything will fit. Most of the images can go in one spot, but some of these are flyers and posters and alot of them have diffrent heights and widths which won't look right if I resize them. The image swap thing would be great for a thumbnail section or navigation. Sorry if I am changing ideas in mid stream on you. It's just that I was thinking on a one page deal, but I realized that I want this on all the pages and the content changes from page to page alot. |
Maniac (V) Inmate From: Brisbane, Australia |
posted 01-17-2002 09:46
So, now you want an image to apear that you can drag around. |
Neurotic (0) Inmate Newly admitted |
posted 01-17-2002 15:00
I'd still prefer to use dhtml. I hate pop-ups even though I sometimes use them for this, but if I do I'll check out your script bugimus (The one that resizes to fit the image) |
Neurotic (0) Inmate Newly admitted |
posted 01-17-2002 17:09
Hey bugimus I decided to use you script for right now, but I can't seem to find out what is not making it work. I didn't change "anything" in the code and it isn't working. code: <html>
|
Bipolar (III) Inmate From: midair |
posted 01-17-2002 18:40
you want to click and have an image appear.. |
Maniac (V) Mad Scientist From: New California |
posted 01-17-2002 20:18
Dark, |
Neurotic (0) Inmate Newly admitted |
posted 01-18-2002 20:24
Still not working. code: [b]46:[/b] w.document.write( "</script>\n");
|
Maniac (V) Mad Scientist From: New California |
posted 01-19-2002 02:30
It is better to call the js file with a link tag like this: |
Neurotic (0) Inmate Newly admitted |
posted 01-19-2002 05:48
Cool, heh yeah you should have added that in. |