How do I change the way my website opens its links?
March 2, 2009 9:11 AM   Subscribe

I want to change the way my personal website opens other pages on my site. What is the proper HTML code? More inside.

Clicking on links to other pages on my website creates the new page as a pop-up. I just want it to open within the same window.

If you need to see what I am talking about, here is my website: evanemolo.tv

How do I go about changing this?
posted by helios410 to Computers & Internet (7 answers total) 1 user marked this as a favorite
 
The most likely cause of this problem is that inside your "a href" tags, you have an attribute that says "target=blank". Remove this, and all should be well.
posted by chrisamiller at 9:16 AM on March 2, 2009


You need to alter the A tags

href="javascript:popUp('http://www.evanemolo.tv/thegoods.html')"

change to

href="http://www.evanemolo.tv/thegoods.html"
posted by derbs at 9:17 AM on March 2, 2009


Right now, the links call a Javascript function instead of just the URL of the new page. Here's the example of what to do:

Replace

javascript:popUp('http://www.evanemolo.tv/thegoods.html')

with

http://www.evanemolo.tv/thegoods.html

So the links in HTML should read

<a href="http://www.evanemolo.tv/thegoods.html">THE GOODS</a>
posted by uncle harold at 9:17 AM on March 2, 2009


okay, scratch that. After actually looking at your site, you have each link wrapped in a javascript function:

<a href="javascript:popUp('http://www.evanemolo.tv/background.html')">

remove the javascript, so that your link just looks like this:

<a href="http://www.evanemolo.tv/background.html">
posted by chrisamiller at 9:18 AM on March 2, 2009


One addendum to what everyone's saying on links - I see what you're trying to do with the Javascript, and there is an easier way. Nthing what everyone says about changing it to

<a href="http://www.evanemolo.tv/background.html">

... but since you're using a popUp function, it looks like you want it in a new window. So, your magic tag is ...

<a href="http://www.evanemolo.tv/background.html" target="_blank">.

The target tag will give you a new window.
posted by frwagon at 11:02 AM on March 2, 2009


ugh.. sorry, it's pre-coffee. Didn't see the "I don't want a new window" part. Disregard.
posted by frwagon at 11:03 AM on March 2, 2009


Response by poster: Thanks everyone!
posted by helios410 at 11:05 AM on March 2, 2009


« Older We haven't had a chance to formally meet the new...   |   What color is your belly button lint? Newer »
This thread is closed to new comments.