Domino bit me yesterday...
Category None
No not Bruce's dog, I mean Domino the product. I had been doing some JavaScript work, and manipulating some hidden fields, all worked great in IE, then on to making it work with Firefox. Shouldn't be a problem I thought. Well it turned out it was. IE seems to be quite happy to treat fields that have a name defined but no id, where as, Firefox wants id's and doesn't seem to really care about names (probably something to do with standards).
Anyway after figuring out the problem was that the hidden field didn't have an id assigned, I thought it would be easy to fix, just add the name to the id field on the form properties. No joy it never appeared, hhm time to investigate, turns out if the field is hidden Domino doesn't appear to push those properties out even though it creates the field. So I still wanted the field hidden but I needed the id tag to be there and populated. After trying a few solutions here is the one I came up with, place the field unhidden within the following HTML, this will make Domino honour the extra field properties, but not display the field to the end user.
<span style="display:none">DOMINOFIELDHERE</span>
Did I miss a simple form property somewhere? Is there an easy way for Domino to honour the id tag for hidden fields?
No not Bruce's dog, I mean Domino the product. I had been doing some JavaScript work, and manipulating some hidden fields, all worked great in IE, then on to making it work with Firefox. Shouldn't be a problem I thought. Well it turned out it was. IE seems to be quite happy to treat fields that have a name defined but no id, where as, Firefox wants id's and doesn't seem to really care about names (probably something to do with standards).
Anyway after figuring out the problem was that the hidden field didn't have an id assigned, I thought it would be easy to fix, just add the name to the id field on the form properties. No joy it never appeared, hhm time to investigate, turns out if the field is hidden Domino doesn't appear to push those properties out even though it creates the field. So I still wanted the field hidden but I needed the id tag to be there and populated. After trying a few solutions here is the one I came up with, place the field unhidden within the following HTML, this will make Domino honour the extra field properties, but not display the field to the end user.
<span style="display:none">DOMINOFIELDHERE</span>
Did I miss a simple form property somewhere? Is there an easy way for Domino to honour the id tag for hidden fields?
Comments
Posted by Tim Tripcony At 11:51:55 AM On 12/13/2005 | - Website - |
Posted by Carl At 11:59:56 AM On 12/13/2005 | - Website - |
Posted by Christopher Byrne At 03:15:18 PM On 12/13/2005 | - Website - |
Posted by Steve Castledine At 05:19:32 AM On 12/14/2005 | - Website - |
<input name="Fieldname" type="hidden" value="Put computed text or field here">
Posted by Vince Schuurman At 06:03:32 AM On 12/14/2005 | - Website - |
Posted by Carl Tyler At 10:53:05 AM On 12/15/2005 | - Website - |
function initdocument() {
/* Adjust element name= with id=;
In IE GetdocumentByID works on id= and on name=; in Mozilla (and others) you MUST have ID */
var collection = null;
if(typeof document.all == "object") {
collection = document.all }
else {
if(typeof document.getElementsByTagName == "function"
&& document.getElementsByTagName("*").length > 0) {
collection = document.getElementsByTagName("*");
}
if(collection == null) return; // Cancel if it didn't work
for(var i = 0; i < collection.length; i++) {
// Check for a name and then for an ID
if (collection.name) {
collection.id = collection.name;
}
}
};
Posted by Stephan H. Wissel At 09:50:57 PM On 12/17/2005 | - Website - |