gilgalbiblewheel
Feb 26th 2009, 9:51 am
I put a long script but the problem is small.
var book1 = bobj1.value;
var chapter1 = cobj1.value;
var verse1 = vobj1.value;
var book2 = bobj2.value;
var chapter2 = cobj2.value;
var verse2 = vobj2.value;
var bcvQuotes = new Array();
bcvQuotes[0] = "book1=";
bcvQuotes[1] = "&chapter1=";
bcvQuotes[2] = "&verse1=";
bcvQuotes[3] = "&book2=";
bcvQuotes[4] = "&chapter2=";
bcvQuotes[5] = "&verse2=";
var bcv = new Array();
bcv[0] = book1;
bcv[1] = chapter1;
bcv[2] = verse1;
bcv[3] = book2;
bcv[4] = chapter2;
bcv[5] = verse2;
var urlExtension = document.getElementById('displayurl');
var getKeyURL = "";
//var getKeyURL = "book1="+book1+"&chapter1="+chapter1+"&verse1="+verse1+"&book2="+book2+"&chapter2="+chapter2+"&verse2="+verse2;
urlExtension.innerHTML = "";
//urlExtension.innerHTML = "book1="+book1+"&chapter1="+chapter1+"&verse1="+verse1+"&book2="+book2+"&chapter2="+chapter2+"&verse2="+verse2;
for(a=0; a<bcv.length; a++){
if(bcv[a]!= ""){
getKeyURL += bcvQuotes[a] + bcv[a];
urlExtension += bcvQuotes[a] + bcv[a];
}
}
I don't know if this is written properly:
if(bcv[a]!= ""){
The reason this is happening is because the error shows:
Error: cobj1 is null
Source File: http://...twotexts/js/twotextstextareasample.js
Line: 163
var book1 = bobj1.value;
var chapter1 = cobj1.value;
var verse1 = vobj1.value;
var book2 = bobj2.value;
var chapter2 = cobj2.value;
var verse2 = vobj2.value;
var bcvQuotes = new Array();
bcvQuotes[0] = "book1=";
bcvQuotes[1] = "&chapter1=";
bcvQuotes[2] = "&verse1=";
bcvQuotes[3] = "&book2=";
bcvQuotes[4] = "&chapter2=";
bcvQuotes[5] = "&verse2=";
var bcv = new Array();
bcv[0] = book1;
bcv[1] = chapter1;
bcv[2] = verse1;
bcv[3] = book2;
bcv[4] = chapter2;
bcv[5] = verse2;
var urlExtension = document.getElementById('displayurl');
var getKeyURL = "";
//var getKeyURL = "book1="+book1+"&chapter1="+chapter1+"&verse1="+verse1+"&book2="+book2+"&chapter2="+chapter2+"&verse2="+verse2;
urlExtension.innerHTML = "";
//urlExtension.innerHTML = "book1="+book1+"&chapter1="+chapter1+"&verse1="+verse1+"&book2="+book2+"&chapter2="+chapter2+"&verse2="+verse2;
for(a=0; a<bcv.length; a++){
if(bcv[a]!= ""){
getKeyURL += bcvQuotes[a] + bcv[a];
urlExtension += bcvQuotes[a] + bcv[a];
}
}
I don't know if this is written properly:
if(bcv[a]!= ""){
The reason this is happening is because the error shows:
Error: cobj1 is null
Source File: http://...twotexts/js/twotextstextareasample.js
Line: 163