all groups > dotnet jscript > january 2006 >
You're in the

dotnet jscript

group:

dynamic text


dynamic text Nicolas
1/23/2006 1:00:59 PM
dotnet jscript:
Hello friends,

I neet to change a text into a table cell when the user click on an image.
The value of this text arrive from a variable.

Thank you for your suport.

Nico

Re: dynamic text Yunus Emre ALPÖZEN [MVP]
1/23/2006 10:03:06 PM
define an id for your table cell. and handle relevant image click event.
change the text inside cell by using innerHTML/innerText and accessing cell
via its id....

--
HTH

Thanks,
Yunus Emre ALPÖZEN
BSc, MCSD.NET
Microsoft .NET & Security MVP

[quoted text, click to view]

Re: dynamic text Vidar Petursson
2/5/2006 7:02:45 PM
Hi,

<img onclick="doIt('blah')".....

<td id="myTD"....

function doIt(sTxt){
if(document.getElementById){
var e = document.getElementById("myTD");
if(e!=null) e.innerText = sTxt;
}
}

More info:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/dhtml_reference_entry.asp

Best Regards
Vidar Petursson

[quoted text, click to view]

AddThis Social Bookmark Button