DPChallenge: A Digital Photography Contest You are not logged in. (log in or register
 

DPChallenge Forums >> General Discussion >> html guru's ????
Pages:  
Showing posts 1 - 14 of 14, (reverse)
AuthorThread
02/19/2004 02:03:25 AM · #1
this isn't a rant.. so i'm putting it here.

I am wanting to create a link from one site to an image on another page... when you click the link, i want the image to appears on the new page, i want it to be centered and have a black background. Is there a way i can do this without creating a seperate webpage for each image.
Or perhaps can i create one webpage, that gets the image name from the link ... and then loads that image on the page.... ya know...

here
there is an example of what i mean. this is not my page, but it gives an example. if you click on one of the images, the large view opens up in a new page.... but with a white background, and left-top justified. I want it centered with a black BG .... and don't want to create a seperate webpage for EVERY image.
02/19/2004 02:29:27 AM · #2


you can change the pixel width and height, but the background color...i don't know.

02/19/2004 02:48:43 AM · #3
The example you gave has links to actual .jpg files, all it does is displays the jpg file, nothing else. The white background is only there because the file is smaller than the page dimension. If you want them to have a black background you need to make a seperate page with the images displayed there.

If you click here and click on one of the thumbnails it will take you to a new html page. That is the page that can have it's background changed.
02/19/2004 04:04:30 AM · #4
I have done something similar on my website (for example see my Black and White gallery)

It involves having a web-page called display.html which uses javascript to parse the filename of the picture to be displayed out of the url used to open that page. The code in the gallery page is:

Fence

To make it open a new window all you would have to do is add target="blank" to the a tag:

Fence

Feel free to download and use a copy of my display.html file. If you do make it open a new window, you will need to alter display.html to remove/change the "Back to Gallery" link:

change javascript:history.go(-1) to javascript:window.close(self);

If you have any more questions, please feel free to contact me.


02/19/2004 08:12:08 AM · #5
Originally posted by spoons:



you can change the pixel width and height, but the background color...i don't know.


I used the examples on this page to build something similar - they use Javascript the same way you describe, but also use the Document.Write method to create an HTML page on the fly. While they do not do it here, it seems like you could modify it fairly easily to (A) Center the image) and (B) Change the background color.

//www.fontstuff.com/casebook/casebook03_BAK.htm

For what it's worth, I used this tutorial as it was written, in order for a link to produce an image in a new, non-resizeable browser window of the same dimensions as the image. Nice and clean.

Rich.
02/19/2004 12:56:11 PM · #6
Originally posted by brownt:

The example you gave has links to actual .jpg files, all it does is displays the jpg file, nothing else. The white background is only there because the file is smaller than the page dimension. If you want them to have a black background you need to make a seperate page with the images displayed there.

If you click here and click on one of the thumbnails it will take you to a new html page. That is the page that can have it's background changed.


yeah i know what you mean, but that is what i was trying to get away from. You have created a seperate webpage (in design time) for eachimage. What i did not want to do. I want the jpg image to be created or put in a 'template' webpage at run time.. so that i only need one display page with many jpg images that can upload in it...

i think the other replies though hit the nail on the head. thanks, and i will show you the results when i get it completed.
02/19/2004 01:17:36 PM · #7
Originally posted by leaf:

I think the other replies though hit the nail on the head. thanks, and i will show you the results when i get it completed.


Realised I hadn't read your original thread properly.

Seeing the links below might have a wee try of it myself.
02/19/2004 01:28:35 PM · #8
does this every happen to anyone?

i try to click on 'view source' on a web page, and it doesn't load anything. is there perhaps something wrong with my computer.
02/19/2004 01:35:02 PM · #9
Originally posted by leaf:

does this every happen to anyone?

i try to click on 'view source' on a web page, and it doesn't load anything. is there perhaps something wrong with my computer.


What web site is it?

There is coding on some sites to stop you viewing the code, or if they are using frames, make sure you're clicking on the right frame.
02/19/2004 02:07:46 PM · #10
I've had the problem with the "view source" option before... you probably need to clean out your temp files. That's what fixed it for me :)
02/24/2004 12:51:20 AM · #11
I DID IT, I DID IT...

i am FINALLY DONE.... and here is the link to my newly remodled website... MUCH thanks to everyone who helped... and especially to paynekj for making, and letting my use his display.html code/website... i modified it a little bit, but mostly kept it the same.. it was a life saver... so with no further adu... check it out and give any coments you wish.
HERE IT IS :)
02/24/2004 04:09:47 AM · #12
leaf,

you have a couple of technical problems with your web-site:

a) it doesn't work at all well with Mozilla/Netscape, as the frames are squashed.

b) you seem to have developed the web-site on a big monitor (>768 pixels high) as both the main frame and the thumbnail frame have vertical scroll-bars, and this is a major problem for the main frame, as moving the mouse off the thumbnail to move the scrollbar causes the picture (and scrollbar) to fade out.

However, from what I could see, they are nice pictures.

kevin
02/24/2004 03:24:48 PM · #13
allright.. i think i have set that in order now.. so if you look at the site using a monitor with very low resolution, it shouldn't show any scroll bars on the image. the thumbnails will probably be too large too, to look good, but i think it should at LEAST work now.

as for netscape... yeah... i dunno i guess i could fix that in the future, but only 4% of my visitors use netscape, so i won't make it a high priority.
02/24/2004 03:25:31 PM · #14
oh yeah..and no i don't have a BIG monitor.. just one with small printing. i put the resolution on my lap top up to the highest.. 1048X1400 or something.
Pages:  
Current Server Time: 09/22/2025 07:03:21 PM

Please log in or register to post to the forums.


Home - Challenges - Community - League - Photos - Cameras - Lenses - Learn - Help - Terms of Use - Privacy - Top ^
DPChallenge, and website content and design, Copyright © 2001-2025 Challenging Technologies, LLC.
All digital photo copyrights belong to the photographers and may not be used without permission.
Current Server Time: 09/22/2025 07:03:21 PM EDT.