...

View Full Version : using JS to change HTML tags?



Corwin
08-13-2008, 03:14 PM
Is this possible, and if so how should i do it?

i can switch tag elements around (change style properties for example) or even change the inner HTML (a + becomes a -)

but what i want to do is have a button which changes the html on the whole page

<textarea id="textarea" cols="15" rows="1" name="startdate" ><xsl:value-of disable-output-escaping="yes" select="comment"/> </textarea>

[edit- the 'name' is diferent for all 120 ish textboxes on the page!]
to

<div style="overflow:auto; width:300px; height:100px;"><xsl:value-of disable-output-escaping="yes" select="comment"/> </div>

and back if it is needed.

a plus would be doing it without losing whatever new text was inputed into the text area and displaying that new text in the div as well as submitting it as the form.

page in question if it helps:

http://www.public.asu.edu/~btixier/master/MKT502/frontpage.xml

source available in this directory (XSL file)
http://www.public.asu.edu/~btixier/master/MKT502/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum