open a Jpg file in a new browser window.

S

Sarah0824

Help!! I need to create a link that enlarges a picture in a new browser
window. I have done this before, but not with jpg images. I copied
everything from when I did this before...I put the following html code
fragment on the page:

Name, Features) { window.open(Url, Name, Features); }</script>


Then in the hyperlink to the larger picture, I am using the following:

javascript:Show('http://mydomain.com/ProductPictures...rollbars=no,resizable=no,height=500,width=750')

For the life of me, I cannot figure out what I am doing wrong. I have tried
many different hyperlinks - just the folder and file name, using a PDF, etc.,
but nothing is working. I'm sure its something simple that I am just
overlooking.

Please help me!
 
S

Sarah0824

I'm sorry - that wasn't a very accurate hyperlink. I do actually have the
correct domain name in the link. Does anyone see anything else I am doing
wrong?
 
S

Sarah0824

I had 'newwindow' in there before, but I took it out trying to make this
work. According to the article I read about this on the MS website, you can
put anything in that section as it will serve as the title of the new page
that opens. Just to be sure, I put it back in right before I started to
write this, but still no luck. The article said you can even leave it blank
if you don't want a title on the page. I even went back and changed
everything to lower case. I double-checked the link and the picture does
show up if I put that in my browser. I even copied and pasted that link
right into the hyperlink, still doesn't work.

By doesn't work, I mean nothing happens when I click on the link. The only
thing that is unusual in the browser window is a small exclamation point on
the bottom left corner and it says Error on Page.

I did this before on another site. As soon as I found out that there was an
error in the JS that is inserted into the code fragment, I had no problems.
This time I copied the code from the other site where I know its working.
The only differences between this instance and the previous site that I can
think of are that the previous site was created in Pub 03 and is linking to
an htm file. This time I am using Pub 07 and linking to a jpg. From what
I've read this part of Publisher should work the same in 07 as it did in 03,
right?

Please help - I'm losing a lot of sleep over this! Thank you!
 
D

DavidF

I have tested the code in Pub 2000, 2003 and 2007, and it does work. I have
also had the occasion to get an error or it not work for me too. Once it was
because I had forgotten to insert the first code snippet into that
particular page. Another time it was because I had an extra space in the
link. I finally started building the links in a NotePad text file with the
Word Wrap unchecked, so I would always get one long line of clean,
unformatted, plain text code to copy and paste into the hyperlink address
field. It is frustrating when you can't spot the extra space, the lack of a
comma, or some other little thing in the code...and that is one of the
reasons I still use Publisher. I just don't want to have to deal with those
coding issues as a general rule.

About the only suggestion I have is that the original code for the link
actually had www as part of the URL, so you might add that back in. Also go
back to the publication where you were able to get everything working and
start over by copying the code fragment box that contains the first code
snippet and pasting to the new publication. And copying the link that works
to a NotePad text file, edit there with the different URL, copy and paste.

Obviously it is something small that is creating your problem, but it is
impossible to tell you what it is from here. If you want to post the URL to
the page and link that is failing, we can look at the actual code for you.
Beyond that, get out your magnifying glass and study the code you are using
until you find the error. You will probably kick yourself when you find it.
Sorry.

DavidF
 
S

Sarah0824

Well, I'll be!! I did what you suggested building the links in Notepad first
and it worked the first try. You have no idea how relieved I am!! Thank you
so much for your help and patience!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top