Still problem to place data in text field
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Manu_A
Posted On:   Friday, May 4, 2007 02:26 AM

Register Here Hi Krishna Sorry for disturbing u again.I still cannot resolve the problem.I changed the code using responseXML but now anything displayed in the textbox.What could be the reason .Code of both jsp is given below given below. function createRequestObject() { var tmpXmlHttpObject; if (window.XMLHttpRequest) { tmpXmlHttpObject = new XMLHttpRequest(); } else if (window.ActiveXObject) { tmpXmlHttpObject = new ActiveXObject("Microsoft.XMLHTTP"); } return tmpXmlHttpObject; } var http = createRequestObject(); function makeGetRequest(wordId) { http.open('get', 'definition   More>>
Register Here


Hi Krishna Sorry for disturbing u again.I still cannot resolve the problem.I changed the code using responseXML
but now anything displayed in the textbox.What could be the reason .Code of both jsp is given below given below.














Have you heard these terms before?





Ceraunophobia href="javascript:makeGetRequest(1)"


Astraphobia "javascript:makeGetRequest(2)


Ophidiophobia href="javascript:makeGetRequest(3)"





















//CODE OF DEFINITION.JSP























<%@ page language="java"%> <%@ page import="java.sql.*,java.io.*,java.util.*,javax.servlet.*"%>



<%

Class.forName("com.mysql.jdbc.Driver").newInstance();

Connection con=DriverManager.getConnection("jdbc:mysql://itserver:3306/manzor?user=root&password=");

Statement st= con.createStatement();

Statement st1= con.createStatement();


ResultSet rs,rs1;

String id=request.getParameter("id");


rs=st.executeQuery("select * from user where USERTYPE='"+id+"'");

while(rs.next()){




%>

//p tag is here in the actual code,can't display here

<%=rs.getString(1)%>





<%


}


%>





   <<Less

Re: Still problem to place data in text field

Posted By:   Anonymous  
Posted On:   Friday, May 4, 2007 03:12 AM

Hi Manu,
in below step http.responseXML will give the document element no need to explicitly call the documentElement and put alerts to ensure that you got the correct xml as response after the below one

var response = http.responseXML.documentElement;
And give the alert to "response.getElementsByTagName('p')[0].childNodes[0].nodeValue" to ensure the value
And what i observe with your Definition.jsp is you are sending the simple strings instead of the xml so instead of sending the text send an xml.
Regards,
Krishna Rajendra A.
About | Sitemap | Contact