>>>How can I keep this value when the javascript returns? Any help would 
>be appreciated.
>
>The value is not supposed to be lost. So there must be something wrong 
>your Javascript is doing.
>Hard to say if you don't show your script.
>
>-- 
>_______________________________________
>REUSE CODE! Use custom tags;
>See http://www.contentbox.com/claude/customtags/tagstore.cfm
>(Please send any spam to this address: [EMAIL PROTECTED])
>Thanks.

Here is the validation Script. The variable that is getting lost is not being 
passed to the script it is a URL Variable from the referring page. Flow is as 
follows
on the index.cfm I as the user for a document number, using the document numbe 
I take them to page 2 (add workflow), when I am validating fields on the add 
workflow page I lose the referring document number.


function checkrequired(which) {
  var pass=true;
  for (i=0;i<which.length;i++) {
    var tempobj=which.elements[i];
    if (tempobj.name.substring(0,8)=="required") {
      if (((tempobj.type=="text"||tempobj.type=="textarea")&&
          tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
          tempobj.selectedIndex==0)) {
        pass=false;
        break;
      }
    }
  }
  if (!pass) {
    shortFieldName=tempobj.name.substring(8,30).toUpperCase();
    alert("The "+shortFieldName+" field is a required field.");
    return false;
  } else {
  return true;
  }
}




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/Javascript/message.cfm/messageid:4808
Subscription: http://www.houseoffusion.com/groups/Javascript/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.33

Reply via email to