PDA

View Full Version : Custom Popups - PLEASE HELP Quickly if possible!


Blue_Vision
11-16-2010, 02:15 AM
<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 : )

Blue_Vision
11-16-2010, 02:16 AM
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!

edbr
11-16-2010, 02:43 AM
heres a simple js function

function popup(){
window.open('page,html', 'apply', 'width=500, menubar=no,scrollbars=yes, height=600');

}
and here i've applied it on the pageto a div but you could apply it in other ways
<div class="button" onclick="popup()" >

Open pop up
</div>

Blue_Vision
11-16-2010, 03:31 AM
Thanks for the quick response!

My problem isn't creating a custom popup but how to implement it into my ad server.

Say you used your code from above... How would you get it to activate the popup through an ad server that only has Target='s as a way to connect the ad to a popup window (along with a URL space above it)?

It would seem to me if they had a place to put an "onclick" word rather then a "target" word then maybe it would fetch the Java script function at the top of the page. But I'm not sure and that option isn't there anyways...

Somehow this is supposed to be possible?

edbr
11-16-2010, 03:55 AM
the target is used on a mormal link if you want a pop up you need to use javascript so , no i dont understand your question

Blue_Vision
11-16-2010, 04:31 AM
I wish I knew what I meant...LOL. Or at least how to say it.

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:

<!-- 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 -->

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

<div id="banner-ad-1">
<script type="text/javascript">
AdSpeed_display(26290,0); // first ad
</script>
</div><!--banner-ad-1-->
(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?

Ricky55
11-17-2010, 10:59 PM
Why are you using a pop up window? They are total ugly and out of date and most users close them down immediately without even reading them or have them blocked.

Why don't you use a jQuery light box solution? These can open HTML and they can do so at specific sizes?

Check out http://colorpowered.com/colorbox/

If this isn't what you mean come back to us.

If this could work for you but you still can't get it working, give me the ads page and i'll have a look for you.

woofy
11-21-2010, 04:26 PM
Does colorbox open PHP pages. What if I want the link to open to a page using the GET command to display data from the clicked link?