tags:

views:

64

answers:

2

Hi,

I have some javascript popup works fine in html.

I know how the popup works,

but when Im trying to modify and use the codes in page.tpl.php, all of them always fail

is drupal always strip popup? and how to make it works?

thanks in advance

-----added----- (i know this codes is dirty)

in <head></head>:

<script type="text/javascript"> 
//default pop-under house ad url 
infinityads_enable_pop = true; 
infinityads_frequencyCap =0;
durl = '';
infinityads_layer_border_color = '';
infinityads_layer_ad_bg = '';
infinityads_layer_ad_link_color = '';
infinityads_layer_ad_text_color = '';
infinityads_text_link_bg = '';
infinityads_text_link_color = '';
infinityads_enable_text_link = false;
</script>
<script type="text/javascript" src="http://localhost/jjj/js.js"&gt;&lt;/script&gt;

in http://localhost/jjj/js.js:

document.write("<img src=\"http://www.myroitracking.com/newServing/tracking_id.php?d=ads.lzjl.com&amp;r=http%3A%2F%2Fads.lzjl.com%2FnewServing%2Ftracking_id.php%3Fb%3D1%26&amp;gtruid=1\" width=\"1\" height=\"1\" />");
private_label_prefix = "infinityads";
infinityads_company_name = "infinityads.com";
infinityads_static_host = "static.hatid.com";
infinityads_service = "ads.lzjl.com";
infinityads_image_base_url = "http://creative.hatid.com/network_default/network_5/";
infinityads_search_base_url = "http://ads.lzjl.com/newServing/yesupSearch/web.php?q=";
infinityads_adhere_url = "http://infinityads.com";
infinityads_widget_title = "Clicksor Connect";
infinityads_widget_title_link = "http://www.clicksor.com/connect-widget";
infinityads_pub_host = "publisher.infinityads.com";
infinityads_nid=5;
infinityads_pid=5828;
infinityads_sid=9091;
infinityads_banner_adtype=0;
infinityads_enable_inter=false;
document.write("<iframe src=\"http://ads.clicksor.com/newServing/searchTrack.php?nid=5&amp;random=439915900\" width=\"1px\" height=\"1px\" frameborder=\"0\" scrolling=\"no\" style=\"position:absolute;z-index:9999301;\"></iframe>");

if ( typeof(Yesup) == "undefined" ) {
        document.write('<script type="text/javascript" src="http://localhost/jjj/show_ad.js"&gt;&lt;/script&gt;');
    }  else {
    Yesup.Init();
}

in http://localhost/jjj/show_ad.js is in this URL:

http://wimg.co.uk/YUZ.js
A: 

Drupal strips out scripts in pages you input through its CMS if it's set to sanitize them. It shouldn't be stripping out code in templates.

Can you post the template file?

interfect
the codes has been added above. i have tried many ways with no luck, including the position of javascript in page.tpl.php
Lindsay Lohan
Is the file referenced on localhost actually available? Is this site intended to work only when viewed on the server?
interfect
localhost is only for testing.. and yes, its actually available
Lindsay Lohan
it works now. thanks
Lindsay Lohan
A: 

i dont know , but someone use smaller code for popup

kopeklanton

related questions