JavaScript - Third Party Ad Doing Popups. How Do You Prevent It?
I have a tracking ad at the bottom of my site. (no iframes). how do I know and/or prevent that tracking ad from popping up a popup?
They are not suppose to, but I suspect they do. Is there a way to track this, or perhaps prevent them from popping the popup from within my page? I have access to various libraries, prototype/jquery etc.. so if there is a func/method in those, I could use too. Similar TutorialsI have 3 pop-ups on a particular page, but when I click any of the 3, they all show up as the same one (the 'form' one, whereas they should be 3 different ones). What do I need to change? Here is the 1st one (triggered by clicking 'Pre-purchase pest inspections'): <SCRIPT language="JavaScript"> function topWindow(){ popup = window.open("timberpest.html","timberpest","width=800,height=850,left=0,top=0,toolbar=no,location=no ,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=no"); } </SCRIPT> <li><a onmouseover="window.status='Pre-Purchase Timber Pest Inspections >>';return true;" onmouseout="window.status='';" href="javascript:topWindow()">Pre-purchase pest inspections</a></li> Here is the 2nd one (triggered by clicking the image 'img7.jpg'): <SCRIPT language="JavaScript"> function topWindow(){ popup = window.open("form/form.html","form","width=700,height=1400,left=0,top=0,toolbar=no,location=no,directories=no,status=y es,menubar=no,scrollbars=yes,copyhistory=no,resizable=no"); } </SCRIPT> <td class="bg10"><div align="center"><a onmouseover="window.status='Request Form >>';return true;" onmouseout="window.status='';" href="javascript:topWindow()"><img src="images/img7.jpg" alt="" width="177" height="345" border="0" /></a></div> And here is the 3rd one (triggered by clicking 'Read more...'): <SCRIPT language="JavaScript"> function topWindow(){ popup = window.open("About.html","about","width=778,height=650,left=0,top=0,toolbar=no,location=no,directori es=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no,resizable=no"); } </SCRIPT> <a onmouseover="window.status='About Us >>';return true;" onmouseout="window.status='';" href="javascript:topWindow()">Read more...</a> Hey guys I'll try to do my best to explain what I want. Im using a self hosted wordpress and I want to add and image link in one of my sidebars. Code: Code: <a href="http://www.espn.com" target="_blank"> <img src="ahman.gif"> </a> So When someone click on the image I want a box to appear in same window with all the buttons above(facebook,twitter,Gplus,Digg,StumbleUpon ....(the script for the button is down there )) like that(I want A shadow also) http://oi42.tinypic.com/j0vi1i.jpg After that I want all the bookmarks to be done in this box and not in different window. After the bookmark is done I want to show a thank you message in this box Hope you guys Understood. I dont think is complicated but for me it is The bookmarking script is Here http://newsand-reviews.com/javascript.txt Thank million times for help. If you can help me even with half of this I'll be pretty happy Hello. Im trying to put in a Popup printer-friendly page on my site. the Popup works great in Chrome and FireFox. It even works in IE - except im getting a black bg instead of the white i get in the other browsers. Also the print command is not working in Firefox or IE. Im running FireFox 8 and IE 9. heres the code for the Popup: Code: <script language="javascript" type="text/javascript"> <!-- function popitup(url) { newwindow=window.open(url,'name','height=200,width=150'); if (window.focus) {newwindow.focus()} return false; } // --> </script> </head> <div> <img src="IMAGES/BidsCouponSmall-text.png" /> <br /> <br /> <a href="printcoupon.htm" target="coupon" onclick="window.open('printcoupon.htm','coupon','height=500, width=400,toolbar=no,directories=no,status=no, menubar=no,scrollbars=no,resizable=no'); return false;" >Click HERE To Print</a> <br /> </div> To avoid cluttering of this post, the page im having printing problems with can be found he http://bidsservice.net/printcoupon.htm its all html, css, and JS. no server-side code. I have developed one to one chat in asp.net. Now I wanted a gmail chat like feature in it. In left side of page, a list of online users should be available. When I click on a user, a new div should popup on right bottom corner with close and minimise buttons. When I click on another user , a second div should popup on right bottom corner of page but left to the first popup div. I want popping up of divs dynamically. The no of clicked users should decide the no of popped up divs. Also, for each division there should be a separate division ( inside the popped division ) whose innerhtml value is my chat text. And if three divs are popped up and if I close the second one, the third should get attach to first popup. Hope, you'll understand my requirements, and will provide a suitable code in javascript. I'm trying to do what they are saying at this link: http://blogs.sitepoint.com/perfect-pop-up/ First, they tell me to do what is listed under the "Scripting Disabled" section: <a href="file.htm" onclick="window.open('file.htm'); <br> return false;" rel="nofollow" target="newWin"> Then, down in the page in the "The Perfect Pop-Up Script" section it has a large script for me to use. I'm wanting to use it at my page http://www.best-stock-trading-system...ng-system.html I want to make each of my images pop up windows like at this site: http://www.polyvore.com/cgi/shop?query=shoes So, are they telling me to use the html in both sections? Where would I put the html in the top section vs. the script in the lower section? Do I have to make another webpage and just paste the script in there and then call it, like they say below: "To call the function you would use the following code:" <a href="my-pop-up-window.htm" <br> onclick="popUp(this.href,'console',400,200);return false;" <br> rel="nofollow" target="_blank">This is my link</a> I'm a bit confused where I am supposed to inserting the page name for the popup that I want to pop up vs inserting the pagename for the script page that I guess I have to make. So what are the steps that I would take to do all of this?! Thank you for your help! I found this script while browsing a site: Code: <script language="JavaScript"> <!-- if(popUpsBlocked) alert('Our site uses Pop-Ups.\nPlease enable Pop-Ups for this website.'); } //--> </script> But when I added it to my site, it wont work. Discuss and find a soulution....... I'm a complete newbie so please excuse me if this is obvious. I'd like to have a drop down menu that pops up a small new window with an image. So for, every attempt results in the image appearing in a new tab instead of a small, pop up style window. Here's my form <select name="parms"> <option value="AirTemp.jpg">AirTemp</option> <option value="Humidity.jpg">Humidity</option> <option value="Windspeed.jpg">Wind Speed</option> </select> Many thanks. I have several 'galleries' for each artist on my website. Clicking on each thumbnail opens a popup window with a larger image and details. It works fine on all the browsers except IE. What do I need to add/subtract/alter so that it works in IE? Tried to find the solution with the other threads, but without success. Here's the website: http://artsenses.co.uk I will be eternally thankful for any help! Hi, I want to create a javascript: url that will automatically enter a few pieces of information into a registration form provided by a 3rd party. Basically I just want to help users navigate the form a little quicker, and the form doesn't accept query strings. I am running into the fact that when the page is loaded, the cache is flushed. So, I have 2 working javascript: URLs, and I want to combine them into a bookmarklet (and then make it a tinyurl). Can I do that? Thanks, Chris javascript: top.location.href='http://www.google.com/'; javascript: document.f.q.value='This works too'; I have the need to include an Ad Tag from a third party source that is generated via javascript which document.writes the code to display the ad. I have no control over this. I have it working on my end, BUT for the life of me I cannot get this to center in my div. It's like it busts out and aligns left after my div. I can't fathom what is going on. "IF" I include this ad tag directly in the page inside the div, it centers. But I need to dynamically pass it some data before it requests the ad, so I Have to dynamically create it, but this is the issue. It displays, just aligned left outside the target div. So, I am given a js tag with a src and that src generates a document.write that writes out an iframe. Here is my code below. I take the js src and replace some value in it since it is a string. Then I create a script element and then insert it into my div element on my page. var js_src = ("contents_of_the_src").gsub(/tie=/,'tie=' + random10_digit) var js_script = new Element('script',{'src': js_src}); Event.observe($('myDiv'), 'load', $('myDiv').insert({top : js_script})); so the view in question is something like this: <div id="myDiv"> <script language="text/javascript"> var js_src = ("contents_of_the_src").gsub(/tie=/,'tie=' + random10_digit) var js_script = new Element('script',{'src': js_src}); Event.observe($('myDiv'), 'load', $('myDiv').insert({top : js_script})); </script> </div> I've tried moving the js out of the div, afterwards, and try to insert then. I tried to create a new div, center that, and write the ad tag to it. All left alighned and outside of the div. So, I have to rely on a third party external JS file to load into a site of mine. Problem is I have to have it (for ads), but once every blue moon the server fails to repond to the request (its down or unresponsive), and thus because the JS can't load, the site hangs. Is there a reliable js/ajax etc.. mechanism that I can use to set an allotted time and if the js isn't loaded, cancel the call or stop it so the page can load? Please advise. Caveats: I cannot host it, I cannot use php. Basically I was given a script call and I include it in the header of the page. I don't have alot of room to host, use various technologies etc.. other than what I am able to use without any backend/app scripting. Ok ..... let's see if I can explain this so someone else can understand it! I have a menu created with AllWebMenus and after battling with it for some time to get it to show up on the pages !!!! i am now facing another problem..... I have a flash movie on the home page that it does not start unless i click the home button. I've tested locally without the menu and it works, so has to be the menu that is conflicting with it. the site is www.teiafirme.com I could just drop the menu and create another one, thing is I like those darn buttons... Anyone here have any experience with this kind of problem? if needed i can post the menu and flash code... Hello, Is there anyway to prevent images, words, divisions, etc from being selected? Also if something is selected is there a way to deselect? Thanks! Hello. I'm using the keyup event for an input box to check for the Escape key (keyCode 27). I'm then using this to hide a related select element. It works okay apart from IE(8) of course . How can I prevent IE carrying on with its normal Escape behaviour? If tried a number of things, most recently: Code: e.cancelBubble = true; if ( e.stopPropagation ) e.stopPropagation(); return false; but it, IE, is insistant. I tried switching to 'keydown' but it went a bit wonky.. Andy. How do I prevent my Link from disappearing?? When I click on the link, "Click Here" It display, "Look At Me!!" but the link, "Click Here" is GONE Is there a way to keep my link, "Click Here" from disappearing? So when I click on the link, "Click Here" the content, "Look At Me!!"should display as well. thanks Here are my codes Code: <html> <head> <script type="text/javascript"> function display() { document.writeln("Look At Me!!"); } </script> </head> <body> <a href="google.com" onClick="display()">Click Here</a> </body> </html> Hey! I searched a while on the web for this but i didn't find a solution that really worked. So is there a way how i can prevent IE9 from scrolling when i use the arrow keys? I retrieve a list of links from a database using ajax, then I assign them to the innerHTML property of a div whose display property is set to "none" Then I set the display property to "display" to get a drop-down listbox. The problem is the links in the list are all hilighted like they've been dragged over by a mouse. How do I prevent these links from highlighting? Code: 1 ,<input id="14sq-und-0-value" size="12" maxlength="10" class="form-text" type="text"> 2 ,<input id="510sq-und-0-value" size="12" maxlength="10" class="form-text" type="text"> 3 ,<input id="1119sq-und-0-value" size="12" maxlength="10" class="form-text" type="text"> 4, <input id="20jsq-und-0-value" size="12" maxlength="10" class="form-text" type="text"> 5 ,<input id="oneyear-und-0-value" maxlength="10" class="form-text" type="text"> 6 ,<input id="twoyear-und-0-value" maxlength="10" class="form-text" type="text"> 7 ,<input id="threeyear-und-0-value" size="12" maxlength="10" class="form-text" type="text"> 8 <input id="vpssq-und-0-value" size="12" maxlength="10" class="form-text" type="text"> 9 <input id="500zh-und-0-value" size="12" maxlength="10" class="form-text" type="text"> 10 <input id="1000zh-und-0-value" size="12" maxlength="10" class="form-text" type="text"> 11 <input id="1500zh-und-0-value" size="12" maxlength="10" class="form-text" type="text"> now, i want to do, if the editor type content to 1, 2, 3 4 input box and finished namely the 1 ,2,3 4have value , then he can't type anything to the rest. if the 5,6,7, input box has value. then can't type anything to the rest. if the 8, input box has value. then can't type anything to the rest. if the9,10,11, input box has value. then can't type anything to the rest. Hello. I have what I think is a simple request, but I'm not quite sure how to go about it. I hope you can help me! Problem: I am building an online store and need to restrict checkout unless a customer has bought at least $20 worth of items. If they have >$20, they can check out. If they have <$20, they should get an error when they click the checkout button that explains that there is a $20 minimum. I don't want them to be able to checkout, so maybe I also need to disable the button or hide it? Here are the two elements in my HTML: The total price div: Code: <div id="totalprice">{tag_productgrandtotal}</div> The checkout button: Code: {tag_buybutton,<img alt="" src="/CatalystImages/shop_checkout.png" />} Here is what I've tried to put together with my bare minimum knowledge of Javascript: Code: <body onload="checkOut()"> <script type="text/javascript"> function checkOut() { var tp = document.getElementById('totalprice').innerHTML; tp = tp.replace(/[^0-9$\.]/g,""); // strip anything except numbers decimals and $ sign if (tp < "$20.00") { ???????????????? } else { ????????????????? } } </script> I'm not sure the top part is correct, and where I've put "?????" I have no idea what to do to deactivate the checkout button and produce the error message. Thank you SO much for any help you can provide. |