Jump to content

javascript error


jenniferG

Recommended Posts

we are making a javascript ajax call with the below function We get an errors on page

message  which appear to come from the three commented lines that

begin with "document".  If we uncomment the alert line, the correct

value is returned from the ajax call, etc.  If comment out the alert line and uncomment any of the three lines that  we would expect to set the fields in the

form , then we get an error on page message. and the form controls are not uodated.

Thanks,

natalie---------------------------------------------------------------------------------------------

function getMSRP()  {

          var CAMERAMODEL =  getValue();

          var myConn = new XHConn();

          if (!myConn) {alert("XHConn creation failed.");}

          var showmsrp = function (XMLHTTPRequestObject)

        {var  myresult=XMLHTTPRequestObject.responseText;

          //alert(myresult);

          //document.getElementById("MSRP").innerHTML= myresult;

          //document.getElementById("EXTPRICE").InnerHTML=

          //document.getElementById("QTY").innerHTML * document.getElementById    ("MSRP").innerHTML;          };

        myConn.connect("returncameraprice.php", "POST" ,"CAMERAMODEL=" + CAMERAMODEL,showmsrp);

        }

Link to comment
https://forums.phpfreaks.com/topic/67234-javascript-error/
Share on other sites

we have used function passing befre, and in fact, with the same XHCONN Ajax fremework.  Thios afternoon, we changed innerHTML to value, so it read

.....document.getElementById('control[).value = ......  and then evrything

worked fine which os strange as we have other  areas of oiur websirte where innerHTML works fine and,I had thought, was the preffered way to do this--

Strange....Strange

 

Natalie

Link to comment
https://forums.phpfreaks.com/topic/67234-javascript-error/#findComment-337390
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.