I have an asp.net page that I put some javascript on using the following code:
The code gets put inside the <form> tags but when I run the code I get an error that says that "formFloorPlan is undefined"Code:If (Not ClientScript.IsClientScriptBlockRegistered("clientScript")) Then ClientScript.RegisterClientScriptBlock(Me.GetType(), "clientscript", sScript) End If
Why is it not defined?Code:<form name="ctl00" method="POST" action="FloorMgr_Cleaned.aspx" id="ctl00"> <div> Image goes here </div> <script language=javascript type="text/javascript"> showStatus('Saving Locations...'); //Update points for every floor object document.body.style.cursor = "wait"; IDs = new Array(); xLocations = new Array(); yLocations = new Array(); for(x=0;x<document.all.length;x++) { test = new String(document.all(x).id); if(test.indexOf("FloorObject_") != -1) { //We must store only UNSCALED coordinates! Meaning: Divide by the scale factor before storing xpos = document.all(x).style.posLeft / formFloorPlan.scalefactor.value; ypos = document.all(x).style.posTop / formFloorPlan.scalefactor.value; IDs[IDs.length] = test.substr(12); xLocations[xLocations.length] = xpos; yLocations[yLocations.length] = ypos; } } formFloorPlan.objectIDs.value = IDs.toString(); formFloorPlan.objectXlocations.value = xLocations.toString(); formFloorPlan.objectYlocations.value = yLocations.toString(); ///////////////// LocationCodes (roomcodes) Handling ////////////
Thanks.


Reply With Quote
Bookmarks