JS variable inside HTML

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

Join Date: May 2008
Posts: 43
Reputation: yasmena is an unknown quantity at this point 
Solved Threads: 0
yasmena yasmena is offline Offline
Light Poster

JS variable inside HTML

 
0
  #1
Nov 6th, 2008
i wonder how can write a JS variable inside HTML

here's the Line:

var texture=document.getElementById('texture').value;
formdiv.innerHTML = formdiv.innerHTML +'<td align=center> JS VARIABLE TEXTURE</td>';




any help is appreciated
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 24
Reputation: sasankasekhar is an unknown quantity at this point 
Solved Threads: 3
sasankasekhar's Avatar
sasankasekhar sasankasekhar is offline Offline
Newbie Poster

Re: JS variable inside HTML

 
0
  #2
Nov 10th, 2008
Originally Posted by yasmena View Post
i wonder how can write a JS variable inside HTML

here's the Line:

var texture=document.getElementById('texture').value;
formdiv.innerHTML = formdiv.innerHTML +'<td align=center> JS VARIABLE TEXTURE</td>';




any help is appreciated

var texture=document.getElementById('texture').value;
formdiv.innerHTML = formdiv.innerHTML +'<td align=center>' + texture + '</td>';


Hope this Helps.
Regards
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