View Full Version : Script.aculo.us

02-07-2007, 08:18 PM
Hi there,

I have integrated scriptaculous with my website.

I have a wide rectangle image with a login form in it.

Now when i user loads the page, they can login with the login form at the top. But i cant get it so that when they click login, instead of going straight to their account panel, i want the whole login form to scrool upwards, and then once it has scrolled upwards, it will log them in.

Here is the scroll up line of code...

effect_1 = Effect.SlideUp('d1',{duration:1.0}); return false;

And here is the form...

<div id="d1" style="display:none;"><div class="account_bar"><div class="account_bar_img"><img src="http://digg.com/userimages/a/l/l/allsortgroup/small2202.jpg" alt="Demo Account" /></div><div class="account_bar_left">Hello, Guest! | <a href="/">Register</a> or Login</div><div class="account_bar_right"><form action="http://www.allsorthost.com/client/index.php" method="POST" name="form1" id="form1">Username: <input type="text" name="USERNAME" size="12" value="<?php echo $_GET[quick_username]; ?>" class="account_form_text" />&nbsp;Password: <input type="password" name="PASSWORD" size="12" value="<?php echo $_GET[quick_password]; ?>" class="account_form_text" />&nbsp;<INPUT TYPE="hidden" NAME="LOGIN" VALUE="1"><input type="submit" name="Submit" value="Login" class="form_submitt"></form></div></div></div>

How do i add the line of code into the form so that it will scrool up, and then log the user in?