I thin pbm in onchange pl find the solution for me...i cant handle thisonchange event

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • siva125
    New Member
    • Feb 2010
    • 9

    I thin pbm in onchange pl find the solution for me...i cant handle thisonchange event

    Code:
    <html>
    <body>
    <form name="f1" method=post style="COLOR: mediumblue" action=loccusdet.asp>
    <P> </P>
    <P>&nbsp;</P>
    <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BRANCH CODE <INPUT id=text1 
    name=brcd >&nbsp;&nbsp;&nbsp; LOCKERNO <INPUT id=text2 name=opt1 onchange="window.f1.submit()">
    
    
    <%
      set conn=server.CreateObject("adodb.connection")
      set rs=server.CreateObject("adodb.recordset")
      set rs1=server.CreateObject("adodb.recordset")
      crcode=Request.Form("brcd")
      opt=Request.Form("opt1")
      conn.Open "Provider=MSDAORA.1;Persist Security Info=False;User ID=frsread;Password=frsread;Data Source=frsread" 
      %>
    
    <%
       if(crcode<>""and opt<>"")then
        sql3="select locker_no,customer_name,address,city,phone1 from locker_details@frsutil where locker_no='"+opt1+"'and BRN_CODE='"+brcd+"'"
        rs1.Open sql3,conn
        
    %>
    <P>&nbsp;</P>
    <TABLE 
    style="FONT-SIZE: 9pt" 
    borderColor=blue cellSpacing=0 borderColorDark=green width=500 align=center
     bgColor=white borderColorLight=silver border=1>
    CUSTOMER DETAILS
    <tr>
    <td width="50"> <p align="center"><b><font size=2> LOCKER NO </b></FONT></p></td>
    <td width="50"> <p align="center"><b><font size=2> CUSTOMER NAME</font></b></p></td>
    <td width="50"> <p align="center"><b><font size=2> ADDRESS</font></b></p></td>
    <td width="50"> <p align="center"><b><font size=2>CITY</font></b></p></td>
    <TD WIDTH="50"> <p align="center"><b><font size=2>PHONE1</font></b></p></TD>
    
    </tr>
    <%
    do until rs1.eof
    
    %>
    <tr>
    <TD><%Response.Write rs1(0)%></TD>
    <TD><%Response.Write rs1(1)%> </TD>
    <TD><%Response.Write rs1(2)%></TD>
    <TD><%Response.Write rs1(3)%> </TD>
    <td><%Response.Write rs1(4)%></td>
    </tr>
    <%
    rs1.movenext
    loop
    rs1.close
    end if
    %>
    
    
    </TABLE></form>
    </body>
    </html>

    /*hi friends this the code i got o/p as :BRANCH CODE (TEXTBOX) LOCKERNO(TEXTBO X).THE TABLE FIELDS ON CHANGE EVENT TAKES .BUT I NOT ABLE TO GET THE DATA INSIDE THE TABLE .SQL IS CORRECT I CHECKED IN THE SQL NAVIGATOR,I THINK PBM IN REPONSE.WRITE.I CANT ABLE TO FIND THE ANSWER PL ANY ONE GIVE SOLUTION FOR THIS
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    the response.write line looks fine to me, is this producing and empty table
    Code:
    <tr>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    or nothing?

    Jared

    Comment

    • GazMathias
      Recognized Expert New Member
      • Oct 2008
      • 228

      #3
      Try response.writin g out the SQL and testing it in a query designer.

      Gaz.

      Comment

      Working...