I wrote a comparison validator, that compares two inputs values.
Originally in tried using the primary input's name attribute to store the secondary inputs id.
//example: does not work in IE7
<input id='txtPrimary' type='text' class='compare' name='txtSecondary'/>
<input id='txtSecondary' type='text' />
This work in every browser except IE7. I then tried using the rel attribute, but this broke in FF.
I decided to just put the secondary input's id in the class attribute.
//example: appears to work
<input id='txtPrimary' type='text' class='compare @txtSecondary'/>
<input id='txtSecondary' type='text' />
I was also thinking about maybe doing something like:
//example: just an idea at the point
<input id='txtPrimary' type='text' class='compare id:txtSecondary'/>
<input id='txtSecondary' type='text' />
Before I continue working on this, even though it appears to be working cross-browser, are there any known issues with putting invalid CSS class characters (@,:,!) in the class attribute of a HTML element?