Logo To Open In New Window

  • Thread starter Administrative Assistant
  • Start date
A

Administrative Assistant

I am using MS Publisher 2007. I have a United Way logo on a page and I want
users to be able to click on the logo and it go directly to the United Way
website in a new window.

I read all the posts and FAQs and I have inserted what my code looks like.
What am I doing wrong?

<p style="font-family:trebuchet ms;font-size:50%"><a
href="http://www.unitedway-cc.org/" target="_blank">United Way of Cumberland
County</a></p></a>

The above code places a text hyperlink but how do I insert the saved logo.
The logo is saved in My Documents as United Way.jpg

Any help is appreciated.
 
S

Spike

In publisher
Right click on the logo on the page in question
Select Hyperlink
Insert http://www.unitedway-cc.org/ in the address
Select OK
Place the curser over the logo and it will show the link assigned to it
Then when published, the logo will link to the site when someone clicks on
it

Spike

"Administrative Assistant"
 
A

Administrative Assistant

Thank you for your response Spike but that is not the answer to my question.
I want the user to be able to click on the United Way logo and go to the
United Way site but the United Way site needs to open in a "new window".

I previously set the hyperlink as you described before I did my first
initial post but what happens is the user clicks on the United Way logo and
the United Way site opens in the same window, having the user leave our site.
 
D

DavidF

The easiest solution is insert the logo, and put the code snippet you are
using below the logo. I would suggest that the 50% font size is way too
small though.

A second solution would do away with the text in the link:

<A target="_blank" HREF="http://www.unitedway-cc.org/"><IMG
SRC="http://www.yourwebsite.comz/images/logo.gif" ALT="United Way of
Cumberland" border="0" width="120" height="60"></A>

You would have to create a folder on your host called "images" at the same
directory level as the index.htm file and the index_files folder. Upload
your United Way logo image, and call it "logo.gif" assuming that you use a
..gif file. Change the width and height to match the logo dimensions. Change
border to 1 to get a border if desired.

Now after inserting this code snippet, if you do a web page preview the logo
image will be imported into your page, and when you mouseover the image the
Alt tag will show in a tool tip, and when you click the image, the United
page will open in a new window. You can also dictate the size of the window
and more if you really want to do so.

DavidF


"Administrative Assistant"
 
A

Administrative Assistant

Thanks for the response David. I followed your instructions but what I'm
coming up with is this. When I Webpage Preview the site I see a clear box
with the text United Way of Cumberland County written in it and in a smaller
box inside that box is a red x. The United Way logo does not show. I saved
it as logo.gif. I also opened the logo and resized it to the dimensions
listed in the code. However, clicking on this clear box does open the United
Way page in another window.

What could be causing the logo NOT to show? This is a copy of the code
snippet I have. <A target="_blank" HREF="http://www.unitedway-cc.org/"><IMG
SRC="http://www.rcvcc.org/images/logo.gif" ALT="United Way of Cumberland
County" border="0" width="120" height="60"></A>
 
D

DavidF

Here is another alternative in case you don't want to upload the logo to
your site.

Using the insert html code fragment feature, insert the following snippet
somewhere on your page where it won't be in the way:

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


Then insert the logo into your page just as you would any other image, right
click, insert hyperlink, and paste the following in the hyperlink dialog:
javascript:Show('http://www.unitedway-cc.org/,'')

You can use Ctrl + V to paste as soon as the hyperlink dialog opens.

Reference:
http://office.microsoft.com/en-us/publisher/HA011587451033.aspx

DavidF

"Administrative Assistant"
 
S

Spike

David

Tried your code but had an error (could be just me)
Here is a method I use (more lines to edit but it has always worked -- so
far--) Add more sections of code (cut and paste) for more links
Edit the XXX YYY ZZZ for the desired sites
Also works well for PDF's on host site to open in new window
change http://www.abc.com to abc.pdf (pdf in same directory as web page)


I inserted the following code fragment using publisher:

<Script Language="JavaScript">

function load1() {

var load =

window.open('http://www.XXXXX.com','','scrollbar...zable=yes,toolbar=no,location=no,status=no');

}

function load2() {

var load =

window.open('http://www.YYYYY,com','','scrollbar...zable=yes,toolbar=no,location=no,status=no');

}

function load3() {

var load =

window.open('http://ZZZZZ.com','','scrollbars=no...zable=yes,toolbar=no,location=no,status=no');

}

// -->

</Script>



Then on each hypeerlink :

javascript:load1()

javascript:load2()

javascript:load3()

Spike
 
D

DavidF

Hey Spike,

Thanks for catching that. I did a quick copy and paste of the United Way URL
and accidentally pasted over an apostrophe...and didn't test it. Sorry about
that. That is part of the reason I usually build those javascript snippets
in NotePad, so they are easier to proof.

javascript:Show('http://www.unitedway-cc.org/,'')

Should be

javascript:Show('http://www.unitedway-cc.org/','')

I will test out your method later...thanks.

DavidF
 
S

Spike

The top of your page is being clipped on my display
IE 7 Vista at page size 100 %
If I drop to 75 % it is OK

I commend you on your effort

Spike



"Administrative Assistant"
 
D

DavidF

Spike,

I tried your code this morning, and it works just fine. I think I prefer the
ECMAScript code approach that is described in
http://office.microsoft.com/en-us/publisher/HA011587451033.aspx though. You
don't have to edit both code fragment boxes each time you want to add a
link...just edit or write the link. I should note though that the code
snippet under 2. in the referenced article has an error for anyone else
reading this thread:

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

Should be:

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

DavidF
 

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