更新我已更正錯誤。除了一些拼寫錯誤外,還有一些不明顯的語法錯誤。我想出瞭如何使用Firefox的Firebug來發現其餘的。未將InnerHTML寫入DIV的文檔
感謝所有花時間閱讀我的新帖的人。
需要我的代碼的一些幫助。我有另一個更少的問題,可以正常工作。我似乎無法找到這個破碎的地方。在輸入/更改表單域後,我遇到的問題在DIV中沒有顯示出來。重置按鈕正常工作。還有任何腳本軟件的建議表示讚賞。
感謝,
Strutte2
<script type="text/javascript">
function processForm() {
var customer_Name = document.configInfo.customername.value;
var order_Number = document.configInfo.ordernumber.value;
var base_Model = document.configInfo.basemodel.value;
var install_Country = document.configInfo.basemodel.value;
var install_State = document.configInfo.installstate.value;
var pump_Type = document.configInfo.pumptype.value;
var Style = document.configInfo.style.value;
var Blender = document.configInfo.blender.value;
var specify_Side = document.configInfo.specifyside.value;
var grades_Products = document.configInfo.gradesproducts.value;
var hoses_Nozzles = document.configInfo.hosesnozzles.value;
var payment_Interface = document.configInfo.paymentinterface.value;
var meter_Type = document.configInfo.metertype.value;
var fuel_Combinations = document.configInfo.fuelcombinations.value;
var fuel_Inlet1 = document.configInfo.fuelinlet1.value;
var fuel_Inlet2 = document.configInfo.fuelinlet2.value;
var fuel_Inlet3 = document.configInfo.fuelinlet3.value;
var vapor_Recovery = document.configInfo.vaporrecovery.value;
var remote_Filter = document.configInfo.remotefilter.value;
var hydrosorb_Strainer = document.configInfo.hydrosorbstrainer.value;
var junction_Box = document.configInfo.junctionbox.value;
var hose_Handling = document.configInfo.hoseretraction.value;
var nozzle_Activation = document.configInfo.nozzleactivation.value;
var Hoses = document.configInfo.hoses.value;
var Nozzles = document.configInfo.nozzles.value;
var payment_Platform = document.configInfo.paymentplatform.value;
var Display = document.configInfo.display.value;
var soft_Keys = document.configInfo.softkeys.value;
var ethernet_Options = document.configInfo.ethernetoptions.value;
var payment_Keypad = document.configInfo.ethernetoptions.value;
var card_Reader = document.configInfo.cardreader.value;
var sales_Volume = document.configInfo.salesvolume.value;
var unit_Price = document.configInfo.pricedisplay.value;
var preset_Keypad = document.configInfo.presetkeypad.value;
var stop_Button = document.configInfo.stopbutton.value;
var Totalizers = document.configInfo.totalizers.value;
var Intercom = document.configInfo.intercom.value;
var lock_Options = document.configInfo.lockoptions.value;
var security_Switches = document.configInfo.securityswitches.value;
var dallas_Reader = document.configInfo.dallasreader.value;
var Valance = document.configInfo.valance.value;
var custom_Panel = document.configInfo.custompanel.value;
` var Packaging = document.configInfo.packaging.value;
var graphics_Spec = document.configInfo.graphicsspec.value;
var product_Ids = document.configInfo.productids.value;
var Language = document.configInfo.language.value;
var auto_Discount = document.configInfo.autodiscount.value;
var keypad_Assembly = document.configInfo.keypadassembly.value;
var model_String = document.configInfo.modelstring.value;
var CSR = document.configInfo.csr.value;
var phone_Ext = document.configInfo.phoneext.value;
var holdInfo = '<div> Customer Name: ' + customer_Name + '</div>' +
'<div> Order Number:' + order_Number + '</div>' +
'<div> Base Model: ' + base_Model + '</div>' +
'<div> Installation Country ' + install_Country + '</div>' +
'<div> Installation State ' + install_State + '</div>' +
'<div> Pump Type:' + pump_Type + '</div>' +
'<div> Style: ' + Style+ '</div>' +
'<div> Blender: ' + Blender+ '</div>' +
'<div> Specify Side: ' + specify_Side+ '</div>' +
'<div> No. Grades/Products: ' + grades_Products+ '</div>' +
'<div> No. Hoses/Nozzles: ' + hoses_Nozzles+ '</div>' +
'<div> Payment Interface: ' + payment_Interface+ '</div>' +
'<div> Meter Type: ' + meter_Type+ '</div>' +
'<div> Fuel Combinations: ' + fuel_Combinations+ '</div>' +
'<div> Fuel Inlet 1: ' + fuel_Inlet1+ '</div>' +
'<div> Fuel Inlet 2: ' + fuel_Inlet2+ '</div>' +
'<div> Fuel Inlet 3: ' + fuel_Inlet3+ '</div>' +
'<div> Vapor Recovery: ' + vapor_Recovery+ '</div>' +
'<div> Remote Filter: ' + remote_Filter+ '</div>' +
'<div> Hydrosorb Strainer: ' + hydrosorb_Strainer+ '</div>' +
'<div> Junction Box: ' + junction_Box+ '</div>' +
'<div> Hose Handling: ' + hose_Handling+ '</div>' +
'<div> Nozzle Activation: ' + nozzle_Activation+ '</div>' +
'<div> Hoses: ' + Hoses+ '</div>' +
'<div> Nozzles: ' + Nozzles+ '</div>' +
'<div> Payment Platform: ' + payment_Platform+ '</div>' +
'<div> Display: ' + Display+ '</div>' +
'<div> Soft Keys: ' + soft_Keys+ '</div>' +
'<div> Ethernet Options: ' + ethernet_Options+ '</div>' +
'<div> Payment Keypad: ' + payment_Keypad+ '</div>' +
'<div> Card Reader: ' + card_Reader+ '</div>' +
'<div> Sales Volume: ' + sales_Volume+ '</div>' +
'<div> Unit Price Display: ' + unit_Price+ '</div>' +
'<div> Preset Keypad: ' + preset_Keypad+ '</div>' +
'<div> Stop Button: ' + stop_Button+ '</div>' +
'<div> Totalizers: ' + Totalizers+ '</div>' +
'<div> Intercom: ' + Intercom+ '</div>' +
'<div> Lock Options: ' + lock_Options+ '</div>' +
'<div> Security Switches: ' + security_Switches+ '</div>' +
'<div> IDS (Dallas) Reader: ' + dallas_Reader+ '</div>' +
'<div> Valance: ' + Valance+ '</div>' +
'<div> Extra Custom Panel: ' + custom_Panel+ '</div>' +
'<div> Packaging: ' + Packaging+ '</div>' +
'<div> Graphics Spec & #: ' + graphics_Spec+ '</div>' +
'<div> Product IDs: ' + product_Ids+ '</div>' +
'<div> Language: ' + Language+ '</div>' +
'<div> Automatic Discount: ' + auto_Discount+ '</div>' +
'<div> Keypad Assembly: ' + keypad_Assembly+ '</div>' +
'<div> Model String: ' + model_String + '</div>' +
'<div> CSR: ' + CSR + '</div>' +
'<div> Phone Ext: ' + phone_Ext + '</div>';
document.getElementById("copyfield").innerHTML = holdInfo;
}
function clearForm() {
var blank = "";
document.getElementById('copyfield').innerHTML = blank;
}
</script>
的JSLint是不是在定義的錯誤太大的幫助。
爲什麼添加額外的CSS和HTML如果一個javascript問題 –
究竟是什麼壞了?當你做什麼,什麼不會發生?請詳細描述什麼是錯的,以及如何重現問題。你是否在瀏覽器錯誤控制檯查看腳本錯誤? – jfriend00
對,這是很多代碼。如果你需要幫助(而不是很多'tl; dr',然後'去別的地方'),你需要將其減少到重現問題所需的* minimal *代碼。 –