EvilRob.org -> Weblog

Sysadmin Field Notes

Bad mama-jama

March 25, 2005

I'd like to nominate this gem as the ugliest workaround of the year:

2) For a RadioButtonList The HTML is created for us. We cannot insert extra tags between the radio button and its label. However, we can use client code to insert these tags after the HTML arrives at the client. The following code demonstrates this. This code can be added directly to the HTML, or you can use Page.RegisterStartupScript.

<script>
var s;
s = document.all("RadioButtonList1").item(0).outerHTML;
s = s.replace(/<LABEL/gi,"</td><td><LABEL");
document.all("RadioButtonList1").item(0).outerHTML = s;
</script>

Wow. How about we just do away with the whole "drag and drop"/event driven/vb6 model for serious web applications that actually want to be maintainable instead?

Posted by rmeyer at 1:26 AM
Comments
Posted by Neil at March 25, 2005 11:44 PM

It's nice to see a good, clean, cross platform, w3c compliant, "document.all" fix to this ISAPI/Asp-only short coming.

Wait. Nevermind.

This is Rob Meyer's weblog, a weblog focused on software development and system administration based on 10 years of experience. Want to explore further? You can find out more me or see the rest of my website.

Wondering if I've written on something in particular? Try searching:

You might want to take a look at some of the more requested postings (as judged by incoming traffic):

Want more? Subscribe to this site or contact me at rob at big dis dot com.

See my writings on:


Powered by Movable Type | Technorati Profile