Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About CarinaVB

  • Rank
  1. CarinaVB

    Asp and ajax errors

    In firefox I get this error:Error: document.getElementById("btn9").click is not a function
  2. CarinaVB

    Asp and ajax errors

    I've seen that page but, the problem is that...when the page loaded automaticly perform the click event, without clicking on the image (only when the page starts) I try this way and I canĀ“t, when I change the code, I get nothing....I hope you can understand what I'm trying to do...Regards
  3. CarinaVB

    Asp and ajax errors

    justsomeguy, thanks for the answer, but!! how I do that? can you show me an example?Deirdre's Dad, thanks for the answer, I attach an example.ExampleRegards
  4. CarinaVB

    Asp and ajax errors

    Hello: I have an asp file thats builds an xml and retrieve database data, but it only works with Internet Explorer 6.1) The code of the principal.asp is: function connXML(url,vopt) { http_request = false; opt=vopt if (window.XMLHttpRequest) { // Mozilla, Safari,... http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { http_request.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { // IE try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } if (!http_request) { alert('Giving up Cannot create an XMLHTTP instance'); return false; } http_request.onreadystatechange = alertContents; http_request.open('GET', url, true); http_request.send(null); } function alertContents() { if (http_request.readyState == 4) { if (http_request.status == 200) { var xmldoc = http_request.responseXML; switch (opt){ case "N": if (xmldoc0) {xmldoc = xmldoc0; xmldoc0=null} if (xmldoc.getElementsByTagName('RES').item(0).firstChild.data!="-1") { <% for each campo in split(v_campos,",") %> if(xmldoc.getElementsByTagName('<%= campo %>').item(0).firstChild) document.all.txt_<%= campo %>.value = xmldoc.getElementsByTagName('<%= campo %>').item(0).firstChild.data; else document.all.txt_<%= campo %>.value = ''; <% next %> } frame_detalle.location.href="parte_boleteria_detalles.asp?opt=N&id="+document.all.txt_ID_RECLAMO.value break; } else { alert('Ocurrio un Problema, Por Favor Ingrese Nuevamente'); } } }function Navegar(nav){ connXML(url,'N');}The error here is:Error: xmldoc.getElementsByTagName("RES").item(0) is null2) The asp wichs builds xml:principal_xml.asp<%Response.ContentType = "text/xml"%><%Set OBJdbConnection = Server.CreateObject("ADODB.Connection")OBJdbConnection.Open "Driver=SQL Server;Server=webserver\SQLEXPRESS;Initial Catalog=soporte;tRUSTED cONNECTION=No; User ID=sa; PWD=xxxxxxx"%><?xml version="1.0" encoding="iso-8859-1"?><%select case request.querystring("opt")case "N" strWHERE = "" strSQL = "" select case request.querystring("nav") case "P" 'PRIMERO strSQL = "SELECT min("&Session("v_id_tabla")&") as "&Session("v_id_tabla")&" from "&Session("v_tabla") case "A" 'ANTERIOR strSQL = "SELECT max("&Session("v_id_tabla")&") as "&Session("v_id_tabla")&" from "&Session("v_tabla")&" where "&Session("v_id_tabla")&" < '" & request.querystring("id") &"'" case "S" 'SIGUIENTE strSQL = "Select min("&Session("v_id_tabla")&") as "&Session("v_id_tabla")&" from "&Session("v_tabla")&" where "&Session("v_id_tabla")&" > '" & request.querystring("id") &"'" case "U" 'ULTIMO strSQL = "SELECT max("&Session("v_id_tabla")&") as "&Session("v_id_tabla")&" from "&Session("v_tabla")&"" case "B" 'BUSCAR strSQL = "'" & request.querystring("id") & "'" end select strSQL = "SELECT * FROM "&Session("v_tabla")&" where "&Session("v_id_tabla")&" in (" & strSQL &") ORDER BY "&Session("v_id_tabla")&"" 'response.write strSQL set rs=OBJdbConnection.execute(strSQL) %> <objetos> <% do while not rs.eof %> <objeto> <RES>1</RES> <% for i=0 to rs.fields.count -1 %> <<%= rs(i).name %>><%=rs(rs(i).name)%></<%= rs(i).name %>> <% next %> </objeto> <% rs.movenext loop %> <objeto> <RES>-1</RES> </objeto> </objetos> <% rs.close set rs=nothingThe error here is the line colored:Error: XML or text declaration in a place other than the entity principle<?xml version="1.0" encoding="iso-8859-1"?>3) The other problem is that when this page starts I have:document.all.btn9.click();window.focus();where btn9 is<img class="imgpointer" src="configuracion/images/mnu_ultimo.jpg" alt="Ultimo" onclick="Navegar('U')" name="btn9" id="btn9">The error here is:Error: document.all.btn9.click is not a functionAnybody has an idea?I search in the web but still can't resolve any of this errors....Regards
  • Create New...