CF-Ajax help

Hi all.
I have set up an ajax page that retrieves the people names
when one type smth in a text box-EmpFN....This text box-Emp_Email
and hidden div are inside a <TD> ....after clicking the name
it takes to the text box -EmpFN but I am not able to place the
cursor into 2nd text box -Emp_Email where the <div> is, and
also the ajax div go behind the select box-RC when it opens ....I
need help in these 2 issues..
I should be able to place cursor in the 2nd box , and the the
ajax div shouldnt go behind the select box ...Thanks al..

In regards to form selects:
Selects will always appear on top. Here's a reference that
may help you.
http://www.shawnolson.net/a/1198/hide-select-menus-javascript.html

Similar Messages

  • AJAX Help Needed

    Looking to assemble a small team to work on an new and innovative AJAX based social networking website. seeking excited and motivated individuals who are willing to put in the time. They must also like long walks on the beach and watching the sun set. PM if interested. Thanks

    Looking to assemble a small team to work on an new
    and innovative AJAX based social networking website.
    seeking excited and motivated individuals who are
    willing to put in the time. They must also like long
    walks on the beach and watching the sun set. PM if
    interested. ThanksI'm very interested, email me at [email protected] and I will respond asap.

  • AJAX Help needed for an AJAX noob

    Hey there,
    I'm starting to experiment with AJAX for simple form
    validation but am having great difficulty in getting the following
    working.
    I'm trying to get it to count the length of a field, and
    respond back to an id'd span. It works if I hard code the span id
    into the JS file, but not if I try and implement a variable to have
    the span id passed into.
    I have attached the code. If someone could take a look and
    point out where I'm going wrong, that would be greatly appreciated.
    Cheers in advance,
    Brad

    > In the mean time, if anyone can point out why passing
    the span id to the
    > stateChanged function causes the xmlHttp.readyState to
    always stay at 0,
    > that
    > would be very useful!
    You can't pass an argument to a callback function like that.
    You can create
    your own callback function and set it up inside a calling
    function so that
    the argument is not lost:
    var xmlHttp
    function processRemote(callback, str) {
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
    alert ('Browser does not support HTTP Request');
    return;
    var url='/includes/ajax/ajax_validate.asp';
    url=url+"?val="+str;
    url=url+"&sid="+Math.random();
    xmlHttp.open("GET",url,true);
    xmlHttp.onreadystatechange=function() {
    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    var temp = new Array();
    temp.push(xmlHttp.responseText);
    callback.apply(callback,temp);
    xmlHttp.send(null);
    function GetXmlHttpObject() {
    var objXMLHttp=null;
    if (window.XMLHttpRequest) {
    objXMLHttp=new XMLHttpRequest();
    else if (window.ActiveXObject) {
    objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
    return objXMLHttp;
    function checkElement(str, spanid) {
    if (str.length==0) {
    document.getElementById(spanid).innerHTML="";
    return;
    var callback = function(str) {
    document.getElementById(spanid).innerHTML=str;
    var result = processRemote(callback, str);
    That should work.
    Tom Muck
    co-author Dreamweaver MX 2004: The Complete Reference
    http://www.tom-muck.com/
    Cartweaver Development Team
    http://www.cartweaver.com
    Extending Knowledge Daily
    http://www.communitymx.com/

  • Ajax Help

    I am trying to do a POST while staying on the same page, and I have gotten this far,
    <script language="JavaScript">
    <!--
    function ImageDelete() {
    if (confirm("Are you sure you want to delete?") == false) {
    return;
    document.forms[0].ClearImage.value = '1';
    document.forms[0].TransCondition.value = '4';
    document.forms[0].submit();
    return;
    function ClickCancel() {
    self.location = "http://68.157.251.100/CgiImageTransfer?Page=0&Language=0";
    function ONStatus(){
    document.forms[0].ConditionSave.value = '1';
    document.forms[0].TaskEnable.checked = true
    var xmlHttp;
         // Firefox, Opera 8.0+, Safari
         xmlHttp=new XMLHttpRequest();
    xmlHttp.onreadystatechange=function()
    if (xmlHttp.ready&state==4)
         document.myForm.time.value=xmlHttp.responseText;
    xmlHttp.open("POST","http://oneadvent.viewnetcam.com:50050/CgiImageTransfer",true);
    xmlHttp.send()
    function OFFStatus(){
    document.forms[0].ConditionSave.value = '1';
    document.forms[0].TaskEnable.checked = false
    var xmlHttp;
         // Firefox, Opera 8.0+, Safari
         xmlHttp=new XMLHttpRequest();
    xmlHttp.onreadystatechange=function()
    if (xmlHttp.ready&state==4)
         document.myForm.time.value=xmlHttp.responseText;
    xmlHttp.open('POST','http://oneadvent.viewnetcam.com:50050/CgiImageTransfer',false);
    xmlHttp.send()
    function ajaxFunction()
    // -->
    </script>And it will not work. I am using Firefox. I don't know what I did wrong, it doesn't error out or anything.
    Thanks!

    These forums are for questions relating to the Java programming language. Not JavaScript. Not Ajax.
    Please use Google to search for a more appropriate forum for your question.

  • Ajax help please

    the form i have created has a part that will have a multiple
    select... it will have 3 tables. one table will have the names of
    the categories with a id as CatId{primry key}.
    the second is the members table that has the
    memberRecordId{primary key}, CId{linked to contacts table}, and
    memberYear.
    then the last table is the CategoryData table that has the
    CatDataId{primary key}, CatId{linked to category table}, and the
    MemberRecordId{linked to the members table}...
    so the select looks like this
    <cfselect enabled="Yes" name="memberCategory"
    class="SELECT" label="Category" multiple="yes" width="200"
    height="80" size="8" >
    <cfoutput query="getcat">
    <option
    value="#trim(CatId)#">#trim(Category)#</option>
    when i select something it shows up in the cfdebug for
    ajax... but what if they dont select something? how would i have
    the update work? or does someone have a better idea on how i should
    do this?
    </cfoutput> </cfselect>

    ok i can do that but i am just not sure on how to have the
    multiple select update that on the fly... or even pull the names of
    the category that they have chosen before because i cant have a
    query on that page that gets the info i need that = #cid# because
    cid is binding to the drop downs so noe is selected right away...
    ok lets see here ... how can i call a query from the cfc page
    to the cfm one that way i can bind it on the cfc and possibly pull
    the info i need...

  • How to render a JSP page dynamically with JSF controls ??

    Hi All,
    I am new to JAVA and JSF. I am recently started doing a web project. First we started using plain JSP and servlets and now we are going to use JSF.
    Now I am facing one problem with JSF. In a JSP page, I am having a combobox and a div and when i am selecting a value from the combo box, the div should be filled with some controls(like text boxes and comboboxes, buttons, etc) according to the selection.
    I have done this in plain JSP with the help of XML/XSLT, AJAX and JavaScript. i.e. XML contains the details of the controls and XSLT transformer will give me controls in a string format in the server, AJAX helps to retrieve it and I have to simply set the div.innerHTML property to that string. It is working fine.
    Now with JSF, I need to add JSF controls into my XML file, and it inturn returns the corresponding string having JSF controls easily, but i could not set it directly to div's innerHTML as the String contains JSF controls (Moreover, these JSF controls are linked with JAVA beans).
    Is there any provision to add JSF controls to a running page dynamically or is there any provision to convert the above mentioned string of JSF controls to normal HTML controls like the JSF taglibraries doing.??
    thanks in advance
    noushad
    Edited by: naash007 on Apr 20, 2009 4:17 AM
    Edited by: naash007 on Apr 20, 2009 5:45 AM

    That's simply asking for trouble. Do not suggest to use JSTL in combination with JSF.
    JSF already provides almost everything which the JSTL flow control tags provides in flavour of the 'rendered' attribute.

  • Help on jsp code to display data in same page using using ajax ?

    Is there any jsp code to display in same page using using ajax ?

    Re: need help on how to display data in same jsp page. Locking.

  • NetBeans VWP: help w/ AJAX, is it possible to refresh more than one field?

    I have a form with lots of fields. Some of them the value is retrieved from the database, for example the service field, where the user types the service id and at the onChange event the form is submitted, executing the processValueChange handler. In this handler the service data is retrieved from the database and a static text with the service name and a static text with the service price are updated.
    I'm trying to do this with AJAX, so at the onChange event of the service id text field I have the following:
    document.getElementById('form1:stServiceName').refresh('form1:tfServiceId');
    document.getElementById('form1:stServicePrice').refresh('form1:tfServiceId');It works, but the processValueChange handler is executed 2 times, and that's a problem...
    Isn't there any way to refresh more than one field? With something like this for example:
    document.getElementById('form1:tfServiceId').submit();
    document.getElementById('form1:stServiceName').refresh();
    document.getElementById('form1:stServicePrice').refresh();Thanks for any help,
    Felipe

    You may want to try creating your own custom popup lov
    http://www.oracle.com/technology/products/database/application_express/howtos/how_to_create_custom_popups.html
    you can then create your own lov report listing all people and then when you click the name required you can passback as many values as required to the calling form.

  • Ajax .swf load help needed

    Hello all,
    I'm trying to load in a .swf file (via an external html page)
    dynamically using an Ajax script (loads into a div) and while it
    works with the ol' <object> method of putting flash in an
    html the .swf file won't load if I try to load it in via javascript
    (either SWFobject or the flash exported .js load files).
    I know a lot of people have had this problem but I have never
    seen any solutions given. Does anyone know?
    Any help would be MUCH Appreciated.

    Wiki is your friend - http://wiki.archlinux.org/index.php/Main_Page
    I do not mean to be mean, it's simply inefficient to try and answer all the questions you _will_ have while trying to configure Arch to your liking, especially since Wiki covers most of them, and covers them well.  If you come across a problem that's not covered in the wiki post here and we will definitely try and help you

  • Need help in this jquery ajax response

    Hi Below is the code i got from internet trying to test but alwys getting false alert event the record does not xist in DB.
    Below is the code
    <script language="javascript" src="jquery-1.4.2.js"></script>
        <script type="text/javascript">
                $(document).ready(function() {    
                $('#username').blur(function() {    
                            $.ajax({            
                                    type: "POST",
                                    url: "checkUser.cfc?method=checkUsername",
                                    data: "username=" + this.value,
                                    datatype: "json",
                                    success: function(response) {                                   
                                    alert(response);                                                       
                                    if (response == true) {
                                    alert("true");   
                                    //$('#usernameResponse').css('display', 'none');
                                    //$('#submit').attr('disabled','disabled');
                                    } else {
                                    alert("flase");
                                    //$('#usernameResponse').css('display', 'inline');
                                    //$('#username').select();
                                    //$('#submit').attr('disabled','disabled');
        </script>    
    <form>     <div class="formcontainer">
                      <label>User Name:</label>
                      <input type="text" name="username" id="username" />
                      <span id="usernameResponse">Sorry, that username is taken</span>
                      </div>
                      <div class="formcontainer">
                          <label>Password:</label>
                          <input type="password" name="password" id="password" />
                       </div>     
                 <div class="formcontainer">
                <input type="submit" id="submit" value="Submit" />
                    </div>
                     </form>
    CFC File:
    <cfcomponent output="false">     
        <cffunction name="getAllUsernames" access="private" returntype="query" output="false">
                     <cfset var qGetAllUsernames = queryNew('userID,username') /> 
                     <cfset queryAddRow(qGetAllUsernames, 4) /> 
                     <cfset querySetCell(qGetAllUsernames, 'userID', 1, 1) />
                     <cfset querySetCell(qGetAllUsernames, 'userName', 'John', 1) />
                     <cfset querySetCell(qGetAllUsernames, 'userID', 2, 2) />
                     <cfset querySetCell(qGetAllUsernames, 'userName', 'Paul', 2) />
                     <cfset querySetCell(qGetAllUsernames, 'userID', 3, 3) />
                     <cfset querySetCell(qGetAllUsernames, 'userName', 'George', 3) />    
                     <cfset querySetCell(qGetAllUsernames, 'userID', 4, 4) />
                     <cfset querySetCell(qGetAllUsernames, 'userName', 'Ringo', 4) />
                     <cfreturn qGetAllUsernames />
        </cffunction> 
        <cffunction name="checkUsername" access="remote" output="false" returntype="string" returnformat="JSON">
            <cfargument name="username" type="string" default="" />
            <cfset var qAllUsernames = getAllUsernames() /> 
            <cfquery name="qCheckUsername" dbtype="query">
            SELECT * FROM qAllUserNames WHERE upper(username) = <cfqueryparam value="#ucase(arguments.username)#" cfsqltype="cf_sql_varchar" />
            </cfquery>
            <cfif qCheckUsername.recordcount>
            <cfreturn true>
            <cfelse>
            <cfreturn true>       
            </cfif>       
        </cffunction>   
    </cfcomponent>
    when i run cfc alone returns result like true or false but when i try to alert that response alert box of window size with all spaces and rsult comes so not able to tet if(reponse == true does not working.
    any help will be great thanks
    this is alert box poped with response
    true
    </td></td></td></th></th></th></tr></tr></tr></table></table></table></a></abbrev></acrony m></address></applet></au></b></banner></big></blink></blockquote></bq></caption></center> </cite></code></comment></del></dfn></dir></div></div></dl></em></fig></fn></font></form>< /frame></frameset></h1></h2></h3></h4></h5></h6></head></i></ins></kbd></listing></map></m arquee></menu></multicol></nobr></noframes></noscript></note></ol></p></param></person></p laintext></pre></q></s></samp></script></select></small></strike></strong></sub></sup></ta ble></td></textarea></th></title></tr></tt></u></ul></var></wbr></xmp>

    cfnew wrote:
        <cffunction name="checkUsername" access="remote" output="false" returntype="string" returnformat="JSON">
            <cfif qCheckUsername.recordcount>
            <cfreturn true>
            <cfelse>
            <cfreturn true>       
            </cfif>       
    3 things. Do you mean perhaps:
    1) name="IsUsernameValid"
    2) returntype="boolean"
    3) <cfif qCheckUsername.recordcount>
    <cfreturn true>
    <cfelse>
    <cfreturn false>       
    </cfif>

  • Want help on AJAX

    hi,
    I know abt AJAX theriatically. i want to work on it.would any one help me by sending the required jar files and simple example.I browsed for those in https://bpcatalog.dev.java.net but i can't get all. Plese send me those.

    Why not try the open-source Ajax framework ZK ( http://zk1.sourceforge.net )?
    You can try the online LIVE DEMO here: ( http://www.potix.com/zkdemo/userguide )

  • Help with Custom Component: Ajax and ValueChangeListener

    Hello,
    I am trying to create a custom component that triggers an update via Ajax. However, I would also like to trigger a ValueChangeListener method from the same component, however I am unsure of how to obtain and trigger the ValueChangeEvent.
    The code I have so far in the Phase Listener is:
    private void handleAjaxRequest(PhaseEvent event) {
         FacesContext context = event.getFacesContext();
            HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();
            Object object = context.getExternalContext().getRequest();
            if (!(object instanceof HttpServletRequest)) {
                return;
            HttpServletRequest request = (HttpServletRequest)object;
            HttpSession session =  request.getSession();
            String requestType = request.getParameter("jsflotRequestType");
            if (requestType != null && requestType.equalsIgnoreCase("jsflotchartValueChange")) {
                 //Trigger valueChangeEvents
                 log.info("Handling JSFlot Chart Value Change Event.");
    }What I am looking for though, is some information regarding how to obtain the ValueChangeListener from the request/session objects.
    The component tag is called like this:
    <jsflot:flotChart id="valueTimeChart"
         value="#{chartMbean.chartSeries}"
         valueChangeListener="#{chartMbean.valueChangeListener}"Any help would be greatly appreciated!

    The field calculation order was not in the correct order, had a devil of a time figuring out how to get to it, in Acrobat X.
    My check boxes for shipping have the same name field but I don't see a tab for export value for the check boxes, and I have no idea how to implement your suggestions for a switch or if statement or what fields to attach them to. 
    My amatuer attempt at a shipping formula follows, I don't know if I can use a range for event value, or where to put the script, if it is even correct.
    if(event.value == "<25.01")
        nShipFee = 06;
    else if(event.value == "25.01 - 75")
        nShipFee = 11.50;
    else if(event.value == "75.01 - 125")
        nShipFee = 15;
    else if(event.value == "125.01 - 200")
        nShipFee = 20;
    else if(event.value == "200.01 - 300")
        nShipFee = 25;
    else if(event.value == "300.01 - 400")
        nShipFee = 30;
    else if(event.value == ">400")
        nShipFee = 50;

  • Ajax code help for conditional select list.

    Hi,
    I am using AJAX code for the first time, I dont have knowledge in java, I just grabbed the code from this forum and trying to manipulate to my requirement.
    My Requirement is I have two select lists, 1) host_name and 2) database_name.
    As soon as I pick/choose the value in host_name select list, I need to populate only those databases on that particular host. I dont want to submit the page for this action.
    Here is the code, I appreciate if some one can help.
    On demand Application Process code:
    declare
    l_counter number;
    l_o_name varchar2(2000);
    begin
    owa_util.mime_header('text/xml', FALSE );
    htp.p('Cache-Control: no-cache');
    htp.p('Pragma: no-cache');
    owa_util.http_header_close;
    htp.prn('<select>');
    for rec in (select "ORA_DATABASES_VW"."DATABASE_NAME" as "DATABASE_NAME",
         "ORA_DATABASES_VW"."DB_ID" as "DB_ID"
    from "ORA_DATABASES_VW"
    where "ORA_DATABASES_VW"."HOST_NAME" = :TEMP_ITEM)
    loop
    htp.prn('<option value="' || rec.db_id || '">' || rec.database_name || '</option>');
    end loop;
    htp.prn('</select>');
    end;
    HTML Header on that page:
    =================
    <script language="JavaScript1.1" type="text/javascript">
    function get_List_XML (source_item,target_item){   
    var v_Target = html_GetElement(target_item);
    var v_Source = html_GetElement(source_item);
    var ajaxResult = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=POPULATE_LIST_XML',0);
    ajaxResult.add('TEMP_ITEM',source_item.value);
    var v_result_xml = ajaxResult.get('XML');
    if(v_result_xml && v_Target)
    var options_Contents = v_result_xml.getElementsByTagName("option");
    v_Count = options_Contents.length;
    v_Target.length = 0;
    for(var i=0;i<v_Count;i++)
    var v_opt_xml = v_result_xml.getElementsByTagName("option");
    appendToSelect(v_Target, v_opt_xml.getAttribute ('value'),v_opt_xml.firstChild.nodeValue)
    function appendToSelect(target_item, option_val, option_content) {  
    var v_Opt = document.createElement("option");
    v_Opt.option_value = option_val;
    if(document.all){
    target_item.options.add(v_Opt);
    v_Opt.innerText = option_content;
    }else{  
    v_Opt.appendChild(document.createTextNode(option_content));
    target_item.appendChild(v_Opt);
    </script>
    Form element attribute in the host_name column. P935_INSTANCE_DB_NAME is my page item for database_name.
    onchange="get_List_XML (this,'P935_INSTANCE_DB_NAME')"

    Here is the code, Hope I had put it correctly now.
    This is fixed now. Thanks a lot for helping out this. I have two questions.
    1) I am seeing very slowness when selecting the select list. Will these java code require much resource?
    2) I need to put this logic in many screens for many columns. So having these many application process and application items and java code, will the application performance get a hit? I know that application process are on-demand and get called only when required.
    declare
    l_counter number;
    l_o_name varchar2(2000);
    begin
    owa_util.mime_header('text/xml', FALSE );
    htp.p('Cache-Control: no-cache');
    htp.p('Pragma: no-cache');
    owa_util.http_header_close;
    htp.prn('<select>');
    for rec in (select "ORA_DATABASES_VW"."DATABASE_NAME" as "DATABASE_NAME",
    "ORA_DATABASES_VW"."DB_ID" as "DB_ID"
    from "ORA_DATABASES_VW"
    where "ORA_DATABASES_VW"."HOST_NAME" = :TEMP_ITEM)
    loop
    htp.prn('<option value="' || rec.db_id || '">' || rec.database_name || '</option>');
    end loop;
    htp.prn('</select>');
    end;
    HTML Header on that page:
    =================
    <script language="JavaScript1.1" type="text/javascript">
    function get_List_XML (source_item,target_item){
    var v_Target = html_GetElement(target_item);
    var v_Source = html_GetElement(source_item);
    var ajaxResult = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=POPULATE_LIST_XML',0);
    ajaxResult.add('TEMP_ITEM',source_item.value);
    var v_result_xml = ajaxResult.get('XML');
    if(v_result_xml && v_Target)
    var options_Contents = v_result_xml.getElementsByTagName("option");
    v_Count = options_Contents.length;
    v_Target.length = 0;
    for(var i=0;i<v_Count;i++)
    var v_opt_xml = v_result_xml.getElementsByTagName("option");
    appendToSelect(v_Target, v_opt_xml.getAttribute ('value'),v_opt_xml.firstChild.nodeValue)
    function appendToSelect(target_item, option_val, option_content) {
    var v_Opt = document.createElement("option");
    v_Opt.option_value = option_val;
    if(document.all){
    target_item.options.add(v_Opt);
    v_Opt.innerText = option_content;
    }else{
    v_Opt.appendChild(document.createTextNode(option_content));
    target_item.appendChild(v_Opt);
    </script>
    Form element attribute in the host_name column. P935_INSTANCE_DB_NAME is my page item for database_name.
    onchange="get_List_XML (this,'P935_INSTANCE_DB_NAME')"
    }

  • Not well-formed error while implementin ajax in firefox---can anyone help

    hi techies,
    I'm trying to implement ajax in firefox and i'm getting not well-formed error in error console
    heres part of code
    var xmlHttp;
    function create(){
    if(window.ActiveXObject){
    xmlHttp=window.ActiveXObject("Microsoft.XMLHTTP");
    else if(window.XMLHttpRequest){
    xmlHttp=window.XMLHttpRequest();
    else{
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    function getEmployeeDetails(){
    frm = document.forms[0];
    empid = frm.elements["empid"].value;
    url="empdetails.jsp?empid=" + empid;
    xmlHttp.open("GET" ,url, true);
    xmlHttp.onreadystatechange=doUpdate;
    xmlHttp.send(null);
    function doUpdate(){
    if(xmlHttp.readyState==4 && xmlHttp.status == 200){
    var root = xmlHttp.responseXML.documentElement;
    ----so on
    jsp Page is
    <%@ page import="java.sql.*" contentType="text/xml" %>
    <%
    String empid=request.getParameter("empid");
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:vmouli","hr","hr");
    Statement st=con.createStatement();
    ResultSet rs=st.executeQuery("select first_name,salary from employees where employee_id=" + empid);
    if(rs.next()){
    out.println("<employee><name>");out.println(rs.getString(1));
    out.println("</name><salary>");out.println(rs.getString(2));
    out.println("</salary></employee>");
    else{
    out.println("<error>Employee ID not found</error>");
    rs.close();
    st.close();
    con.close();
    %>
    Firefox error console is saying not well-formed and is pointing to starting of my jsp page
    can anyone help plzzz

    mouli007 wrote:
    Thanx for that Cotton
    My XML document is wellformed no doubt about thatNo doubt about that?!?
    I would say there is a great deal of doubt about that, especially since the subject of this thread, which you stated was the error message from FireFox is that the document is not well formed at all. I have some more wild guesses about what you've screwed up. Would you like to hear them? My best guess at this point would be that you are outputting some whitespace at the start of the output.
    Anyway, this seems pretty pointless. Your code is crap. And I really don't see the point in telling us you have an error, posting code, then having several people identify several major problems in your code and then for you tell us that your code is perfect. Your code is not perfect. It's terrible. Fix it. You've been given several ideas in this and your cross-post as to how to fix it.

  • Not well-formed error in firefox in implementing ajax--pls help

    hi techies,
    I'm trying to implement ajax in firefox and i'm getting not well-formed error in error console
    heres part of code
    var xmlHttp;
    function create(){
    if(window.ActiveXObject){
    xmlHttp=window.ActiveXObject("Microsoft.XMLHTTP");
    else if(window.XMLHttpRequest){
    xmlHttp=window.XMLHttpRequest();
    else{
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    function getEmployeeDetails(){
    frm = document.forms[0];
    empid = frm.elements["empid"].value;
    url="empdetails.jsp?empid=" + empid;
    xmlHttp.open("GET" ,url, true);
    xmlHttp.onreadystatechange=doUpdate;
    xmlHttp.send(null);
    function doUpdate(){
    if(xmlHttp.readyState==4 && xmlHttp.status == 200){
    var root = xmlHttp.responseXML.documentElement;
    ----so on
    jsp Page is
    <%@ page import="java.sql.*" contentType="text/xml" %>
    <%
    String empid=request.getParameter("empid");
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:vmouli","hr","hr");
    Statement st=con.createStatement();
    ResultSet rs=st.executeQuery("select first_name,salary from employees where employee_id=" + empid);
    if(rs.next()){
    out.println("<employee><name>");out.println(rs.getString(1));
    out.println("</name><salary>");out.println(rs.getString(2));
    out.println("</salary></employee>");
    else{
    out.println("<error>Employee ID not found</error>");
    rs.close();
    st.close();
    con.close();
    %>
    Firefox error console is saying not well-formed and is pointing to starting of my jsp page
    can anyone help plzzz

    As BalusC said - run the JSP producing the xml.
    Save that xml to a file - INCLUDING any white space - because thats what you actually get.
    Open that xml file in your browser - it should tell you at that point if your xml is well formed.
    AS BalusC said this is better done in a servlet - especially since you're just doing out.println.
    JSPs add extra whitespace and carriage returns. While that won't necessarily break XML, it can cause problems with the first few characters.

Maybe you are looking for

  • How can i delete an incomplete movie download on ipad air?

    I used the app "12 presents" that gives the user everyday a new present that is only downloadable on this very day. One of these presents was a movie track I started to download. But unfortunately my internet broke down and so the download kept incom

  • Adobe Exchange Panel Extension does not install

    As titled, after download the extension for CS6 and double click, the extension manager is opened. But nothing is happed nor any notification or sign of installation. And open PS, Illustrator, there is no "Adobe Exchange" in exchange menu. Our system

  • No rounding with rounding profil when conversion  Roundg Unit Purch Unit

    Hello, I have a trouble when I try to make a purchase order with a material which has this data: Base unit ST Purchase unit on info record : CAR Rouding profil on info record : only with unit PAQ (%+ 50 ; %-50) Variable purchase order unit : 1 active

  • How to capture data of text area

    Hello Experts,         I have added a text area to a home page using the tag as below <textarea id="recipient_list" rows="5" cols="40" name="recipients"></textarea> I expect this text area to be populated at runtime. I want to use the data entered in

  • FM to create Object Type(ET) - LSO

    Hi all, Can you please suggest me the function module which is used to create an object type "ET"  which involves infotypes namely 1000, 1001, 1026. There's one LSO function module which is used typically when a student is booked into a new static We