/    Sign up×
Community /Pin to ProfileBookmark

Custom Target Window

<a
href=”url.com” target=”custom”
onclick=”window.open(this.getAttribute(‘href’),
this.getAttribute(‘target’),
‘width=770,height=800,scrollbars=yes,resizable=yes’).focus(); return
false;”></a>

I need to have my ad’s pop open a custom sized window when clicked.

I’m using an ad network that allows me to use Target _blank (etc) and a custom target. I’m not a great developer yet so I’m just learning but I’ve copied this snippet from another site. If I just use this in my normal html page in a normal random link then it will open up the customized window. However my ad network (ad speed) only allows me to put the _custom word there. I can’t paste all the code there… only the word custom like shown.

So what am I supposed to do with the rest of that code? Is it a java script snippet that I would put at the top of the html page or what?

Does my question make sense?

Thanks, I’m in a hurry with this so any help would greatly help : )

to post a comment
Full-stack Developer

2 Comments(s)

Copy linkTweet thisAlerts:
@blue_visionauthorNov 16.2010 — Here is ad speeds help file with reference to the custom target...

http://www.adspeed.com/Knowledges/50/Banner_Richmedia_Text/Click_new_window.html


I managed to get this to work using javascript commands from the header copying what they do:

http://www.learningmovabletype.com/a/000326popup_window/

But I can't figure out how to connect the two. I tried calling my custom target in adspeed "OpenPopup" as they did in the the popup window tuturial but no luck. I kinda think because they have no "target" in the javascript itself. I don't know but I'm REALLY needing this. Please help!

Thanks!
Copy linkTweet thisAlerts:
@blue_visionauthorNov 16.2010 — I re-explained this on another forum so I thought I'd post it here incase it can help somebody help me : )

Ok, I have several ads displayed on a webpage hosted from my adserver ad speed. I need these ads to open up their urls in new window sized at 770px by 800px. I can achieve this in a typical link but I can't figure out how to with my actual ads being hosted by ad speed. They say that needs to be implemented on my end.

Here is the ad script at the top of one of my pages to preload the 140x140px ads:

[CODE]<!-- AdSpeed.com Serving Code 7.9.4 for 3 zones [Any Dimension] -->

<script type="text/javascript" src="http://g.adspeed.net/ad.php?do=js&zids=26267|26290x2|26302x5&wd=-1&ht=-1&target=_top"></script>

<!-- AdSpeed.com End -->[/CODE]

Then I have a div on the html page to call those ads and contain them:

[CODE]<div id="banner-ad-1">
<script type="text/javascript">

AdSpeed_display(26290,0); // first ad

</script>
</div><!--banner-ad-1-->[/CODE]

(only using 1 ad container for an example)


Now how on earth can I make it so that if the above ad is clicked on that it opens up in a new windows sized to my needed specifications?

Does that help or have I still lost everybody?
×

Success!

Help @blue_vision spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...