Jump to content
We've recently updated our Privacy Statement, available here ×

pallavi.thota

Members
  • Posts

    1
  • Joined

  • Last visited

pallavi.thota's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I have four input controls in jasper server like CCA, CCIT, CIT and TAN. Now those four fields has to get validated and proper alert message has to be displayed when TAN input control is entered other CCA, CCIT and CIT has to get disabled and when you enter anything in CCA, CCIT and CIT then TAN input has to get disabled. this validations i has generated in JSP code and trying to publish a report in jasperserver by script is as follows: function disableElements(){ var cca1=document.getElementById("cca").value; var ccit1=document.getElementById("ccit").value; var cit1=document.getElementById("cit").value; var tan1=document.getElementById("tan").value; if((cca1!="")||(ccit1!="")||(cit1!="")) { alert("1"); document.getElementById("tan").disabled=true; } if((cca1=="")&&(ccit1=="")&&(cit1=="")) { alert("2"); document.getElementById("tan").disabled=false; } } function disableElements1(){ var tan1=document.getElementById("tan").value; alert(tan1); if(tan1=="") { document.getElementById("cca").disabled=false; document.getElementById("ccit").disabled=false; document.getElementById("cit").disabled=false; }else { document.getElementById("cca").disabled=true; document.getElementById("ccit").disabled=true; document.getElementById("cit").disabled=true; } } function checkValue(){ var checkStr=documentforms[0].elements[4].value; alert(checkStr); //Regex obj = new Regex("[A-z]{5}[0-9]{4}[A-z]{1}"); if(checkStr.match(/b[A-z]{5}[0-9]{4}[A-z]{1}b/)==null){ alert("Please enter 5 alphabetic 4 numeric and 1 alphabet only in the field"); return false; } } This script is working fine when i use input fields in jsp and execute. But, when i use same script with same input control names and all no alert window nor any kind of messages are displayed nor report values get changed.. I need solution how to make input controls can speak with script and fire proper alert messages. Thank you in advance. Pallavi Thota.
×
×
  • Create New...