JavaScript - Whats The Best For Creating Paid To Click Script
What is best for creating a PTC script
Similar TutorialsHey all I am not that much good in JS and J* kind of thigs .. help me out on this .. I am opening a Dhtmml poopup ,and it's having two buttons say YES and NO if user click on YES (mysql table) field say Yes should increse else if No (mysql table) field No should increse I hope understand the problem bascically on onclick I m using "window.open " a phpFile which is updating this all .. but I dont want to do this with window.open any help would be appreciated Thanks ayiamas the script below works but it reveals all the codes rather than just the one clicked, there are multiple vouchers on the page, in the php file there is one instance of <?=voucher_code?> so how is it possible to make each instance of voucher_code unique? in order fro this script to work? is it even possible or maybe there's another way? Code: <script> $(".revealVoucher").click(function () { $(".voucherCode").show("slow"); }); </script> <div class="revealVoucher"> <a href="<?=$affiliate_url?>" target="_blank">Reveal Code</a> </div> <div class="voucherCode" style="display:none;"> <a href="<?=$affiliate_url?>"><?=$voucher_code?></a> </div> Hey everybody. I have this code that disables right clicking on a page. It works fine, but I'd like to tweak it a little bit if possible. When trying to right click on a page, the script will pop up an alert message. If you try right clicking a second time, you receive an option to disable the alert message. I want to disable this option so that the alert pops up every single time, but I have no idea how to actually do this. Can anybody help me out? Thanks. Code: <script type="text/javascript" language="javascript"> var message="ALERT MESSAGE"; function click(e) { if (document.all) { if (event.button==1||event.button==2) { alert(message); return false; } } else { if (e.button==1||e.button==2) { e.preventDefault(); e.stopPropagation(); alert(message); return false; } } } if (document.all){ document.onmousedown=click; } else{ document.onclick=click; } </script> Hi, my name is Joe. I have no expierience in writting scripts buy have managed to put together what I think is a decent website for a local business. It is a local Bait & Tackle shop. I have done this for free as I am retired and work a few days a week in the owners shop. This is my situation. I wish to display the current days high tides in a web page. I have created a database (csv file) which resides on my server This file has two fields: date and tidal times I am looking for a script that test the "date" field and if it is equal to the current date, display the tidal field. Any help would be appreciated. Thanks, I have searched and scoured the web looking for a script like this. I have found different scripts that do certain aspects of what I am looking for, but not ONE that does it all. I am hoping you can help bring my search to an end! I need a script that when a user tries to leave a page, either by typing in a URL in the address bar or clicking an external link they get a Javascript (not pop up window) dialog box asking if they would like to complete a survey. If they click OK they are then redirected to the survey page. If they click cancel it allows them to go on their way to the external link. It needs to be able to decipher between internal and external links. The script needs to work with both IE and FF. This is a must. Safari would be a plus. I would like, BUT IS IN NO WAY A NECESSITY, for the script to also be cookie based in that the user doesn't see it if they've seen it within 7 or 14 days. I really hope you all can help me here as I am lost! If you need any other info from me please let me know! Hey there. I'm creating my web-site now. I'm planing to have some slide/object change by itself. I know Java Script perform this task. I have get the code and apply to the image I want. It works. My idea is each of my image upper left corner have the representative number of the slide. When the slide1 go to slide 2 automatically, the number will change colour from 1 to 2. When the user click the number, the slide will change according to the number. Let said I have 3 slide. Each slide and have no 1 ,2 ,3 move forward, move backward icon on the upper left corner. I have slide1 ,slide2, slide3 change by itself within 2.5 second. When the user go thru slide 1, slide 2 and till slide3, user find out he/she interested on slide 1 and by clicking 1 on the upper left corner, the slide will change back to slide 1. Something like showing on the home page at www.easyjet.com.EN or http://www.thomascook.com/ . Both home page show a slide. This is what exactly I want. I learn HTML code before but not Java Script. I have borrow many Java Script reference book. but no idea how to inside the number on the upper left corner on each slide and how the number work accordingly with the slide. So sorry if you can't understand what I was talking about. But, anyone who understand me or have any idea how can I mortify the Java script to what I want. Just answer or email me to trista_soo@yahoo.com or facebook me on sym107@hotmail.com. Thanks for your time and efforts. Your help I really appreciate. Cheers! Hi all, I am using the following script posted on this site: http://www.javascriptkit.com/script/...oundlink.shtml It works great, but I want to extend this script and mute the sound using a checkbox. This checkbox has the id: sound. If checked, I want to hear the sounds, when unchecked, no sounds should be heard. This is the code I currently have for the checkbox: Code: function playSound() { if (document.getElementById('sound').checked){ -something needs to be added here to make it work?- } } Anyone have an idea how to make this work? Many thanks I am trying to create a text area input filed for user input, and i want to be able to allow the user to format thier text, just like the ones used in this user forum. I am writing my website in html, php, javascript and css with a MySql database. I am trying to understand how to create such an format-able text area for input. Any ideas? Thank you; Ice hi people I'd need a program just in command prompt to post messages on server minecraft, possibly being able to automate this process every few time, should I use it for more players at a time, work done to pay 20 Euros or more p.s is nothing illegal I'm trying to get my Client Side Firefox DHTML app to display a list of eBooks. For this, i have the following files F:\Textbooks.html F:\eBooks.txt F:\FirstBook.txt F:\SecondBook.txt F:\ThirdBook.txt textbooks.html is my DHTML app eBooks.txt is the Library file with a listing of all of my eBooks. Inside of eBooks.txt is the following data: ----------------- FirstBook.txt, SecondBook.txt, ThirdBook.txt, ----------------- FirstBook.txt to ThirdBook.txt are my actual ebooks. The problem that i'm having is that When i try to click on any buttons other than the FirstBook button, i get the following error: ---------------------------------- Error: unterminated string literal Source File: file:///F:/Textbooks.html Line: 1, Column: 10 Source Code: LoadEbook(' ---------------------------------- So, unlike clicking on the FirstBook button, these other buttons do not load the eBook data into the DIV for displaying the eBook data. I use the DOM insepector to checkout the DOM of the button code, and it seems like whitespace maybe is the problem. However, i have removed whitespace from the HTMLdata string, and that's not fixing the problem. did i forget something silly? LOL i'm using FireFox 3.5 to develop this App. So obviously this will not work with anything other than Gecko Based browsers. here is my HTML code: <html> <head> <script language="JavaScript"> var eBookLibrary = "eBooks.txt"; var SystemPath = "f:" + String.fromCharCode(92) function Init() { // Initialize the eBook reader document.getElementById("EbookCanvas").style.visibility = "hidden"; document.getElementById("EbookToolbar").style.visibility = "visible"; document.getElementById("FileManager").style.visibility = "visible"; // Load the List of eBooks in the Library LoadBookList(); } function UpdateEbookList() { // Update the Library of Ebooks alert("Updating eBook Library"); // Go back to the File Manager, and Reload the List of Ebooks LoadBookList(); } function LoadBookList() { // This will load the list of books that are available var EbookList = LoadFromDisk(SystemPath + eBookLibrary); var EbookListArray = EbookList.split(","); for(var x = 0; x < EbookListArray.length -1; x++) { // Strip the Filename Extension off of the eBook File Name // The Name of the Book is always the first Index in the Array var BookName = EbookListArray[x].split("."); // Remove the weird whitespace - it screws things up...i think... BookName[0] = BookName[0].replace(/(^\s*|\s*$)/g, ""); var HTMLdata = HTMLdata + "<input type='button' value='" + "FirstBook" + "'" + " onClick=LoadEbook('" + EbookListArray[x] + "');><br>"; } // For some ****ed up reason the first string always generates an 'undefined' even though it's nonsense // So just delete that from the HTMLdata string, because it's just ugly - LOL HTMLdata = HTMLdata.replace("undefined", ""); HTMLdata = HTMLdata.replace("", " "); // Write the HTML data to the DIV document.getElementById("FileManager").innerHTML = HTMLdata; } function LoadEbook(EbookName) { // Hide the File Manager and Show the Ebook Canvas document.getElementById("FileManager").style.visibility = "hidden"; document.getElementById("EbookCanvas").style.visibility = "visible"; document.getElementById("EbookToolbar").style.visibility = "visible"; // Load the Ebook content into the Ebook Reader Pannel var EbookContent = LoadFromDisk(SystemPath + EbookName); document.getElementById("EbookCanvas").innerHTML = EbookContent; } function LoadFromDisk(filePath) { if(window.Components) try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile); file.initWithPath(filePath); if (!file.exists()) return(null); var inputStream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream); inputStream.init(file, 0x01, 00004, null); var sInputStream = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream); sInputStream.init(inputStream); return(sInputStream.read(sInputStream.available())); } catch(e) { //alert("Exception while attempting to load\n\n" + e); return(false); } return(null); } </script> </head> <body onLoad="Init();"> <div id="FileManager" style="position: absolute; top: 0px; left: 0px; visibility: visible;"> The eBook Library's List of Books will be listed here. Click on one to open it in the eBook Reader </div> <br> <div id="EbookCanvas" style="position: absolute; top: 0px; left: 0px; visibility: hidden;"> </div> <br> <div id="EbookToolbar" style="position: absolute; top: 100px; left: 0px;"> <input type="button" value="Open" OnClick="Init();"> <input type="button" value="Update" OnClick="UpdateEbookList();"> <input type="button" value="Exit" OnClick="MainMenu();"> </div> </body> </html> Ok know those people who are in the bad habit of double clicking everything? Well my site breaks if they double click it... is there a script I can use that won't let my functions run more then once every so many seconds? to avoid double clicking errors? Origins? note: it's not really seachable, because if you search javascript foo, or javascript foo origins example javascript just shows up... Code: <html> <title>hi</title> <Head> <SCRIPT language="JavaScript"> <!-- var rand_url= new Array() rand_url[0]="http://www.facebook.com"; rand_url[1]="http://www.youtube.com"; rand_url[2]="http://www.bing.com"; rand_url[3]="http://www.yahoo.com"; rand_url[4]="http://www.google.com"; var rand_num= Math.floor(Math.random()*5); //--> </SCRIPT> </head> <body> <H2>Try your luck!</H2> <a href="javascript:func(rand_url[rand_num])"><img src="http://www.mycasinogames.org/editor/assets/button_playnow.jpg" alt="CLICK ME!"/></a> </body> </html> I'm testing out some JavaScripts, and im using one that give a random link. So, basically they have to click a "Play Now" IMAGE to launch ONE of the links above in the "rand_url" However what is in red isn't working. When clicking the image, it does nothing. Can you help? Simply what is wrong with my code. The following code is for a simple slideshow that is supposed to accept a range of images to display. Its for a website where it shows all the store for a company and when you rollover the image of it is plays a slideshow of images. If you have any other way of doing this that would be easier than please post it here. It must work in all browsers. As you can see there are lots of images to me loaded for this Code: <!-- var image1=new Image() image1.src="contact/images/wingham/01.jpg" var image2=new Image() image2.src="contact/images/wingham/02.jpg" var image3=new Image() image3.src="contact/images/wingham/03.jpg" var image4=new Image() image4.src="contact/images/wingham/04.jpg" var image5=new Image() image5.src="contact/images/wingham/05.jpg" var image6=new Image() image6.src="contact/images/wingham/06.jpg" var image7=new Image() image7.src="contact/images/listowel/01.jpg" var image8=new Image() image8.src="contact/images/listowel/02.jpg" var image9=new Image() image9.src="contact/images/listowel/03.jpg" var image10=new Image() image10.src="contact/images/listowel/04.jpg" var image11=new Image() image11.src="contact/images/listowel/05.jpg" var image12=new Image() image12.src="contact/images/listowel/06.jpg" var image13=new Image() images13.src="contact/images/hanover/01.jpg" var image14=new Image() images14.src="contact/images/hanover/02.jpg" var image15=new Image() images15.src="contact/images/hanover/03.jpg" var image16=new Image() images16.src="contact/images/hanover/04.jpg" var image17=new Image() images17.src="contact/images/hanover/05.jpg" //--> <!-- //variable that will increment through the images var step=1 function slideit(start,finish,action){ if(action == 'abort'){ return } //if browser does not support the image object, exit. if (!document.images) return document.images.slide.src=eval("image"+step+".src") if (step<finish){ step++ } else{ step=start } //call function "slideit()" every 2.5 seconds timer = setTimeout("slideit(start,finish)", 1000); } function slideOff() { document.images.slide.src=eval("image1.src") clearTimeout(timer); } //Called something like this: slideit(1,6)// I am doing project exercises from a JavaScript book for a college class. I am creating a brand new .html document for each project. I was under the impression that each unique page name would have its very own cookie scope. But to my surprise it seems adding/loading cookies using 'document.cookie' doesn't assign new cookies to each page. I am seeing that when I try to load document.cookie in new .html pages there are cookies that were already created in past pages in the document.cookie property/string. So whats the 'default' scope of a document cookie. Do I have to set the domain property to get unique cookies for each .html page I create? Thanks for the help. Edit: Okay, it seems that cookies have a default scope of the folder your .html page resides in and all sub-folders that your page resides in. I moved my project folder so that it was a sibling of my projects folder and it got its own cookies that way. i have been working on Javascript and HTML for long time but never had such kind of a problem. A very simple code isnt getting executed. Please help me out with what i am missing : Here is the HTML code with javascript(a very simple webpage to say hello) : Code: <html> <head> <script type = "Javascript"> function say_hi() { window.alert("Said hiii.."); } </script> </head> <body> ahgdahsgdhagshd <input type = "checkbox" onclick= say_hi()/>click the check box sdfsdf </body> </html> Problem is that say_hi() isnt getting called. I have tried : Code: onclick= "say_hi();" also.. but still its not getting called when i am clicking the checkbox which it should!!! Yes but if i am writing : Code: onclick= "window.alert("Hi");" then its getting executed!!!. Whats going on here in my code. Thanks in advance Im looking at how or what this effect is called i am not even sure if it is javascript i assume it is from looking at the code. But i cant seem to convert it to what i want. So if someone could point me to a more simple version of this code or what the technique is called that would be great. Here is the page. http://www.pizzacapers.com.au/the-me...nature-pizzas/ What i am talking about: You click the pizza and it comes up inside of the border picture on the left side of the page. Thanks Hi I've got about 40 check-boxes on my 1 form. These check-boxes all have names (obviously) but they are NOT all unique names. The number of UNIQUE names on my form is probably around 8 or 9 (the actual number is NOT important). Because some check-boxes use the same names as other. It's set up this way, please don't ask me to change it, I can't change it. What's the syntax/method for looping through all the names? I was thinking I should do maybe a "for" loop; Code: for (var i = 0; i < fieldName.length; i++) But I don't know how to hold a variable of the unique names to start with. Can someone help please? Hey guys just need a little help. I need to create a little script that clicks a link automatically and opens it up in a new page. So far I have this: Code: <head> <script> function autoClick(){ document.getElementById('linkToClick').click(); } </head> <body onload="setTimeout('autoClick();',3000);"> <a id="linkToClick" href="http://www.google.com" rel="nofollow" target="_blank">GOOGLE</a> </body> It works but the problem is that IE popup blocker keeps blocking the new window. Is there a way to do the same thing with javascript without it having blocked by IE popup blocker? |