Jsp throw numberformatexception.see my code .reply as soon as possible

i am developed application onclick checkbox delete the record.on first field i give the href to serailno for open the update page. like this <a href="UpdateBoq.jsp?S_NO=<%=sno%>">.sno is serialno.is come from database wihen i am click on serial no it show the updatepage.jsp is not open the updatepage.jsp but it throw the exception number format.this is my code.anybody help me this my project working i am only the single persion to develop this application in jsp.please help me.as soon as possible
<%@ page language="java" import="java.sql.*"%>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>
<%! int count = 0; %>
<%! String itemcode;%>
<%! String sns;%>
<%! String contunit; %>
<%! float qty; %>
<%! float oup;%>
<%! float oep;%>
<%! int sno;%>
<%! int stcode;%>
<%! float sum=0.0f;%>
<%! float sum1=0.0f;%>
<jsp:useBean id="sos" class="boq.Calculation" scope="request"/>
<%
//String userID = String.valueOf(session.getAttribute("APP_USER_ID"));
//String userID = String.valueOf(session.getAttribute("LOGIN_ID"));
String strDelete = request.getParameter("btnDelete");
String strserialno=request.getParameter("serialno1");
String strmopno = request.getParameter("mop");
String strjobno = request.getParameter("job");
String strwop=request.getParameter("siten");
String strno=request.getParameter("siteno");
if (strDelete != null)
String del=request.getParameter("hidcount");
int delcount=-1;
if (del!=null)
System.out.println("I am in start of delete Action");
delcount = Integer.parseInt(del);
String strCheckBox="";
String strHidVal="";
for (int i=0; i<=delcount; i++)
strCheckBox = request.getParameter("checkbox"+i);
if(strCheckBox!=null)
strHidVal = request.getParameter("hid"+i);
System.out.println("country code is :"+strHidVal);
System.out.println(del);
Connection con=null;
try
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
con = DriverManager.getConnection("jdbc:oracle:thin:@192.168.0.87:1521:orcl","system","tiger");
System.out.println(con);
Statement st2 = con.createStatement();
Statement st1 = con.createStatement();
String str0="select * from BOQ where S_NO= '"+ strHidVal + "'";
ResultSet rs = st1.executeQuery(str0);
String str="delete from BOQ where S_NO= '"+ strHidVal + "'";
System.out.println(strCheckBox);
int a=st2.executeUpdate(str);
catch(Exception e)
%>
<script language="JavaScript">
alert("<%=e.getMessage()%>");
</script>
<%
finally
if(con!=null)
con.close();
%>
<html>
<head>
<title>CRS</title>
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="stylesheet" href="css/ems.css" type="text/css">
</HEAD>
<body leftmargin=0 topmargin=2>
<jsp:include page="Index.html" />
<form name=form1 action="BOQVIEW.jsp" method=post>
<table border=0 cellspacing=1 cellpadding=1 width=100% height=5>
<tr>
<td valign="top" height="23">
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td bgcolor='#E6E4E4' width=45 align="Center" colspan=2>
<font color="#5d7a80" size="2">
BOQ OF MOPS
</font>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign=top>
<table width="100%" cellpadding="1" cellspacing="1" border="0">
<tr>
<td width="130" height="5" class="ReportColumnHeader" align="center" colspan=40>S/NO</td>
<td width="130" height="5" class="ReportColumnHeader" align="center" colspan=60>SITE NAME</td>
<td width="130" height="5" class="ReportColumnHeader" align="center" colspan=65>SITE NUMBER</td>
<td width="130" height="5" class="ReportColumnHeader" align="center" colspan=90>ITEM CODE/MATERIAL CODE</td>
<td width="180" height="5" class="ReportColumnHeader" align="center"colspan=120>CONTRACT UNIT DESCRIPTION ORIGINAL</td>
<td width="130" height="5" class="ReportColumnHeader" align="center" colspan=>QUANTITY</td>
<td width="130" height="5" class="ReportColumnHeader" align="center" colspan=90 >ORIGINAL UNIT PRICE</td>
<td width="130" height="5" class="ReportColumnHeader" align="center" colspan=100>ORIGINAL EXTENDED PRICE</td>
</tr>
</table>
<%
Connection con=null;
try
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","system","tiger");
System.out.println(con);
Statement st = con.createStatement();
Statement st1=con.createStatement();
String qoq=request.getParameter("qoq");
int one=Integer.parseInt(qoq);
ResultSet rs = st.executeQuery("SELECT * from BOQ where SITE_CODE="+one);
ResultSet rs1=st1.executeQuery("select SUM(O_U_P) AS oriunitprice,SUM(O_E_P) AS oriextendsprice from boq WHERE SITE_CODE="+one);
%>
<%
int count=0;
while(rs.next())
sno=rs.getInt(1);
stcode=rs.getInt(2);
sns=rs.getString(3);
itemcode=rs.getString(4);
contunit = rs.getString(5);
qty=rs.getFloat(6);
oup = rs.getFloat(7);
oep = rs.getFloat(8);
%>
<table border="0" cellspacing="1" cellpadding="1" width="100" >
<tr>
<td class="ReportCellText1" width="10" height=><input type=checkbox name="<%="checkbox"+count%>" onselect="deleterecord();"> </td>
<td class="ReportCellText1" width="130" height="5" align="center" colspan=29><a href="UpdateBoq.jsp?S_NO=<%=sno%>"><%=sno%></a>
</td>
<td class="ReportCellText1" width="55" height="5" align="center" COLSPAN=60><%=sns%></td>
<td class="ReportCellText1" width="50" height="5" align="center" COLSPAN=65><%=stcode%></td>
<td class="ReportCellText1" width="130" height="5" align="center" COLSPAN=90><%=itemcode%></td>
<td class="ReportCellText1" width="130" height="5" align="center" COLSPAN=120><%=contunit%></td>
<td class="ReportCellText1" width="130" height="5" align="center" COLSPAN=54><%=qty%></td>
<td class="ReportCellText1" width="130" height="5" align="center" COLSPAN=90><%=oup%></td>
<td class="ReportCellText1" width="130" height="5" align="center" colspan=100> <%=oep%></td>
</tr>
<tr>
</table>
<input type=hidden name="<%="hid"+count%>" value="<%=sno%>">
<!--
</tr>
<tr>
</tr>
<tr>
</tr> !-->
<%
count++;
%>
<table width="100%" cellpadding="1" cellspacing="1" border="0">
<TR>
<td width="60" height="5" class="ReportCellText3" align="center" colspan=></td>
<td class="ReportCellText3" width="55" height="5" align="center" COLSPAN=></td>
<td width="60" height="5" class="ReportCellText3" align="center" colspan=></td>
<td class="ReportCellText3" width="50" height="5" align="center" COLSPAN=></td>
<td class="ReportCellText3" width="50" height="5" align="center" COLSPAN=></td>
<td class="ReportCellText3" width="50" height="5" align="center" COLSPAN=></td>
<td class="ReportCellText3" width="50" height="5" align="center" COLSPAN=></td>
<%
rs1.next();
sum=rs1.getFloat("oriunitprice");
sum1=rs1.getFloat("oriextendsprice");
%>
<td width="60" height="5" class="ReportColumnHeader" align="center" colspan=>TOTLE AMOUNT</td>
<td class="ReportCellText1" width="85" height="5" align="center" colspan=> <%=sum%></td>
<td class="ReportCellText1" width="90" height="5" align="center" colspan=> <%=sum1%></td>
</table>
<TABLE>
<input type=hidden name=hidcount value =<%=count%>>
<input type=hidden name=serialno value=<%=itemcode%>>
<INPUT TYPE=hidden NAME=mop VALUE=<%=contunit%> >
<INPUT TYPE=hidden NAME=job VALUE=<%=qty%> >
<INPUT TYPE=HIDDEN name=siten value=<%=oup%>>
<input type=hidden name=siteno value=<%=oep%>>
<table><tr><td>
<input type = button value = Print size=20 onClick = "window.print();"></td>
<td><input type = Submit value = "Delete" name="btnDelete" size = 20> </td>
</form>
<form action=BOQ.jsp method=post>
<td><input type=Submit value = "Add New" size=20></td>
</form>
<form action=NEWPEexl.jsp method=post>
<td><input type=Submit value = "Export to Excel" size=20></td></tr></table>
</form>
<%
catch(Exception e)
out.println(e.getMessage());
finally
if(con!=null)
con.close();
%>
</body>
</html>
when i am click the serial no it show the update page is update .jsp
this is the update code
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/fileaccess.tld"
prefix="fileaccess"%>
<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/sqltaglib.tld"
prefix="database"%>
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ page language="java" import="java.sql.,java.util."%>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>
<%! int count = 0; %>
<%!Connection con=null;%>
<%!PreparedStatement ps=null;%>
<%
String strUpdate = request.getParameter("btnUpdate");
String sno=request.getParameter("serialno1");
int snoi=Integer.parseInt(request.getParameter("serialno1"));
String sc=request.getParameter("sitenumber");
int sci=Integer.parseInt(request.getParameter("sitenumber"));
String sn=request.getParameter("sitename");
String itc=request.getParameter("itemno");
String cu=request.getParameter("contract");
String qty=request.getParameter("quantity");
float qtyf=Float.parseFloat(request.getParameter("quantity"));
String oup=request.getParameter("orig");
float oupf=Float.parseFloat(request.getParameter("orig"));
String oep=request.getParameter("origexp");
float oepf=Float.parseFloat(request.getParameter("origexp"));
if (strUpdate != null)
try
Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection("jdbc:oracle:thin:@192.168.0.87:1521:orcl","system","tiger");
System.out.println(con);
System.out.println("Connection Established");
Statement st = con.createStatement();
String str="update BOQ set SITE_CODE="sci",SITE_NAME='"sn"',ITEM_CODE='"itc"',CONTRACT_UNIT='"cu"',QTY="qtyf",O_U_P="oupf",O_E_P="oepf" where S_NO="snoi" ";
int a=st.executeUpdate(str);
if (a>0)
%>
<script type="text/javascript" >
alert("The Record has been Updated Successfully");
<% response.sendRedirect("BOQVIEW.jsp"); %>
</script>
<%
catch(Exception e)
String m = e.getMessage();
%>
<font size="1" face="Verdana" color=blue>
"<%=m%>"</font>
<%
try
if(con!=null)
con.close();
catch(SQLException sq)
out.println(sq.getMessage());
%>
<!-- Insert the data code-->
<HTML>
<head>
<title>BOQ</title>
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<script type="text/javascript">
function callingdate()
Calendar.setup({
inputField : "f_date_b", //*
ifFormat : "%d-%b-%Y ",
showsTime : true,
button : "f_trigger_b", //*
step : 1
function callingdate1()
Calendar.setup({
inputField : "f_date_b1", //*
ifFormat : "%d-%b-%Y ",
showsTime : true,
button : "f_trigger_b1", //*
step : 1
function dating()
var mylist=document.getElementById("effective_date")
document.getElementById("date").value=mylist.options[mylist.selectedIndex].text
function caps() {
document.form1.country_code.value = document.form1.country_code.value.toUpperCase()
document.form1.country_name.value = document.form1.country_name.value.toUpperCase()
</script>
</head>
<BODY >
<% count++;
%>
<form name=form1 action=UpdateBoq.jsp method=post>
<!-- <h3 STYLE = "BACKGROUND-COLOR=blue;
COLOR=YELLOW"
align=center color=green>Country Information</h1> !-->
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td bgcolor='#336699' align="Center"><font color="#d2b48c" size=2>BOQ OF MOPS</font> </td>
</tr>
</table>
<%
Connection con=null;
try
Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection("jdbc:oracle:thin:@192.168.0.87:1521:orcl","system","tiger");
System.out.println(con);
Statement st = con.createStatement();
String se=request.getParameter("serialno1");
//int ser=Integer.parseInt(request.getParameter("serialno1"));
String s="SELECT * from BOQ where S_NO="Integer.parseInt(request.getParameter("serialno1"))" ";
ResultSet rs = st.executeQuery(s);
System.out.println(s);
%>
<%
while(rs.next())
int serialno=rs.getInt(1);
int stcode=rs.getInt(2);
String sname=rs.getString(3);
String itcode=rs.getString(4);
String conunit=rs.getString(5);
float qtyw = rs.getFloat(6);
float oupw=rs.getFloat(7);
float oepw=rs.getFloat(8);
%>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td bgcolor='#E6E4E4' align="Center" width=100%><font color="#5d7a80" size=2>BOQ OF MOPS </font> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><td >
1)SERIAL NUMBER:</td><td><input type=text name=serialno1 value= "<%=serialno%>" size=10 onblur = "caps();">
</td></tr>
<tr><td >
2)SITE NUMBER:</td><td><input type=text name=sitenumber value= "<%=stcode%>" size=10 onblur = "caps();">
</td></tr>
<tr><td >
3)SITE NAME:</td><td><input type=text name=sitename value= "<%=sname%>" size=10 onblur = "caps();">
</td></tr>
<tr><td>
4)ITEM CODE/MATERIAL CODE:</td><td><input type=text name=itemno value= "<%=itcode%>" size = 20 onblur = "caps();" >
</td></tr>
<tr><td>
5)CONTRACT UNIT DESCRIPTION:</td><td><input type=text name=contract value= "<%=conunit%>" size = 20 onblur = "caps();" >
</td></tr>
<tr><td>
6)QUANTITY:</td><td><input type="text" name="quantity" value= "<%=qtyw%>" size =40 onblur = "caps();" >
</td></tr>
<tr><td>
7)ORIGNAL UNIT/PRICE:</td><td><input type=text name=orig value= "<%=oupw%>" size = 20 onblur = "caps();" >
</td></tr>
<tr><td>
8)ORIGNAL EXTENDED/PRICE:</td><td><input type=text name=origexp value= "<%=oepw%>" size = 20 onblur = "caps();" >
</td></tr>
</TABLE>
<%
%>
<center>
<table>
<tr><td>
<INPUT TYPE=Submit value = Update name="btnUpdate" size=20/></td> </tr></table>
</form>
<form action="BOQVIEW.jsp" method = post>
<center> <table>
<tr><td>
<input type="submit" value="View" size="20"></input>
</td> </tr></table>
</form>
</form>
</table>
</center>
<hr>
<script type="text/javascript">
Calendar.setup({
inputField : "f_date_b", //*
ifFormat : "%d-%b-%Y ",
showsTime : false,
button : "f_trigger_b", //*
step : 1
Calendar.setup({
inputField : "f_date_b1", //*
ifFormat : "%d-%b-%Y",
showsTime : false,
button : "f_trigger_b1", //*
step : 1
</script>
</BODY>
<%
catch(Exception e)
out.println(e.getMessage());
finally
try
if(con!=null)
con.close();
catch(SQLException sq)
out.println(sq.getMessage());
%>
</HTML>
this my table database oracle 9i
CREATE TABLE BOQ
S_NO INTEGER NOT NULL,
SITE_CODE INTEGER,
SITE_NAME VARCHAR2(40),
ITEM_CODE VARCHAR2(20),
CONTRACT_UNIT VARCHAR2(60),
QTY FLOAT(70),
O_U_P FLOAT(70),
O_E_P FLOAT(70)
);</a>

1. Use code tags, there's button that says 'Code'. Select your text and use that. I'm not going to read your code while it's unformatted like this and especially because you seem to have posted your whole darn project here; and I suspect few others will bother either.
2. Don't paraphrase the exception; post the exact stack trace.
3. There's usually a line number given with the exception; which line does your stack trace point to? Try to figure out what you're doing wrong there.
4. NumberFormatException means that you're trying to parse a string that's not in the correct format. Make sure the data you're getting from the DB is correct.
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
----------------------------------------------------------------

Similar Messages

  • How to create a apple ID without credit card needed i want a none credit card.. Please help me... Thank you hope u replied as soon as possible.. Thank you again..

    How to create a apple ID without credit card needed i want a none credit card.. Please help me... Thank you hope u replied as soon as possible.. Thank you again..

    Hello, chard2say22. 
    Thank you for visiting Apple Support Communities.
    To create an Apple ID without a credit or debit card, there is a specific series of steps that have to be processed in order to allow the payment to be set as none on creation of the account.
    Creating an iTunes Store, App Store, iBooks Store, and Mac App Store account without a credit card
    http://support.apple.com/kb/HT2534
    If the specific steps have not been processed, a credit or debit card will be required to complete the setup of the account.
    However, it can be removed and payment method changed to none as long as there is not an outstanding balance.  At this point an iTunes gift card can be used as form of payment.
    iTunes Store: Changing account information
    http://support.apple.com/kb/ht1918
    Cheers,
    Jason H.

  • Hello I have a problem in calculating the apple id Can you help me please   I forgot answer security questions for your account How can knowledge Please help Please reply as soon as possible   I can not buy from camels Store And the rest of the account ba

    Hello
    I have a problem in calculating the apple id Can you help me please
    I forgot answer security questions for your account How can knowledge
    Please help
    Please reply as soon as possible
    I can not buy from camels Store
    And the rest of the account balance  $25
    Message was edited by: lingo azam

    I think you mean App Store.
    Rescue email address and how to reset Apple ID security questions

  • Transfer of data from excel to Oracle database? Please reply as soon as possible

    Hello:
    How can I transfer data from MS Excel into Oracle8/8i database.
    Please give me step by step instructions or necessary code required
    Thank you
    Dinakar

    Save the excel data in .CSV file format, then use SqlLoader.
    Your SqlLoader control file might look as follows
    LOAD DATA
    INFILE c:\test_data.csv
    APPEND
    INTO TABLE emp
    FIELDS TERMINATED BY ","
    (fld1, fld2, fld3, ...)

  • Hello..please reply as soon as possible

    Hello,,I am a new Iphone user,I have just get a used iphone 4s I have updated the phone to the most recent software 6.0 and made an apple ID and bought a gift card to buy apps BUT unfortunatley I cant make an icloud say you have reached  the maximum free account have been activated on this phone
    so how can i get an icloud ID without losing ny dollars i have charged on the app store..i want to have an icloud account......on my used iphone

    Use a computer to make the iCloud ID. Then you will be able to use
    it on your iPhone.

  • Ora -12203 reply as soon as possible

    I am unable to connect from oracle forms developer 6.0 to my backend oracle8i. I am getting an error as ora-12203
    I was trying to get it from past few month but was unsuccesful. How can i resolve this issue.
    Dinakar

    Hi,
    I have got some suggestions for you.
    I have copied the lines from the oracle help file.
    I think that will solve your problem.
    ORA-12203
    Cause:     Invalid TNS address supplied or destination is not listening. This error can also occur because of underlying network transport problems.
    Action:     Verify that the service name you entered on the command line was correct. Ensure that the listener is running at the remote node and that the ADDRESS parameters specified in TNSNAMES.ORA are correct. Finally, check that all Interchanges needed to make the connection are up and running.

  • Pass the data back from the jsp page to the java code

    Hi,
    I have written an iView that receives an event using EPCF and extracts data from the client data bag.
    I need this iView to pass the data back from the jsp page to the java code.
    I am trying to do this using a hidden input field, but I cannot get the code to work.
    Here is the code on the jsp page.
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId">
    <hbj:inputField id="myInputField" type="string" maxlength="100" value="" jsObjectNeeded="true">
    <% myInputField.setVisible(false);%>
    </hbj:inputField>      
       </hbj:form>
      </hbj:page>
    </hbj:content>
    <script language=JavaScript>
    EPCM.subscribeEvent("urn:com.peter", "namedata", window, "eventReceiver");
    function eventReceiver(eventObj) {
         var url = eventObj.dataObject;
         var funcName = htmlb_formid+"_getHtmlbElementId";
         func = window[funcName];
         var ipField = eval(func("myInputField"));
         ipField.setValue(url);
         var form = document.all(htmlb_formid);
         form.submit();
    </script> 
    Here is my java code
    package com.sap.training.portal;
    import com.sapportals.htmlb.InputField;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    public class ListSalesOrder extends PageProcessorComponent {
      public DynPage getPage(){
        return new ListSalesOrderDynPage();
      public static class ListSalesOrderDynPage extends JSPDynPage{
         private String merong;
        public void doInitialization(){
        public void doProcessAfterInput() throws PageException {
              InputField reportfld = (InputField) getComponentByName("myInputField");
              if (reportfld != null)      merong = reportfld.getValueAsDataType().toString();
        public void doProcessBeforeOutput() throws PageException {
              if ( merong != null ) setJspName("merong.jsp");
              else setJspName("ListSalesOrder.jsp");
    Here is DD
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="SharingReference" value="com.sap.portal.htmlb"/>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="SearchSalesOrder">
          <component-config>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="/pagelet/SearchSalesOrder.jsp"/>
          </component-config>
          <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
        <component name="ListSalesOrder">
          <component-config>
            <property name="ClassName" value="com.sap.training.portal.ListSalesOrder"/>
          </component-config>
          <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>
    After receive event, then call java script function "eventReceiver" and call "form.submit()".
    But .. PAI Logic in Java code doesn't called ...
    Where is my problme ?
    Help me ...
    Regards, Arnold.

    Hi Arnold,
    you should not do a form.submit yourself. Instead you can put a component called ExternalSubmit to your page:
    ExternalSubmit exSubmit = new ExternalSubmit("EX_SUBMIT"));
    exSubmit.setServerEventName("MyEvent");
    This results in a java script funtion on the page which is called "_htmlb_external_submit_". If you call this function the the form gets submitted and your event handler is called.
    regards,
    Martin

  • JSP response into a Javascript code

    Suppose I have a form that I submit, and its action is set to a JSP page that returns a series of elements <option>, for example:
        <option>2005</option>
        <option>2006</option>
    Is it possible to GET that JSP response, inside the JavaScript code?
    Or should I better state, inside the JSP code, to return ONLY the numbers and then I get it on the JavaScript and use the .add() funtion to add the item to a <select> ?
    How do I save that response inside the JavaScript?
    For example, I am trying with this Javascript function that handles the changes on a drop-down list:
      function clickedOnPType(lista)
      document.form1.action = "searchAvailableYears.jsp?pType=" + txtPType;}
      document.form1.submit();
    }...And I am getting, in return, a series of <option> with the correct data...
    Thanking you in advance,
    MMS

    Oh hello... in one of my 1000 searches I found that
    post days ago and I was already trying with your
    code, but I was getting several errors like
    "undefined is null or not an object" (in IE),
    "xmlhttp.responseXML has no properties" (in
    Firefox).... Well one thing i wanted to discuss here is is wat properties does in general a XmlHttpRequest Object contains
    checkout the below interface which gives a clear understanding of the Object member properties.
    interface XMLHttpRequest {
      attribute EventListener   onreadystatechange;
      readonly attribute unsigned short  readyState;
      void  open(in DOMString method, in DOMString url);
      void  open(in DOMString method, in DOMString url, in boolean async);
      void  open(in DOMString method, in DOMString url, in boolean async, in DOMString user);
      void  open(in DOMString method, in DOMString url, in boolean async, in DOMString user, in DOMString password);
      void  setRequestHeader(in DOMString header, in DOMString value);
      void  send();
      void  send(in DOMString data);
      void  send(in Document data);
      void  abort();
      DOMString  getAllResponseHeaders();
      DOMString  getResponseHeader(in DOMString header);
      readonly attribute DOMString  responseText;
      readonly attribute Document   responseXML;
      readonly attribute unsigned short  status;
      readonly attribute DOMString  statusText;
    };therefore as you can see XmlHttpRequest.reponseXML returns a Document Object which has below set of properties.
    http://www.w3schools.com/dom/dom_document.asp
    http://www.javascriptkit.com/domref/documentproperties.shtml
    and as said earlier one can send AJAX response in three ways
    1).Plain text(with comma seperated values maybe): Which we can collect using XmlHttpRequest.responseText 2).XML: @ client side XmlHttpRequest.reponseXML create a DOM Object using which one can parse it get values
    of attributes and values of different tags and then update the view accordingly.
    3).JSON(Javascript Object Notation): It is a bit complicated thing to discuss at this moment
    however it uses the first property(Plain text) and then
    uses set of libraries to parse and update the view.
    checkout below links to understand it
    http://www.ibm.com/developerworks/library/j-ajax2/
    http://oss.metaparadigm.com/jsonrpc/
    >  function handleOnChange(ddl)
    >
    var ddlIndex = ddl.selectedIndex;
    var ddlText = ddl[ddlIndex].text;
    var frmSelect = document.forms["form1"];
    var frmSelectElem = frmSelect.elements;
    if(ddl.name="pType")
         txtYear = "";
    txtDay = "";
              txtTime = "";
              unblock(document.form1.year);
              block(document.form1.day);
              block(document.form1.time1);
         laProxLista = frmSelectElem["year"];
    if (ddl.options[ddl.selectedIndex].text !=
    txtPType = ddl.options[ddl.selectedIndex].text;
    else if(ddl.name="year")
         txtDay="";
         txtTime="";
              unblock(document.form1.day);
              block(document.form1.time1);
    laProxLista = frmSelectElem["day"];
    f (ddl.options[lista.selectedIndex].text != "---")
    txtYear = ddl.options[lista.selectedIndex].text;
    else if(ddl.name="day")
    {          txtTime = "";
              unblock(document.form1.time1);
    laProxLista = frmSelectElem["time1"];
    (ddl.options[ddl.selectedIndex].text != "---")
    txtDay = ddl.options[ddl.selectedIndex].text;
    else //time1
    laProxLista = null;
    if (ddl.options[ddl.selectedIndex].text != "---")
    txtTime1 = ddl.options[ddl.selectedIndex].text;
    if ( txtPType != "---")
    xmlhttp = null
    // code for initializing XmlHttpRequest
    Object On Browsers like Mozilla, etc.
    if (window.XMLHttpRequest){ 
    xmlhttp = new XMLHttpRequest()
    // code for initializing XmlHttpRequest
    Object On Browsers like IE
    else if (window.ActiveXObject) { 
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
    if (xmlhttp != null)
    if(ddl.name = "pType")
    // Setting the JSP/Servlet url to get
    XmlData
    url = "searchAvailableYears.jsp?pType="
    + txtPType;
                   else if(ddl.name = "year")
    url = "searchAvailableDOY.jsp?pType=" + txtPType
    PType + "&year=" + txtYear;
                   else(ddl.name = "day")
    url = "searchAvailableTimes.jsp?pType=" +
    e=" + txtPType + "&year=" + txtYear + "&day=" +
    txtDay;
    xmlhttp.onreadystatechange =
    handleHttpResponse;
    // Open the Request by passing Type of
    Request & CGI URL
    xmlhttp.open("GET",url,true);
    // Sending URL Encoded Data
    xmlhttp.send(null);
    else{
    // Only Broswers like IE 5.0,Mozilla & all other
    browser which support XML data Supports AJAX
    Technology
    // In the Below case it looks as if the
    browser is not compatiable
    alert("Your browser does not support
    XMLHTTP.")
    } //else
    } //if chosen
    //function
         //----------------------------Well as far as i can see i do not have any issues with it because your code looks
    preety much involved with your business logic but one thing i would like to reconfim
    here is the variable "xmlhttp" a global one.
    if no declare xmlhttp variable as a global variable.
    <script language="javascript">
    var xmlhttp;
    function handleOnChange(ddl){
    function verifyReadyState(obj){
    function handleHttpResponse() {
    </script>
    > function verifyReadyState(obj)
    if(obj.readyState == 4){
    if(obj.status == 200){
    if(obj.responseXML != null)
    return true;
    else
    return false;
    else{
    return false;
    } else return false;
    }I believe,this is preety much it.
    > function handleHttpResponse() [/b]
    if(verifyReadyState(xmlhttp) == true)
    //-----------HERE!! ---- I GET "UNDEFINED" IN THE
    DIALOG BOX
    //------- BELOW THE CODE LINE....---
    var response = xmlhttp.responseXML.responseText;
    alert(response);
    it is obvious that you would get Undefined here as responseText is not a property of Document Object or to be more specific to the Object what xmlhttp.responseXML returns.
    you might have to use that as alert(xmlhttp.responseText);
    and coming back to parsing the XML reponse you have got from the server we need to use
    var response = xmlhttp.responseXML.documentElement; property for it...
    and if you put as a alert message it has to give you an Output like"Object"
    alert(response);
    if that doesn't the browser version which you are using may not support XML properly.
    var response = xmlhttp.responseXML.documentElement;
    removeItems(laProxLista);
    var x = response.getElementsByTagName("option")
      var val
      var tex
      var newOption
                  for(var i = 0;i < x.length; i++){
                     newOption = document.createElement("OPTION")
                     var er
                     // Checking for the tag which holds the value of the Drop-Down combo element
                     val = x.getElementsByTagName("value")
    try{
    // Assigning the value to a Drop-Down Set Element
    newOption.value = val[0].firstChild.data
    } catch(er){
    // Checking for the tag which holds the Text of the Drop-Down combo element
    tex = x[i].getElementsByTagName("text")
    try{
    // Assigning the Text to a Drop-Down Set Element
    newOption.text = tex[0].firstChild.data
    } catch(er){
    // Adding the Set Element to the Drop-Down
    laProxList.add(newOption);
    here i'm assuming that i'm sending a xml reponse of format something below.
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <drop-down>
       <option>
            <value>1</value>
            <text>label1</text>
       </option>
       <option>
            <value>2</value>
            <text>label2</text>
       </option>
       <option>
            <value>3</value>
            <text>label3</text>
       </option>
    </drop-down>and i'm trying to update both option's value and label which would be something like
    <select >
    <option value="1">label1</option>
    <option value="2">label2</option>
    <option value="3">label3</option>
    <option value="4">label4</option>
    </select>else where if you are interested in getting a format like the one below
    <select >
    <option>label1</option>
    <option>label2</option>
    <option>label3</option>
    <option>label4</option>
    </select> try the below snippet
    var response = xmlhttp.responseXML.getElementsByTagName("text");
    var length = response.length;
    var newOption
    for(var i =0 ; i < length;i++){
       newOption = this.document.createElement("OPTION");
       newOption.text = response.childNodes[0].nodeValue;
    // or newOption.text = response[i].firstChild.data
    laProxList.add(newOption);
    Another thing...
    I have tried to set the content type inside the JSP
    to
    response.setContentType("text/html");
    AND to
    response.setContentType("text/xml");
    but none of the above is getting me results......use of response.setContentType("text/xml"); is more appropriate here.. as you are outputting XML or a plain text here...
    make sure you set the reponse headers in the below fashoin while outputting the results....
    response.setContentType("text/xml");
    response.setHeader("Pragma", "no-cache");
    response.setHeader("Cache-Control", "no-cache");
    response.setDateHeader("Expires", 1);
    response.setDateHeader("max-age", 0); and if you are serious about implementing AJAX i would advice you start learn basics of XmlHttpRequest Object and more about DOM parsing is being implemented using javascript.
    http://www.w3.org/TR/XMLHttpRequest/#xmlhttprequest0
    http://www.jibbering.com/2002/4/httprequest.html
    http://java.sun.com/developer/technicalArticles/J2EE/AJAX/
    http://developer.apple.com/internet/webcontent/xmlhttpreq.html
    http://www.javascriptkit.com/domref/documentproperties.shtml
    and then go about trying different means of achieving them using simpler and cool frameworks
    like DWR,dojo,Prototype,GWT,Jmaki,Back Base 4 Struts,Back Base 4 JSF....etc and
    others frameworks like Tomahawk,Ajax4Jsf,ADF Faces,ICE FACES and many others which work with JSF.
    Please Refer
    http://swik.net/Java+Ajax?popular
    http://getahead.org/blog/joe/2006/09/27/most_popular_java_ajax_frameworks.html
    Hope that might help :)
    and finally an advice before implementing anything specfic API which may be related to any technologies (JAVA,javascript,VB,C++...) always refer to API documentation first which always gives you an Idea of implementing it.
    Implementing bad examples posted by people(even me for that matter) directly doesn't make much sense as that would always lands you in trouble.
    and especially when it is more specific to XmlHttpRequest always make habit of refering
    specific Browser site to know more about why specific Object or its property it not working 4i
    IE 6+: http://msdn2.microsoft.com/en-us/library/ms535874.aspx
    MOZILLA: http://developer.mozilla.org/en/docs/XMLHttpRequest
    Safari: http://developer.apple.com/internet/webcontent/xmlhttpreq.html
    Opera 9+: http://www.opera.com/docs/specs/opera9/xhr/
    Hope there are no hard issues on this...
    REGARDS,
    RaHuL

  • How see the code of the application

    I would like to know how to see the code generated by APEX since I need to stamp(print) it.
    Thank you

    Hello,
    In FireFox : Right Mouse Click + View Page Source
    In IE: Right Mouse Click + View Source
    (might be a lot of pages though)
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Can't see who has replied to the thread in the forum, its pointess?

    What's the point in creating a system where you can't see who has replied to the thread? Its absolutely F**CKING pointless? Does anyone at Adobe have any brains or are they all sitting with their heads up their backsides?
    Surely before you release such garbage you test for these very simple issues, right?
    osgood_(NOT M Golding) If anyone at Adobe is monitoring this please get my screen named changed to what it was previously as well.

    It needs a 'latest reply' on the posted list page like the old version otherwise you have no idea if anyone has replied to the post or not without opening it.
    Latest reply: May 3, 2014 2:17 AM by . osgood_
    The line below is not that necessary in the order of priority, which for all intense and purposes is quite useless. I don't really care about how long ago something was posted or where it was posted but an indication to show 'updated' posts and by who is vital.
    9 minutes ago in Dreamweaver support forum
    Why do we even need 'Dreamweaver support forum'. We already know that's where we are! I guess a selection of posts from other forums may appear in a 'general' postings list somewhere, but who really cares - if I'm asking a question related to DW that's the forum I'm going to, not a general list as I don't care a monkey knackers what's been posted in Fireworks or InDesign or Illustrator. If I did I'd go to those forums.
    If you are tracking several postings it is going to become hugely annoying for both the person who has asked the question and the people helping the original poster as many replies will potentially go unnoticed and not resolved.
    And what's with the silly horizontal scroll bar being created for long lines of text? That's annoying too.
    Plenty of teething issue you need to get your head around over the next few weeks.

  • My ITunes gift card I brought, the Reemdem code had bin wide out so I can no longer see that code what do I do

    My ITunes gift card I brought, the Reemdem code had bin wide out so I can no longer see that code what do I do?

    "bin wide out"?
    If you mean you cannot read the code on the back of the card take it back to the store you purchased it from. If the numbers are not visable because you scratched them out I don't know if the store will replace or refund that. If you can read some of the numbers you could just keep trying a combination of letters and numbers to replace the missing ones. This will take a while depending on how many inputs are missing. You will have to use 0 through 9 and I am guessing A through Z.

  • See my code that no me error after complied but not give me pdf result and

    hi master
    sir i use this code for create the pdf
    ExternalContext econtext = getExternalContext();
    InputStream stream = econtext.getResourceAsStream(PREFIX);
    try {
    JRResultSetDataSource mcon = new JRResultSetDataSource(getSessionBean1().getChartofaccRowSet());
    JasperPrint jasperPrint = null;
    jasperPrint = JasperFillManager.fillReport(stream, null, mcon);
    JRExporter exporter = null;
    HttpServletResponse response = (HttpServletResponse)econtext.getResponse();
    FacesContext fcontext = FacesContext.getCurrentInstance();
    exporter = new JRPdfExporter();
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    exporter.setParameter(JRExporterParameter.OUTPUT_STREAM,
    response.getOutputStream());
    exporter.exportReport();
    fcontext.responseComplete();
    } catch (Exception ex) {
    log(" Error Description" , ex);
    error("Error counting rows: " + ex.getMessage() );
    error("Error counting rows: " + ex ); }
    sir this code not give any error but also not create /display the pdf
    i try to find the where problem occurred i get textfiled and send some value after one by one line
    like is this
    first time try
    JRResultSetDataSource mcon = new JRResultSetDataSource(getSessionBean1().getChartofaccRowSet());
    textField2.setValue(PREFIX);
    is given me right result and show /WEB-INF/reports/mfa.jasper in textfield2
    second time
    jasperPrint = JasperFillManager.fillReport(stream, null, mcon);
              textField2.setValue(PREFIX);
    when i press button second time this time page not give me result in textfield2 and show blank it means
    only this line have error but what i could not foud out jasperPrint = JasperFillManager.fillReport(stream, null, mcon);
    use see my code and give me idea or solution of my problem
    thank�s
    aamir

    I found and easier way to do it and wrote it up here: http://developers.sun.com/jscreator/learning/tutorials/2/reports.html

  • How to see my last reply?

    Hi,
    When I reply to a new message a little arrow shows on the left side of that message, when I click it, my reply opens. So far so good...
    Now I receive back an answer on my reply. The number [2] shows at the right side of the message indicating the number of messages in the thread.
    I reply again, but now when I click that little arrow on the left I don't see my last reply popping up!
    Any idea how to see my most recent reply? (and I don't mean go find it in your sent messages folder)
    Thanks!

    Mail > Preferences > Viewing > Include related messages from other mailboxes when viewing a conversation?
    Regards,
    Colin R.

  • SQLDeveloper 3.2 - I can't see trigger code

    Hi people
    In some cases, I can't see trigger code.
    I didn't find a pattern to determine what kind of trigger has an invisible code.
    For example, in my instance I can't see code of SCOTT.AFTER_INS_UPD_ON_EMP trigger, but I see it in SQL tab for SCOTT.EMP table.
    I had to copy from there and recreate trigger. Now is visible
    I work with EBS R12, and a list of some triggers with that problem follows:
    AR_RECEIVABLE_APPLICATIONS_BRI
    AS_JTF_RS_GROUP_MEM_BI
    FND_FLEX_VAL_RULE_LINES_T1
    FND_FLEX_VALIDATION_RULES_T1
    FND_SECURITY_GROUPS_IL
    HR_LOCATIONS_ALL_OVN
    PAY_TEMPLATE_EXCLUSION_RUL_WHO
    PER_ALL_PEOPLE_F_OVN
    PER_PERSON_ANALYSES_OVN
    PER_PSV_OVN
    WIP_DISCRETE_JOBS_BRD
    My info:
    SQL Developer 3.2.09.30
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
    Thanks
    Oscar

    Hi Oscar,
    Possibly your issue may be the same as this very recently logged and fixed bug:
    Bug 14530780 - TRIGGERCODE IN OTHER SCHEMA NOT VISIBLE IN BROWSER, HOWEVER QUERIABLE IN SQLWORK
    But the bug narrative never claims it is a regression, so presumably it also would have been a problem in prior releases.
    Regards,
    Gary

  • The recipient cant see "middle of reply or typing" bubble in imessage. Could it be that I am using iOS 8 and they are not?

    The recipient cant see "middle of reply or typing" bubble in imessage. Could it be that I am using iOS 8 and they are not? Has any of your friends pose this as a minor problem? Is there a setting that I didn't enable?

    ''rojere [[#question-1055991|said]]''
    <blockquote>
    i try to keep my thumb palms off the mouse pad when i am typing but every now and then my screen resizes larger or smaller until i take my left palm off the keyboard base its only when my left palm is resting on the base next to the touch pad. i type pretty fast so it gets annoying and yes it also jumps screens or reverts back to previous message and i have to choose ctrl z to undo and get back to my message i was typing... it also switches tabs on me as well... not sure why my palm being on the left of the keypad on the base should effect anything but it does after a while. and i have to stop what i am doing...and go to the firefox menu and change the screen size back down to 100% sometimes it goes up to 200-300 other times it goes down to 70-80% i find it annoying i i wish there was a way to turn off the screen resize in the setup panel. if its just left to be 100% i am happy with that... i don't need it to be bigger or smaller... there should be a way to LOCK it down... i understand that there are people out there with eye problems and needs to have the screen size increase using the + or - but there should be a lock so it just stays no matter what is happening on my keypad or touch pad or base of the pad... that screen size will not increase or decrease. unless i turn off the lock... perhaps this is something they can implement in the next version or do a quick update of the browser
    </blockquote>
    sorry that is all greek to me thanks for attempting to explain what you were trying to explain sorry i just not tech person to be able to understand or where to begin ... have good day and thanks for again trying

Maybe you are looking for

  • Query on EO inheritance

    HI, i had a requirement to create inherited EOs, the process i normally to identify a discriminator attribute and specify the default values for that attribute as required. Now the problem for me is for the same child EO i had two values for discrimi

  • How to set TimeOut period in Portal

    Hi, I am running a report in the portal which is taking more than 1 min to display the results. After this one min the page is getting timedout. Can any one please let me know how to administrate the timeout interval. I found this link http://help.sa

  • Safari not providing rss news anymore

    Hello all One day, Safari stop providing news in my rss feed. I didn't happen because of an update, it didn't happen because of a computer clean-up or anything. One morning, I was waiting for my daily rss and nothing came in. Since that time, everyti

  • FMS3 file read behavior

    Hi, We are testing FMS3 using our own custom filesystem, and it seems that FMS behaves in a very inefficient way when it comes to reading data from the underlying FS. Whenever I stream a file to a VOD client, I see the following behavior: 1. stat the

  • Re-build HTML Form in Flash?

    Hi Wonder if someone can help. Please excuse my incompetence, I am fairly new to Flash / Actionscript Basically I am trying to re-build this simple HTML form in Flash, I have not shown the actual URL here, but this is a functioning form when the corr