Yeah, that's the first thing I tried, but Firebug reports a JS error:
"$ is not defined"

On Jan 4, 5:46 pm, Jack Killpatrick <j...@ihwy.com> wrote:
> If you're just returning an html snippet, you could include some js.
> Echo something like this back:
>
> <script type="text/javascript">
>      $('#yourFieldID').show(); // any js you want to fire
> </script>
>
> - Jack
>
> Magnificent wrote:
> > I have a login system that has a slideup/slidedown show/hide function
> > for a forgot password link.  It is hidden by default and it's
> > triggered with toggle().  Works just fine.  I have php validation on
> > that forgot password text field so if someone tries to submit with
> > that field empty they get an error message telling them to enter their
> > email address so we can send them a new password.
>
> > The issue I'm having is when that error message is triggered, the
> > forgot password text field is hidden, where I want to have it shown as
> > it's a bit jarring to have it suddenly go away and they have to click
> > the trigger to show it again.
>
> > Anyone have any ideas how I can do this?
>
> > //FORGOT PASSWORD
> > if (isset($_POST['forgot_password'])) {
> >      logic here to send user a new password
> > } else {
> >      TRIGGER JQUERY HERE SO FORGOT PASSWORD IS SHOWN
>
> >      //report the errors
> >      echo '<div id="errors"><span>The following error(s) occurred:</
> > span>';
>
> >      echo '<ul>';
> >      foreach($errors as $error) {
> >           echo "<li>$error</li>";
> >      }
> >      echo '</ul></div>';
> > }

Reply via email to