Microsoft Publisher - Open Web Page in New Window


That said, I'm using MS Publisher to create a web page on which I have a need to open new web pages in a new window.

Found this post ( which seems pretty straightforward and woudl like to use the ECMAScript code approach but cannot get it to work.

If I set it up in Publisher 2007, I get NO error inserting the (first) HTML Code fragment, but then when I use the second fragment as the Hyperlink (modifying it with the new URL), clicking on it (in Web Page Preview) does nothing.

If I add the (first) HTML code fragment in Publisher 2010, I am presented with the following error:

"This HTML Code Fragment includes the HTML tag >. Thsi tag is not appropriate for the code fragment and should not be included. Would you like to edit the HTML code fragment to remove the tag?"

If I select NO, it allows me to add the code and continue, but I get the same results upon execution that I get with Pub 2007.

The code fragment from the article added as HTML CODE FRAGMENT (first) is:

<script language="JavaScript" type="text/javascript"> <!-- function Show(Url, Name, Features) {, Name, Features); } // --> </script>

The code used as the Hyperlink from the article is:

javascript:Show(' ', 'newwindow', 'toolbar=no,scrollbars=yes,resizable=yes,height=250,width=250')

And I for testing changed the URL to

Certain it is just a syntax issue and I'm just being dumb.

     Note: the HTML Code Approach works but is ugly to work with and poses its own challenge from within text boxes.

Any help appreciated.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineDon't talk to me.Commented:
Hi FarrellFritz,

Instead of fixing it in Publisher, why not let Publisher output the HTML and then go into that file in Notepad and add the appropriate javascript?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FarrellFritzAuthor Commented:
Sounds like a plan
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.