Jump to content

Need a javascript coder / helper for a clickable link to users who say THANKS.


YOUAREtehSCENE

Recommended Posts

I have a javascript code so that people need to say well click on "THANKS" before they view a link! I'm curious as to how I would implement the code into my wordpress site, can I put it into one of the theme files? or do I need to create a .php file, or something. please help

 

Please see theses images.

 

Before users say thanks.

http://i51.tinypic.com/2w7hjds.jpg

 

After users click on thanks

http://i52.tinypic.com/2yjv4t2.jpg

 

Before = image 1

after = image 2

 

 

function SayThanks() {

$('div#DownloadLink').html("<img src=\"ajax-loading.gif\">");

$('div#DownloadLink').load("saythanks.php?id=61634");

}

function AddMirror() {

$('div#AddMirror').html("<form name=\"form1\"><input name=\"AddMirrorField\" type=\"text\" value=\"http://www.\" size=\"20\"><input type=\"Button\" value=\"Add New Mirror\" onclick=\"javascript:AddMirrorSubmit()\"></form>");

}

function AddMirrorSubmit() {

var mirror = document.form1.AddMirrorField.value;

$('div#AddMirror').html("<img src=\"ajax-loading.gif\">");

$('div#AddMirror').load("addmirror.php?id=61634&mirror=" + mirror);

}

function ViewThanksList() {

$("div#DivThanksList").slideToggle("slow");

}

function Approve(id) {

var id;

var tweet = confirm("Do you want to post the release on twitter?\n\nNote:\nClick cancel when people decide to submit 20 horrible death metal albums in an hour");

if (tweet == true)

{

$('div#DivApprove').html("<img src=\"ajax-loading.gif\">");

$('div#DivApprove').load("dynamic/approve.php?tweet=1&id=" + id);

}

else

{

$('div#DivApprove').html("<img src=\"ajax-loading.gif\">");

$('div#DivApprove').load("dynamic/approve.php?tweet=0&id=" + id);

}

}

function ShowDelete() {

$('div#DivDelete').slideToggle("fast");

}

function ShowUndelete(id) {

var id;

$('div#DivDelete').html("<img src=\"ajax-loading.gif\">");

$('div#DivDelete').load("dynamic/undelete.php?id=" + id);

}

function ShowReport() {

$('div#DivReport').slideToggle("fast");

}

function ShowUnreport(id) {

var id;

$('div#DivReport').html("<img src=\"ajax-loading.gif\">");

$('div#DivReport').load("dynamic/unreport.php?id=" + id);

}

function ShowComments() {

$('div#DivComments').slideToggle("fast");

}

function NewComment() {

$('div#DivNewComment').slideToggle("fast");

}

function ShowNfo() {

$('div#divNfo').slideToggle("fast");

}

function DeleteMirror(id, postid) {

$("div#DivDeleteMirror" + id).html('<img src="../themes/girly/ajax-loading1.gif">');

$("div#DivDeleteMirror" + id).load('dynamic/deletemirror.php?mirrorid=' + id + '&postid=' + postid);

}

 

[attachment deleted by admin]

  • 2 weeks later...

you would like to change the image or text field?

 

 

you can use ajax to do this.

 

 

I would like to change the text field, as you can see in the first image i posted where it reads

 

Download links:

Click here to say thanks and view the download link

 

I want "Click here to say thanks and view the download link" to change to the download link when someone clicks on that text

 

<script>

function link(link) {

document.getElementById('lol').innerHTML = link;

}

</script>

 

<p id="lol" onclick="link('http://google.com');">Click here to download</p>>

 

 

sorry this is the working one.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.