...

View Full Version : Span Tag ID Manipulation . . . Help Needed



vkkumar
09-05-2006, 01:09 PM
I have a span tag on my page . . .

<span id="subTotal1">0.00</span>

I need to change the "id" name on the fly or dynamically on an "onChange()" event.

Can anyone help me on this . . . .

Can I use Normal Javascript & DOM as well?


Thanks in Advance

vwphillips
09-05-2006, 01:32 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<title></title>
<script language="JavaScript" type="text/javascript">
<!--

function Ck(obj,nme){
alert(obj.id);
obj.id=nme;
alert(obj.id);
}
//-->
</script></head>

<body>
<span id="subTotal1" onclick="Ck(this,'fred');" >0.00</span></body>

</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum