I'm trying to figure out why this is working in Firefox, but not in Explorer. Granted, I'm new to Smarty, but I can't understand what the problem would be.

From my index file:

/* Checks to see if there are errors with the form and displays them accordingly */
if(!empty($_SESSION['error']) ) { $smarty->assign('errors', array($_SESSION['error'])); }
$smarty->assign('formaction','process.php');
$smarty->display('index.tpl');

From my tpl file:

<div id="loginForm">
<form action="{$formaction}" method="POST">
<h1>Login</h1>

/* If there were errors, it should display them here */

 {if $errors}
           <div id="errors">
            <ul>
            {foreach from=$errors item=errorMsg name=thisLoop}
               <li style="list-style-type:none">{$errorMsg}</li>
            {/foreach}
            </ul>
            </div>
  {/if}

In Firefox, the errors display as expected, but in IE, it doesn't display anything at all. No errors, no messages, no nothing.

I thought that maybe it was a CSS thing, but when I removed {if $errors} from my tpl file, I get the formatted box (albeit blank).

    Try {if $errors|count > 0}

    Although I don't know how effective it will be since you seem to have clientside issues ... maybe.

    :queasy:

      Write a Reply...