Page 1 of 1

<script language=\"javascript\"> Strange Dis

Posted: Mon Jul 17, 2006 11:36 am
by bluesapphire
Weirdan | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi!
I have got following code from the source of the page.
[syntax="javascript"]
/************/
<script language="javascript">
var myuid = 12.325;
var uri = 'http://impgb.tradedoubler.com/imp/img/16173558/1014659?' + new String (Math.random()).substring (2, 11);
document.write('<a href=\"http://clkuk.tradedoubler.com/click?p=37983&a=1014659&g=16173558&epi=\"'+myuid+'\" target=\"_blank\"><img src=\"'+uri+'\" border=0></a>');
</script>
/***********/
The value of myuid is not replaced and if i take cursor on the link then there is no value of epi is shown. One more thing, I am using a variable $_SESSION['UID'] .How can I assign value of $_SESSION['UID'] to epi in this code.

Kind Regards


Weirdan | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Re: <script language=\"javascript\"> Strange

Posted: Mon Jul 17, 2006 11:45 am
by RobertGonzalez

Code: Select all

/************/
<script language="javascript">
var myuid = <?php echo $_SESSION['UID']; ?>;
var uri = 'http://impgb.tradedoubler.com/imp/img/16173558/1014659?' + new String (Math.random()).substring (2, 11);
document.write('<a href=\"http://clkuk.tradedoubler.com/click?p=37983&a=1014659&g=16173558&epi=\"'+myuid+'\" target=\"_blank\"><img src=\"'+uri+'\" border=0></a>');
</script>
/***********/