The_Rick_14
The_Rick_14

Reputation: 87

Link in iframe appends parent url

So I have a website that we'll call www.main.com and inside of that I have an iframe with a table and in the cells of that table I want to have a link open in a new window, for example www.next.com.

The problem is that when I add the link to the table cell, it appends the parent to the link so instead of the href being just what I put there (href="www.next.com") the link ends up being "www.main.com/www.next.com" which of course is bogus.

How do I get it to not append the "www.main.com/" and only use what I pass into the href property?

Upvotes: 0

Views: 358

Answers (1)

Ian Roberts
Ian Roberts

Reputation: 122364

It's not the fact that you're in an iframe, it's that if you want an absolute link you must include the http:// (i.e. href="http://www.next.com")

Upvotes: 6

Related Questions