Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Website gallery

Featured Replies

Hi all,

 

I use an old programe called E-Mage for Web and a hand coded html template, to create image galleries. In IE8, the gallery loads fine and when you click on an image, an enlarged version appears. Clicking back, or on the image itself goes back to the gallery, at the same point on the page that you were at.

 

Now...in Firefox, the gallery loads fine, and the enlarged image loads fine, but when you click on the image or the back button, the browser goes back to the gallery, but right back at the top of the page. You then have to scroll down to point in the gallery where you'd found the image. Frustrating.

 

This is where things get weird...in Chrome, the gallery loads fine, and the enlarged image works fine, but clicking back, or on the image takes you to some totally random page on the site! What on earth is that all about?

 

The template and E-mage use pretty old Javascript to create the gallery. I use E-mage because it's all automated and saves me a lot of time adding new images. The template uses valid XHTML 1.0 Strict, valid CSS2 (with the exception of some mozilla mods) and the Script is all valid too. I have been meticulous in ensuring everything validates.

 

So - what is making Firefox jump to the top of the gallery, and why is Chrome just acting weird?

 

In IE - everything works brilliant!

 

Now I know that I could probably do with updating to jQuery or some clever CSS3 gallery alternative - but I just don't have the time. Besides, all 3 browsers were acting exactly the same way up until 3-6 months ago. All did what IE8 does now. So it can't be my code, can it?

 

One of the galleries is here: http://www.cardiffians.co.uk/adamsdown/index.shtml

 

Now I know it's an amatuer looking affair, but the site is more about content, rather than design - trying to balance both is tough with very little free time! lol

 

If you can replicate what I described in my post, using the 3 browsers - maybe you could please offer some advice?

 

I look forward to hearing your expert opinions.

 

Regards,

 

Matt

Hi Mate,

 

You are going to have constant issues coding layouts with huge images and tables. You need to take this site and create div's and use a Stylesheet. If you want to learn I'd take a look at the CSS box model, this will help you re structure the website.

 

If you would like a chat, drop me a PM and we can go from there, cheers buddy.

  • Author

Hello glenwheeler,

 

Thanks for your response.

 

You're right about the tables - I forgot about the role they played in the construction of the gallery. I thought that making all the code validate would ensure they worked in Chrome and Firefox (which they do sort of) and was not hugely bothered if they did not function perfectly in IE. But it's the other way round! It's only the clicking on the image to go back to the gallery that causes the problem (or clicking back in the browser). Surely this is a simple fix? Is there a method of ensuring the browser goes back to exactly the same point you were at (like IE) rather than jumping to the top of the page like Firefox, or any page it chooses by random like Chrome.

 

Using divs and css would make E-Mage defunct, and all updates would have to be manual. At present, if I add 20 images, it takes E-Mage 5 seconds to create the html, thumbnails, large images and then even creates a directory structure so I can upload the files without touching the rest of the site - bliss!

 

Though that said - I have been slowly removing tables from other pages and replacing them with divs. I was going to leave the galleries until such time that tables just stopped working. But this is not the case. It's just that click back that's causing this problem.

 

if you have any suggestions for software that creates css galleries - I'd be very interested to hear!

 

Thanks,

 

Matt

  • Author

Ah now this is interesting....I shall have a rummage through my code and see if this fix works for me. Very much appreciate the link. Still on the lookout for an automatic CSS/Div software gallery building alternative, but for the meantime this gives me something to work with.

 

Thank you!

 

Matt

Hi all,

 

I use an old programe called E-Mage for Web and a hand coded html template, to create image galleries. In IE8, the gallery loads fine and when you click on an image, an enlarged version appears. Clicking back, or on the image itself goes back to the gallery, at the same point on the page that you were at.

 

Now...in Firefox, the gallery loads fine, and the enlarged image loads fine, but when you click on the image or the back button, the browser goes back to the gallery, but right back at the top of the page. You then have to scroll down to point in the gallery where you'd found the image. Frustrating.

 

This is where things get weird...in Chrome, the gallery loads fine, and the enlarged image works fine, but clicking back, or on the image takes you to some totally random page on the site! What on earth is that all about?

 

The template and E-mage use pretty old Javascript to create the gallery. I use E-mage because it's all automated and saves me a lot of time adding new images. The template uses valid XHTML 1.0 Strict, valid CSS2 (with the exception of some mozilla mods) and the Script is all valid too. I have been meticulous in ensuring everything validates.

 

So - what is making Firefox jump to the top of the gallery, and why is Chrome just acting weird?

 

In IE - everything works brilliant!

 

Now I know that I could probably do with updating to jQuery or some clever CSS3 gallery alternative - but I just don't have the time. Besides, all 3 browsers were acting exactly the same way up until 3-6 months ago. All did what IE8 does now. So it can't be my code, can it?

 

One of the galleries is here: http://www.cardiffians.co.uk/adamsdown/index.shtml

 

Now I know it's an amatuer looking affair, but the site is more about content, rather than design - trying to balance both is tough with very little free time! lol

 

If you can replicate what I described in my post, using the 3 browsers - maybe you could please offer some advice?

 

I look forward to hearing your expert opinions.

 

Regards,

 

Matt

Hi,

It is simple just provide a anchor link to the clicked image in back link this makes when back link i mean image is clicked to proceed back page will remain on image which is clicked to see it enlarge if I'm Not clear please let me know :)

  • Author

Hi there Mahesh10,

 

Thanks for responding. I know what an anchor link is, but am not sure how to do what you suggest. Below is the javascript and html that E-Mage uses to generate the images...

 

<!--EM LOOP Count=Gallery.Rows-->

<tr>

<!-- Thumbnails -->

<!--EM SAVEPOS-->

<!--EM LOOP Images=Gallery.Cols-->

<td style="width: 100%" class="thumb" ><img class="thumb" src="%Thumb.URL%" alt="%Image.Name%"

onclick="JavaScript:ShowImage('%Image.URL%','%Image.Width%','%Image.Height%');" /></td>

<!--EM NEXT-->

<!--EM END-->

<!--EM RESTORE-->

</tr>

<tr>

<!-- Captions -->

<!--EM LOOP Images=Gallery.Cols-->

<td class="caption"

onmouseover="this.className='highlight'" onmouseout="this.className='caption'"

onclick="JavaScript:ShowImage('%Image.URL%','%Image.Width%','%Image.Height%');">

%Image.Name%</td>

<!--EM NEXT-->

<!--EM END-->

</tr>

<!--EM END-->

 

 

The rest of the page is just layout, menu, etc and as far as I am aware has no impact on how the clicking on the image (or back on the browser) causes the problem I'm experiencing. Why is that Chrome, the supposed best of all browsers goes mental and jumps to a completely different page when clicking back? At least Firefox gets it almost right! lol

  • Author

Hi Mahesh10,

 

Not heard from you in while so checking to see if you were still able to help me sort out the anchor suggestion? Since last posting I have been exploring avenues like lightbox galleries (VisualLightBox) which look really nice, but would completely disrupt my site map and google rank by significantly changing how the galleries work and where they are located. Plus I think the effects and extra code are overkill. I need an automated solution which gives me the simplest of effects. The only way I can see happening is if I do it one by one myself.....groan....at least it would permanently fix the problem on all browsers.

 

Can anyone suggest some jQuery or Lightbox gallery creation software if the anchor suggestion does not work? I still haven't tried the http://simonthegeek.com/technical/history-back-problems-with-chrome-and-safari/ suggestion - maybe if I have time I'll test it this weekend.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.