Ok I stole some script and I need some help on fixing it on one thing:
Reloading on post.
here''s the script:
<div id="panel">
<form action="/loging_in/login" class="header-panel"
href="/loging_in/login" id="login-panel"
method="post" onsubmit="new
Ajax.Request(''/loging_in/login'', {asynchronous:true,
evalScripts:true,
onLoading:function(request){Form.disable(this)},
parameters:Form.serialize(this)}); return false;"
style="display:none"
style="opacity:.80">
<h2>Log in</h2>
<div id="login-panel-message"></div>
<p><label
for="user_login">Login:</label><br/>
<input type="text" name="user_login"
id="user_login" size="30"
value=""/></p>
<p><label
for="user_password">Password:</label><br/>
<input type="password" name="user_password"
id="user_password"
size="30"/></p>
<p>
<input name="commit" type="submit"
value="Log in" /> -or-
<a href="#" onclick="Panels.Login.hide(); return
false;">cancel</a>
</p>
</form>
<div id="header-panel" class="header-panel"
style="display:none"> </div>
<% if @session[:user] != nil %><a
href="/loging_in/logout"
onclick="new Ajax.Request(''/loging_in/logout'',
{asynchronous:true,
evalScripts:true}); return false;">Logout</a><% end %>
</div>
<% if @session[:user] == nil %><div id="default-status"
class="header-status">
<a href="/loging_in/login"
onclick="Panels.Login.toggle(); return
false;">Login</a> |
<a href="/loging_in/signup">Sign up</a> |
<a href="loging_in/recover"
onclick="Panels.Recover.toggle();
return false;">Forget your password?</a><% end %>
</div>
</div>
Now what I want is for it to reload if the user is loged in that way it
shows "logout" not "login | register | forgot password?"
before they
reload the page. Some are thinking that they not logged in so there
complaing. How do I make it reload?
--
Posted via http://www.ruby-forum.com/.