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

Microsoft Publisher - Open Web Page in New Window

First, YES I KNOW I SHOULD BE USING ANOTHER UTILITY to create web pages.

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 (http://office.microsoft.com/en-us/publisher-help/answer-box-create-a-hyperlink-in-publisher-that-opens-in-a-new-window-HA001158745.aspx) 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) { window.open(Url, Name, Features); } // --> </script>

The code used as the Hyperlink from the article is:

javascript:Show('http://www.fourthcoffee.com/ ', 'newwindow', 'toolbar=no,scrollbars=yes,resizable=yes,height=250,width=250')

And I for testing changed the URL to msn.com.

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.

0
FarrellFritz
Asked:
FarrellFritz
1 Solution
 
Jason C. LevineNo oneCommented:
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?
0
 
FarrellFritzAuthor Commented:
Sounds like a plan
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now