Jump to content


Photo

how to put this variable in js?


  • Please log in to reply
No replies to this topic

#1 victormenezes

victormenezes

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 01 March 2014 - 11:12 AM

I'm doing a protector of link, the link is hidden in this php variable

 

 

<?=$url;?>

this is the js code which generates a button for the person to continue.

function getParam(_0xd83bx2){return(location['search']['match'](new RegExp(_0xd83bx2+'=([^?&=]+)'))||[])[1]||'';};var url_final=hexDecode(getParam('url'));if(url_final==false||url_final==''){var url_seguir='http://www.hostmp.net';}else{var url_seguir=url_final;};timer=10;ventana=null;n=5;aviso=false;function janelaTAFC(){ventana=window.open('http://meusite.com/anuncio/','PopUp','scrollbars=no,location=no,toolbar=no,status=no,menubar=no,directories=no,resizable=no,width=1000,height=400,left=50%,top=50%');$('a[name=btnDownload]')['remove']();$('input[name=imgDownload]')['before']('<input type="image"  name="imgDownload" src="imagens/loading.gif" />','<a href="#" name="imgDownload" class="download_regular_disabled" id="spr" ></a>');timer=setInterval('tafc_contagem()',3000);};function tafc_contagem(){if(ventana!=null){if(ventana['closed']){alert('* Aten\xE7\xE3o! * \x0A\x0AVoc\xEA deve seguir as instru\xE7\xF5es .\x0A\x0ATente novamente.');clearInterval(timer);n=5;window.location.reload();};if(ventana['frames']['length']==3){return false;}else{n=n- 1;if(n==0){clearInterval(timer);$('input[name=imgDownload]')['remove']();$('a[name=imgDownload]')['remove']();$('a[name=efetuarDownload]')['before']('<a href="#" name="efetuarDownload" class="download_premium_but" id="efetuar"></a>');$('#efetuar')['click'](function(){window['location']=url_seguir;});};};};};

where

 

('<a href="#" name="efetuarDownload" class="download_premium_but" id="efetuar"></a>')

is my final result.

 

is possible in place of # put the php variable?

 

I put a href in php page with display: none like this:

<a href=<?=$url;?> name="efetuarDownload" class="download_premium_but" id="efetuar2" style="display:none" /></a>

 

it works it is possible to get the url to efetuar2 and replace # efetuar?


Edited by victormenezes, 01 March 2014 - 11:13 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com