Hi everybody,
Can one mouseclick open a sponsor site in a new window AND change ...
-
Open a link in a new window AND change the html on my own site?
Hi everybody,
Can one mouseclick open a sponsor site in a new window AND change the html on my own page??
please help, thanks in advance.
-
-
-
Re: Open a link in a new window AND change the html on my own site?
I don't really understand what you want but to open a link in a new window just use
Code:
<a href="" target="_blank">link</a>
"Bad artists copy. Great artists steal." -- Pablo Picasso
-
The Following User Says Thank You to iulianh For This Useful Post:
-
Re: Open a link in a new window AND change the html on my own site?

Originally Posted by
iulianh
I don't really understand what you want but to open a link in a new window just use
Code:
<a href="" target="_blank">link</a>
Yes thank you, I got that part, but I was wondering if my own page could reload as well with new content (on the same click). but... i think i need javascript??
-
-
Re: Open a link in a new window AND change the html on my own site?
use javascript to edit the styles of the page..
document.getElementById("whatever Id your editing").style.attribute = "change";
create a javascript function that calls that, and the window.open() function with an onClick event.
I like drugs
-
The Following User Says Thank You to n3xus For This Useful Post:
-
Re: Open a link in a new window AND change the html on my own site?

Originally Posted by
n3xus
use javascript to edit the styles of the page..
document.getElementById("whatever Id your editing").style.attribute = "change";
create a javascript function that calls that, and the window.open() function with an onClick event.
n3xus gave you the run down of it, you'll need two functions, one to handle the window.open part and the other to change your content. How much content do you need to change? If it's a lot, you may just want to redirect them to a new page and open the sponsor page at the same time, if it's something like you're just changing text from 'Click the sponsor linked' to 'Sponsor linked clicked', then just use another javascript function to trigger it.
Example:
Code:
<html>
<head>
<script type="text/javascript">
function changeText(obj)
{
obj.innerHTML = "You've clicked the Sponsored Link";
}
</script>
</head>
<body>
<a href="#" onClick="changeText(this);window.open('http://google.com');">Click for Sponsored Link</a>
</body>
</html>
-
The Following User Says Thank You to imprint For This Useful Post:
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks