![]() Topic awaiting preservation: Dynamic image not text (Page 1 of 1) |
|
---|---|
Neurotic (0) Inmate Newly admitted |
![]() 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 |
![]() 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 |
![]() 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 |
![]() 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 |
![]() 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 |
![]() So, now you want an image to apear that you can drag around. |
Neurotic (0) Inmate Newly admitted |
![]() 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 |
![]() 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 |
![]() you want to click and have an image appear.. |
Maniac (V) Mad Scientist From: New California |
![]() Dark, |
Neurotic (0) Inmate Newly admitted |
![]() Still not working. code: [b]46:[/b] w.document.write( "</script>\n");
|
Maniac (V) Mad Scientist From: New California |
![]() It is better to call the js file with a link tag like this: |
Neurotic (0) Inmate Newly admitted |
![]() Cool, heh yeah you should have added that in. |