Board Logo

Error message from eventcalendar.js
Slacker - 9/28/2008 at 04:57 PM

I use a chatprogram SPChat for PHP-Nuke, which is now unsupported it seems.

I get an error message from both Explorer and Firefox, when oppening the chat window.

parent.window.wIn.documents.forms.form1.elements is null or not an object.

This points to this line in SPChat options:

var cal1 = new calendar1(parent.window.wIn.document.forms['form1'].elements['txt']);

The entire part for this code:


<?php if ($GLOBALS['spchat']['config']['allow_events'] == 1 && $admincreated === true ) { ?>
<script language="JavaScript" src="<?=$GLOBALS['spchat']['basedir'] ?>/eventcalendar.js.php"></script>
<script language="JavaScript">
<!--
var cal1 = new calendar1(parent.window.wIn.document.forms['form1'].elements['txt']);
cal1.year_scroll = true;
cal1.time_comp = true;
//-->
</script>

Grateful for input!
In Firefox the chat window don't reveal what people with Explorer chat. Don't know if this is connected with this error.


tigra - 12/8/2008 at 04:02 AM

make sure form form with name "form1" exists in the document.
If name of the form is different update it in the calendar initialization. If forms are not named then use numeric indexes (document.forms[0] refers first form in the page)


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/