If you ever use jQuery's .val() function to set the value of an input (in my case, a hidden one), there's something you might not be aware of.
In my implementation, I had this in the code:
<input type="hidden" name="viewonly" id="trial-viewonly" value="" />
And was trying to override it with
$('#trial-viewonly').val('No');
But it seemed as if jQuery's .val() was not working in Firefox or IE, but it worked fine in Chrome! Using .attr() didn't work either... Yet strangely, I could run an alert which would return the right value, yet Firebug still displayed a blank value:
$('#trial-viewonly').attr('value', 'No'); alert($('#trial-viewonly').val()); //alerts No
Why? After what seemed like an age trying to work out the problem, it came down to the value="". In the past, I've had to set certain attributes specifically to be able to use them with certain jQuery things, but it seems in this case that would break it in certain browsers. Once I removed the value attribute from my hidden input tag, it worked a treat... Something to keep in mind for next time me thinks.