Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSf bugs??? oamsubmitform???

843844Oct 31 2008 — edited Oct 31 2008
in our page, if you click a link, in firefox, it works all right. we can get the link,
but in IE, it gives error info:
--> elements.emp:_idJsp1:_idcl is null or not an object


some say that is the jsp problem

I see the source of the page: I find it may be the oamsubmitform function problem

I am just curiuos whether it is a JSF bugs, or the oamsubmitform function problem???thank you so much

some text (some text2)

function oamSetHiddenInput(formname, name, value)
{
var form = document.forms[formname];
if(typeof form.elements[name]=='undefined')
{
var newInput = document.createElement('input');
newInput.setAttribute('type','hidden');
newInput.setAttribute('name',name);
newInput.setAttribute('value',value);
form.appendChild(newInput);
}
else
{
form.elements[name].value=value;
}

}


function oamClearHiddenInput(formname, name, value)
{
var form = document.forms[formname];
if(typeof form.elements[name]!='undefined')
{
form.elements[name].value=null;
}

}

function oamSubmitForm(formName, linkId, target, params)
{

var clearFn = 'clearFormHiddenParams_'+formName.replace(/-/g, '\$:').replace(/:/g,'_');
if(typeof eval('window.'+clearFn)!='undefined')
{
eval('window.'+clearFn+'(formName)');
}

var oldTarget = '';
if((typeof target!='undefined') && target != null)
{
oldTarget=document.forms[formName].target;
document.forms[formName].target=target;
}
if((typeof params!='undefined') && params != null)
{
for(var i=0; i<params.length; i++)
{
oamSetHiddenInput(formName,params[0], params[i][1]);
}

}

oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);

if(document.forms[formName].onsubmit)
{
var result=document.forms[formName].onsubmit();
if((typeof result=='undefined')||result)
{
document.forms[formName].submit();
}

}
else
{
document.forms[formName].submit();
}
if(oldTarget==null) oldTarget='';
document.forms[formName].target=oldTarget;
if((typeof params!='undefined') && params != null)
{
for(var i=0; i<params.length; i++)
{
oamClearHiddenInput(formName,params[i][0], params[i][1]);
}

}

oamClearHiddenInput(formName,formName +':'+'_idcl',linkId);return false;
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 28 2008
Added on Oct 31 2008
5 comments
904 views