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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.