[imp] IMP identities: javascript error under Netscape.

mays@optonline.net mays@optonline.net
Wed, 11 Jul 2001 21:26:36 -0400


Not sure why, but the follow does the trick for me.  Why should explicitly
specifying value="" be any different than not specifying a key/value pair
at all ?

BTW, small additional fix when not using cookies (first chunk of patch below).

Mark

--- /cvs/horde/imp/templates/identities/manage.inc	Wed Jul 11 20:17:41 2001
+++ /cvs/horde/imp/templates/identities/manage.inc	Wed Jul 11 21:16:52 2001
@@ -1,4 +1,4 @@
-<form method="post" name="identities" action="identities.php" onsubmit="return checkSubmit()">
+<form method="post" name="identities" action="<?= Horde::applicationUrl('identities.php') ?>" onsubmit="return checkSubmit()">
 <input type="hidden" name="actionID" />
 
 <table border="0" align="center" width="100%" cellspacing="0" cellpadding="3">
@@ -44,7 +44,7 @@
     !$prefs->isLocked('sig_first')):
 ?>
 
-<input type="hidden" name="edit_identity" <?= isset($to_edit) ? 'value="' . $to_edit . '" ' : '' ?>/>
+<input type="hidden" name="edit_identity" value="<?= isset($to_edit) ? $to_edit : '' ?>"/>
 
 <?= _("Identity's name:") ?><br />
 <input name="id" size="30" maxlength="60" class="fixed" <?= isset($to_edit) ? 'value="' . $identities[$to_edit]['id'] . '" ' : '' ?>/><br />

Jan Schneider wrote:
>  Zitat von Jason Hollinden <jhollind@mh5.com>:
>
>  > Running the latest CVS HEAD tag (about 1 hour ago) of Horde/IMP.  When
>  > using Netscape 4.77 with javascript turned on, and I select my default
>  > identity, I get javascript errors like this:
>  >
>  > ===============8<---------------------
>  >
>  >       JavaScript Error: https://webmail.mh5.com/imp/identities.php, line 122:
>  >
>  >       fields[identity] has no properties.
>
>  I got this one fixed.
>
>  > ===============8<---------------------
>  >
>  > None of the fields are populated when this occurs.  I am also not able
>  > to create any new identities.  I get the following PHP error when trying:
>  >
>  > ===============8<---------------------
>  >
>  >       PHP Warning:  Undefined offset:  1 in
>  >       /var/www/html/horde/imp/templates/identities/javascript.inc on line 8
>  >
>  >       PHP Warning:  Undefined offset:  1 in
>  >       /var/www/html/horde/imp/templates/identities/manage.inc on line 12
>  >
>  > ===============8<---------------------
>
>  But I don't get rid of this. Does anybody see what could cause this for NS
>  browsers?
>
>  Jan.