dakoz
Programmer
- Feb 2, 2002
- 74
Hi there... i am trying for the past week to implement a javascript inside a phpBB forum. The script works great individually but when i put it inside the forum i get errors. But Internet Explorer can't locate the exact location of the false. It just returns me Object Expected and line 625. Where line 625 has nothing to do with any scripts used! Is there a way to locate the exact line when the error occurs? (Dont SAy mozilla!! Already tried it)
the script i am using is the following.
// function to draw form based on image array
function drawform(){
// start of form html
formHTML = '<TABLE width=200 height=243 cellpadding=0 cellspacing=0 bgcolor="FFFFFF">' +
'<TR><TD height=243 align=center valign=top>' +
'<select class="form" name="selbox" size="1" onChange="imgchange(this)">';
// create option tag for each element of image array
for(x=0; x<myimages.length; x++){
formHTML = formHTML + '<option value="' + myimages[x][1] + '">' + myimages[x][0] + ' ' + myimages[x][2];
}
//end of form html
formHTML = formHTML + '</select>';
//Add a text field here
//formHTML = formHTML + '<input type="text" id="text1" value="mmm' + myimages[0][1] + '">';
formHTML = formHTML + '<BR><img src="spacer.gif" width=200 height=240 name="imgq"><BR>';
formHTML = formHTML + '<A id=text1 href="#"><img src="insert.jpg" border=0></A>';
document.write(formHTML);
}
// function to change image source based on select change
function imgchange(obj){
var si = obj.selectedIndex;
var fname = myimages[si][1];
document.getElementById('imgq').src = fname ;
//Change text field here
document.getElementById('text1').href = 'javascript:emoticon(\'
\')';
}
formHTML = '</TD></TR></TABLE>'
any ideas?
the script i am using is the following.
// function to draw form based on image array
function drawform(){
// start of form html
formHTML = '<TABLE width=200 height=243 cellpadding=0 cellspacing=0 bgcolor="FFFFFF">' +
'<TR><TD height=243 align=center valign=top>' +
'<select class="form" name="selbox" size="1" onChange="imgchange(this)">';
// create option tag for each element of image array
for(x=0; x<myimages.length; x++){
formHTML = formHTML + '<option value="' + myimages[x][1] + '">' + myimages[x][0] + ' ' + myimages[x][2];
}
//end of form html
formHTML = formHTML + '</select>';
//Add a text field here
//formHTML = formHTML + '<input type="text" id="text1" value="mmm' + myimages[0][1] + '">';
formHTML = formHTML + '<BR><img src="spacer.gif" width=200 height=240 name="imgq"><BR>';
formHTML = formHTML + '<A id=text1 href="#"><img src="insert.jpg" border=0></A>';
document.write(formHTML);
}
// function to change image source based on select change
function imgchange(obj){
var si = obj.selectedIndex;
var fname = myimages[si][1];
document.getElementById('imgq').src = fname ;
//Change text field here
document.getElementById('text1').href = 'javascript:emoticon(\'
}
formHTML = '</TD></TR></TABLE>'
any ideas?