| | |
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
![]() |
•
•
Join Date: Sep 2004
Posts: 3
Reputation:
Solved Threads: 0
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
[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.
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)
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 ::
Lafinboy Productions
:: Website Design :: Website Development ::
![]() |
Similar Threads
- Passing data from forms from one page to another (JavaScript / DHTML / AJAX)
- fstream Tutorial (C++)
- Urgent.....Dynamic Changes.... (JavaScript / DHTML / AJAX)
- Can Someone please check my project & comment/tips (C)
- just a quick question (C++)
- automatic type conversion (PHP)
- storing references to classes (C++)
- Launching an application from a thread (C++)
- JScript experts - HELP needed! (Java)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: javascript code not working in mozillafirefox
- Next Thread: Image Rotation w/Links
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
ajax ajaxexample ajaxjspservlets array autoplay blackjack browser captchaformproblem checkbox child class close codes date debugger dependent developer disablefirebug dom editor element embed engine events explorer ext file firefox flash form forms game gears getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe internet java javascript javascripthelp2020 jquery jsf jsfile jsp jump libcurl maps marquee masterpage math matrixcaptcha media mysql object onerror onmouseoutdivproblem onreadystatechange parent passing paypal pdf php player position post programming rated redirect runtime safari scriptlets scroll search security session shopping size software solutions star stars stretch synchronous toggle tweet unicode variables web webkit webservice window wysiwyg \n





