mechakoopa
10-25-2005, 10:35 AM
This is that webpage.
http://yoshibestiary.servegame.org/bnpb/posting.php?mode=newtopic&f=1
I've making phpBB MOD that user will can add poll without reload the page many times.
After clicked the button [ Add Option ] on Internet Explorer, it returns "Unknown Error" or Error #0
            // A function to add poll option.
            function addoptions() {
                pollids++;
                currentobj = document.getElementById('postingT').insertRow(document.getElementById('newPollRow').rowIndex);
                // OKay, this is the HTML of the newly added poll row!
                tmphtml = '<td class="row1"><span class="gen"><b>{L_POLL_OPTION}</b></span></td>'
                tmphtml += '<td class="row2"><span class="genmed"><input type="text" name="poll_option_text[' + pollids + ']" size="50" class="post" maxlength="255" value="" /></span>'
                tmphtml += '<input type="button" onClick="document.getElementById(\'postingT\').deleteRow(document.getElementById(\'tehpolid' + pollids + '\').rowIndex); pollids--; return false;" value="{L_DELETE_OPTION}" class="liteoption" />'
                tmphtml += '</td>';
                currentobj.innerHTML = tmphtml;
                // Since currentobj.id is read-only!
                currentobj.setAttribute('id','tehpolid' + pollids);
            }
There's an error in that red line.
Can anyone help me fixing this problem please?
Thank you,
DTTVB
http://yoshibestiary.servegame.org/bnpb/posting.php?mode=newtopic&f=1
I've making phpBB MOD that user will can add poll without reload the page many times.
After clicked the button [ Add Option ] on Internet Explorer, it returns "Unknown Error" or Error #0
            // A function to add poll option.
            function addoptions() {
                pollids++;
                currentobj = document.getElementById('postingT').insertRow(document.getElementById('newPollRow').rowIndex);
                // OKay, this is the HTML of the newly added poll row!
                tmphtml = '<td class="row1"><span class="gen"><b>{L_POLL_OPTION}</b></span></td>'
                tmphtml += '<td class="row2"><span class="genmed"><input type="text" name="poll_option_text[' + pollids + ']" size="50" class="post" maxlength="255" value="" /></span>'
                tmphtml += '<input type="button" onClick="document.getElementById(\'postingT\').deleteRow(document.getElementById(\'tehpolid' + pollids + '\').rowIndex); pollids--; return false;" value="{L_DELETE_OPTION}" class="liteoption" />'
                tmphtml += '</td>';
                currentobj.innerHTML = tmphtml;
                // Since currentobj.id is read-only!
                currentobj.setAttribute('id','tehpolid' + pollids);
            }
There's an error in that red line.
Can anyone help me fixing this problem please?
Thank you,
DTTVB