Jump to content

how to put this variable in js?


victormenezes

Recommended Posts

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.