Opening a website in new browser window

P

pc

How do I get a link inside Publisher 2007 to open up a website into a new
browser window?

For example, I want to provide the convenience on my web site for a viewer
to clike a link to see valuable content, without leaving my site entirely. I
don't want them to have to click their back button, rather still see my
navagation bars while they view the other site.
 
M

Mike Koewler

For all intents and purposes, this isn't feasible. It's akin to wanting
to wanting to watch your fireplace when you visit the neighbors down the
street.

The only thing you might try, and I don't recommend it, would be using
an i-frame to contain the site. I would bet it will look like crap, though.

Mike
 
D

DavidF

Actually it is possible to code a link so that it opens in a new window
Mike. There are at least two ways in Publisher. Reference: Create a
hyperlink in Publisher that opens in a new window:
http://office.microsoft.com/en-us/publisher/HA011587451033.aspx

However, the ECMAScript method has a code error. This error was caught by
another poster who said:

"The problem with the script on page HP030805631033.aspx is that it includes
'comment out' code, meant to prevent older browsers from displaying the
script as HTML. The script does work if you remove the 'comment out' code.


The script on page HP030805631033.aspx is: <script language="JavaScript"
type="text/javascript"> <!-- function Show(Url, Name, Features) {
window.open(Url, Name, Features); } // --> </script>.


To make it work use: <script language="JavaScript" type="text/javascript">
function Show(Url, Name, Features) { window.open(Url, Name, Features); }
</script>


This is the same script, but without the 'comment out' code of <!-- and //
-->."

I use both methods, and can confirm they both work with the change in the
code snippet.

DavidF
 
R

Rob Giordano \(Crash\)

And, let's not forget some people don't allow, or want, their webpages to
be framed...so best to ask permission first.

--

Rob Giordano
Microsoft MVP - FrontPage





| Actually it is possible to code a link so that it opens in a new window
| Mike. There are at least two ways in Publisher. Reference: Create a
| hyperlink in Publisher that opens in a new window:
| http://office.microsoft.com/en-us/publisher/HA011587451033.aspx
|
| However, the ECMAScript method has a code error. This error was caught by
| another poster who said:
|
| "The problem with the script on page HP030805631033.aspx is that it
includes
| 'comment out' code, meant to prevent older browsers from displaying the
| script as HTML. The script does work if you remove the 'comment out' code.
|
|
| The script on page HP030805631033.aspx is: <script language="JavaScript"
| type="text/javascript"> <!-- function Show(Url, Name, Features) {
| window.open(Url, Name, Features); } // --> </script>.
|
|
| To make it work use: <script language="JavaScript" type="text/javascript">
| function Show(Url, Name, Features) { window.open(Url, Name, Features); }
| </script>
|
|
| This is the same script, but without the 'comment out' code of <!-- and //
| -->."
|
| I use both methods, and can confirm they both work with the change in the
| code snippet.
|
| DavidF
|
|
|
| | > For all intents and purposes, this isn't feasible. It's akin to wanting
to
| > wanting to watch your fireplace when you visit the neighbors down the
| > street.
| >
| > The only thing you might try, and I don't recommend it, would be using
an
| > i-frame to contain the site. I would bet it will look like crap, though.
| >
| > Mike
| >
| > pc wrote:
| >> How do I get a link inside Publisher 2007 to open up a website into a
new
| >> browser window?
| >>
| >> For example, I want to provide the convenience on my web site for a
| >> viewer to clike a link to see valuable content, without leaving my site
| >> entirely. I don't want them to have to click their back button, rather
| >> still see my navagation bars while they view the other site.
|
|
 
M

Mike Koewler

David,

I guess I wasn't being clear. It's not real hard to open a page, either
in a new window or the same one (it the OP's case, I don't see it making
a huge difference, as he wants to keep his nav bars and not leave his
site), but it's problematical making the iframe the correct size. The
Pub page's frame would have to be long enough to hold the target page or
a viewer will get a vertical scroll bar. Ditto for the width. And links
on the target page may bring up pages that are much longer or shorter.

I've done this but usually am calling a php page, such as a survey which
is not deep and automatically adjusts to the page width. But imagine if
the target site has its own nav bars - it's likely going to be a
hideously designed view presented to the visitor.

Basically, if I'm so concerned about keeping a visitor on my site that
I'll do everything possible to prevent it, I wouldn't put any off-site
links on it!

Mike
 
D

DavidF

Hi Mike,

I see your point. I was reading it another way, and just thought the OP
wanted to open in a new browser window. Obviously I was wrong, and should
read things more carefully. Thanks for the clarification.

DavidF
 
P

pc

DavidF thanks for your reply. You understood what I was asking. I've
forwarded your post to my web guy to "do the detail work" .
 
P

pc

I am complying with the other site's requirements, but it's always good to be
reminded of proper etiquette in a community forum such as this. Thanks!
 
M

Mike Koewler

David,

I may have read it wrong, based on the OP's post below. Perhaps he meant
he simply wanted a new window to open but his scroll bars would be
available if someone closed the new window.

My ESP has left the building. But on the plus side, I have more than a
bushel of tomatoes to make juice from!

Mike
 
D

DavidF

Hey...half the challenge...sometime more than half the challenge is
understanding the questions from posters. And about half the time I guess
wrong. But then if they knew exactly how to phrase and ask the question,
they would probably already know the answer. The OP's question could have
been read either way, so now PC knows there are a number of ways to approach
their project.

I am totally jealous of your tomatoes. As you know I don't get vine ripened
tomatoes anymore.

DavidF
 
M

Mike Koewler

David,

If you are ever down Cincy way in the next month or so stop by - I'll
fill your basket with tomatoes.

But I'm not sure I would be jealous - these things are becoming a lot of
work. So far, I have about 110 quarts of juice, plus 14 quarts and 14
pints of whole tomatoes. I've preserved some other stuff also, like 32
quarts of green beans, 14 pints of dill pickles, a bunch of dehydrated
summer squash, eggplant and zucchini.

Right now, my hands are on fire. Made the mistake of getting pepper
sauce on them. I ground up some Hungarian Hot Wax, jalapeno, Thai Dragon
and Habenero peppers. Got some of the juice on the back of my hands.
They burn like heck right now.

Back to the stove!

Mike
 

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