Bartman Posted December 7, 2011 Share Posted December 7, 2011 I have a javascript file called ad.js inside looks like this var ADPLACER_PATH = "http://www.mywebsite.com/"; var PREROLL_ENABLED = 1; var MIDROLL_ENABLED = 0; var PREROLL_ZONE_ID = 0; var MIDROLL_ZONE_ID = 0; var PREROLL_TIMEOUT_IN = 0; var PREROLL_TIMEOUT_OUT = 35000; var PREROLLCLOSEBUTTON_TIMEIN = 0; var MIDROLL_TIMEOUT_IN = 0; var MIDROLL_TIMEOUT_OUT = 3000000; var PREROLL_ONSHOW = function(C){ setTimeout(function(){document.getElementById('adplacer_prerollClose'+C).onclick()}, PREROLL_TIMEOUT_OUT); } var PREROLL_ONHIDE = function(){} document.write ("<scr"+"ipt type='text/javascript' src='"+ADPLACER_PATH+"adss.js'><\/scr"+"ipt>"); It places an ad over a video on my site. I know I can add the .js to my site by adding this <script type="text/javascript" src="ad.js"></script> to my head But what do I need to add to my page to make it appear? Do I have to put the video between a DIV? Can someone let me know what I need to do to make it appear? thanks Quote Link to comment https://forums.phpfreaks.com/topic/252631-help-with-javascript/ Share on other sites More sharing options...
gizmola Posted December 7, 2011 Share Posted December 7, 2011 You should seek support from the ad network on how to integrate it into your site. Quote Link to comment https://forums.phpfreaks.com/topic/252631-help-with-javascript/#findComment-1295112 Share on other sites More sharing options...
Bartman Posted December 7, 2011 Author Share Posted December 7, 2011 it is not an ad network. I want to put an ad in that code. I know how to do that...just want to know how to make that code appear on me site.. must be a div Quote Link to comment https://forums.phpfreaks.com/topic/252631-help-with-javascript/#findComment-1295123 Share on other sites More sharing options...
gizmola Posted December 7, 2011 Share Posted December 7, 2011 it is not an ad network. I want to put an ad in that code. I know how to do that...just want to know how to make that code appear on me site.. must be a div There is no way for anyone to know that if we don't know what the adss.js library is, and where you got it from. Quote Link to comment https://forums.phpfreaks.com/topic/252631-help-with-javascript/#findComment-1295129 Share on other sites More sharing options...
Bartman Posted December 7, 2011 Author Share Posted December 7, 2011 the adss.js just has the ad network code with a close button... the ad.js has it appear for x amount of seconds before either closing or disappearing Don't I display this from the getElementById in a div? like <div id="Something Here"> Video </div> Quote Link to comment https://forums.phpfreaks.com/topic/252631-help-with-javascript/#findComment-1295231 Share on other sites More sharing options...
gizmola Posted December 7, 2011 Share Posted December 7, 2011 There is no one answer. getElementId by itself will get an element by the id="key" key, but declaring a variable that points to that element does not change it, or add a new element on top of it, that has a higher zindex. Quote Link to comment https://forums.phpfreaks.com/topic/252631-help-with-javascript/#findComment-1295397 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.