Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Regular Coder Andy92's Avatar
    Join Date
    Nov 2005
    Location
    Horsham, West Sussex, UK
    Posts
    363
    Thanks
    7
    Thanked 1 Time in 1 Post

    Scriptaculous scroll effect in a form?

    Hi there,

    I have the following form at my website...

    Code:
    <script type="text/javascript" language="javascript" charset="utf-8">
    // <![CDATA[
      var effect_1 = null;
    // ]]>
    </script>
    
    <a href="#" onclick="effect_1 = Effect.SlideDown('d1',{duration:1.0}); return false;">Start slide down</a> | 
    <a href="#" onclick="effect_1 = Effect.SlideUp('d1',{duration:1.0}); return false;">Start slide up</a> | 
    <a href="#" onclick="effect_1.cancel(); return false;">cancel()</a> |
    <a href="#" onclick="alert(Object.inspect($('d1').firstChild.style)); return false;">inspect()</a> |
    <a href="#" onclick="$('d1').firstChild.innerHTML += $('d1').firstChild.innerHTML; return false;">add content</a>
    
    <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>
    Basically, i go to my website, then i click scroll down, and it has the login box. Then i type in my login details and it logges me in.

    But is there a line of code that i can add to make the form scroll up, and then log the user in? I have tried putting the following in the <form> line before the form action, but all it does is scrolls up and doesnt log me in???...

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

    How can i get it so that when users login, the form delays for 1 or 2 seconds while the login boxes fade up, and then it goes to the client panel?

    Last edited by Andy92; 02-06-2007 at 09:44 PM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •