• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

Thumbnail viewer w/close window button

I am trying to have an image viewed from a thumbnail.

Problem is that the page I am coming from is an onload popup. When user clicks on the thumbnail they do get the larger image but when they "X" out of the new window created for the larger image it drops them out of the popup. I think I need a "Close Window" button on the thumbnail viewer page so it will get user back to the original (onload popup) page. Instead of closing the original popup page.

The (popup) page and website is at http://tchnet.cjb.net .

I have not been able to figure out how to add a "Close Window" button to a thumbnail viewer page, if thats the best way to go.

Thanks
0
READER
Asked:
READER
  • 6
  • 5
  • 3
  • +1
1 Solution
 
brunoCommented:
hey that's a big page, where am i looking?
0
 
bebonhamCommented:
use an onunload code...

very simpe I guess

window.onunload=window.opener.focus
0
 
bebonhamCommented:
other wise if your situation is not as I understand it per my answer, you can explicity name the opener...or you can even do this same on lost focus, which might work too.

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
READERAuthor Commented:
bebonham

Thanks for response.

I'm a Javascript neophyte. Mostly use pre-written scripts.

Can you provide some more detail on how I would go about implementing your comment?

brunobear... You should get a popup when you go to http://tchnet.cjb.net . The popup page gets closed after you click on one of the thumbnail pictures. I want it to stay open so user can click on other pictures.
0
 
brunoCommented:
ah, i msut have had scripting off before...

by the way, i'll never click that link again as i got a prompt to install Gator.


But what you are doing is just loading the actual picture into the popup window.  don't do this.

instead of linking to the picture, link to an HTML page that has the picture in it, so you can put a back button on the html page..


<a href="#" onclick="history.go(-1);">go back</a>



BRUNO
0
 
bebonhamCommented:



so you must make an html page for each image and on that page have
<SCRIPT>
window.onunload=window.opener.focus
</SCRIPT>
<IMG SRC="whatever">


sorry, I don't think there is any other way...
I tried some expeiments without using an html page...

like
dd=window.open(jpgname)
dd.onunload= --problem here--

so...
you will have to make the html pages
0
 
brunoCommented:
or at least ONE html page, if you can use ASP it's easy to pass the image you want loaded at a parameter to the page, you can do it with javascript as well, but i don't know the lingo...


for ASP it would be like:


<%
imgFile = Request.Querystring("img")
%>


<img src="/images/<%=imgFile%>">

<br><br>

<a href="#" onclick="history.go(-1);">go back</a>



and the URL to get to the image would be like

<a href="image.asp?img=picture1.jpg"><img src="/images/picture1_thumbnail.jpg"></a>



hope that all makes sense


0
 
READERAuthor Commented:
Creating seperate HTML pages for every picture sounds kind of onerous. (Don't want to do unless I am forced to)

Any chance you could have the thumbnail viewer (xthumbnail-orig-image) come up with a "Close window" button? Maybe using a style sheet or some additional parameters?

The tag I am using for the thumbnail is as follows:

<a href="TCccandrpic45b.jpg">
        <img border="0" src="TCccandrpic45b_small.jpg" xthumbnail-orig-image="TCccandrpic45b.jpg" width="137" height="106"></a>
0
 
brunoCommented:
>>Creating seperate HTML pages for every picture sounds kind of onerous. (Don't want to do unless I am forced to)


did you not see my comment above where i said it could be done with ONE page, and even provided you with code?
0
 
READERAuthor Commented:
I don't know ASP (from a hole in the ground!!) {}:-)
0
 
brunoCommented:
well, the same exact think can be accomplished with any server side scripting your server supports, OR javascript....i just don't know the javascript lingo, but SOMEONE here should!!!


BRUNO
0
 
READERAuthor Commented:
I found a javascript myself that solved the problem at
http://www.javascriptcity.com/scripts/new_submissions/usersub1012.htm

Its working great now. http://tchnet.cjb.net

Thanks for your help
0
 
brunoCommented:
you can ask in CS for this to be resolved.  You can NOT however leave it open.
0
 
READERAuthor Commented:
I have asked CS to have this question deleted.

Thanks
0
 
Computer101Commented:
Points refunded and placed in PAQ

Computert101
E-E Moderator
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 6
  • 5
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now