943,648 Members | Top Members by Rank

Ad:
Nov 6th, 2008
0

JS variable inside HTML

Expand 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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
yasmena is offline Offline
45 posts
since May 2008
Nov 10th, 2008
0

Re: JS variable inside HTML

Click to Expand / Collapse  Quote originally posted by yasmena ...
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
Reputation Points: 10
Solved Threads: 3
Newbie Poster
sasankasekhar is offline Offline
24 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Capturing line number at the current cursor position
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Button to send POST data





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC