Var value is not passed

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Sep 2004
Posts: 3
Reputation: dr_dumb99 is an unknown quantity at this point 
Solved Threads: 0
dr_dumb99 dr_dumb99 is offline Offline
Newbie Poster

Var value is not passed

 
0
  #1
Jul 14th, 2006
Hi!

[html]<script language="javascript">
var myuid = 2;
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>[/html]


My problem is that , var myuid is not replaced with value in the url.

Kindly help me in this regard
Last edited by tgreer; Jul 15th, 2006 at 12:40 am.
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 166
Reputation: Lafinboy is an unknown quantity at this point 
Solved Threads: 7
Lafinboy's Avatar
Lafinboy Lafinboy is offline Offline
Junior Poster

Re: Var value is not passed

 
0
  #2
Jul 14th, 2006
You have an extra quote mark in your document.write line which is closing the href value before your variable is added. Try:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. 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>');
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.

Lafinboy Productions
:: Website Design :: Website Development ::

Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC