not sure what was going on with extending Fx.Tween. I don't have time to
look at it... I took your code and instead of using a wrapper Fx.Opacity, I
just used Fx.Tween and modified your start, set methods to use the proper
syntax.

This worked for me.

window.addEvent("domready",function(){
       var $b = $(document.getElementsByTagName('body')[0]);

       // help vars
       if($('popup_login')){
        var popup_login = new Fx.Tween('popup_login',{duration:
250}).set('opacity',0);
               $('popup_login').setStyle("display", "block");
               $('close_button_login').addEvent("click",
function(){popup_login.start('opacity',0);});
       }


       if($('popup_register')){
               var popup_register = new Fx.Tween('popup_register',
{duration: 250}).set('opacity',0);
               $('popup_register').setStyle("display", "block");
               $('close_button_register').addEvent("click",
function(){popup_register.start('opacity',0);});
       }
       // login
       if($('login_btn'))
            $('login_btn').addEvent("click", function(e){
                    new Event(e).stop();
                    popup_login.start('opacity',1);
            });

       if($('login_btn_noborder'))
            $('login_btn_noborder').addEvent("click", function(e){
                    new Event(e).stop();
                    popup_login.start('opacity',1);
            });
       // register
           if($('register_btn'))
            $('register_btn').addEvent("click", function(e){
                new Event(e).stop();
                popup_register.start('opacity',1);
            });

        if($('register_btn_noborder'))
            $('register_btn_noborder').addEvent("click", function(e){
                new Event(e).stop();popup_register.start('opacity',1);
            });

});


On Mon, Jul 20, 2009 at 2:45 PM, Philip <philip.senec...@gmail.com> wrote:

>
> No...it's running locally on my laptop right now. Here is the Master
> Page that contains the <div>'s though. I don't have any content in the
> placeholders yet. JScript.js is the file that contains the code I sent
> you. I already tried taking out the references to moocheck.js and
> formcheck.js and it didn't make any difference. The code-behind page
> follows the Master Page:
>
> <%@ Master Language="C#" AutoEventWireup="true"
> CodeFile="ScoutopiaHome.master.cs"
>    Inherits="App_Master_ScoutopiaHome" %>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
> www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head runat="server">
>    <title>Scoutopia</title>
>    <meta http-equiv="content-type" content="text/html;
> charset=utf-8" />
> </head>
> <body>
>    <form id="form1" runat="server">
>    <asp:ScriptManager ID="ScriptManager1" runat="server">
>        <Scripts>
>            <asp:ScriptReference Path="~/App_Themes/Scoutopia/Scripts/
> mootools-core.js" />
>            <asp:ScriptReference Path="~/App_Themes/Scoutopia/Scripts/
> moocheck.js" />
>            <asp:ScriptReference Path="~/App_Themes/Scoutopia/Scripts/
> formcheck.js" />
>            <asp:ScriptReference Path="~/App_Themes/Scoutopia/Scripts/
> JScript.js" />
>        </Scripts>
>    </asp:ScriptManager>
>    <div id="wrapper_main">
>        <div id="popup_login">
>            <div id="close_button_login">
>            </div>
>            <div class="top">
>                <asp:Login ID="Login1" runat="server">
>                    <LayoutTemplate>
>                        <ul class="loginposition">
>                            <li>
>                                <asp:Label ID="UserNameLabel"
> CssClass="inputbox" AssociatedControlID="UserName"
>                                    Text="Username" runat="server" />
>                                <asp:TextBox ID="UserName"
> CssClass="inputbox" MaxLength="15" runat="server" />
>                            </li>
>                            <li>
>                                <asp:Label ID="PasswordLabel"
> CssClass="inputbox" AssociatedControlID="Password"
>                                    Text="Password" runat="server" />
>                                <asp:TextBox ID="Password"
> CssClass="inputbox" TextMode="Password" MaxLength="15"
>                                    runat="server" />
>                            </li>
>                            <li id="form-login-button">
>                                <asp:Button ID="LoginButton"
> CssClass="button" CommandName="Login" Text="Login"
> ValidationGroup="ctl00$Login1"
>                                    runat="server" />
>                            </li>
>                            <li id="form-login-remember">
>                                <label class="f_checkbox">
>                                    <input id="RememberMe"
> type="checkbox" name="remember" checked="checked">
>                                    Remember Me</label>
>                            </li>
>                            <li>
>                                <asp:HyperLink ID="forgotPasswordLink"
> NavigateUrl="#" Text="Forgot Your Password?"
>                                    runat="server" />
>                            </li>
>                            <li style="width: 120px;">
>                                <asp:HyperLink ID="registerLink"
> NavigateUrl="~/Register.aspx" Text="Create An Account"
>                                    runat="server" /></li>
>                        </ul>
>                    </LayoutTemplate>
>                </asp:Login>
>            </div>
>            <div class="bottom">
>            </div>
>        </div>
>        <div id="popup_register">
>            <div id="close_button_register">
>            </div>
>            <div class="top">
>            </div>
>            <div class="bottom">
>            </div>
>        </div>
>        <div id="wrapper_top">
>            <asp:HyperLink ID="logo" NavigateUrl="~/Home.aspx"
> ImageUrl="~/App_Themes/Scoutopia/Images/logo.png"
>                runat="server" />
>            <div id="search">
>                <div class="search">
>                    <asp:ContentPlaceHolder ID="Search"
> runat="server" />
>                </div>
>            </div>
>            <div id="buttons">
>                <asp:LoginView ID="LoginView1" runat="server">
>                    <AnonymousTemplate>
>                        <span id="login_btn"><a href="#"
> onclick="javascript:setTimeout('usernameGetFocus();',500);">Login</a></
> span> <span id="register_btn"><a href="#">
>                            Register</a></span>
>                    </AnonymousTemplate>
>                    <LoggedInTemplate>
>                        <asp:Label ID="lbl_ProfileName" runat="server"
> Text="Label" /><span> <asp:LoginStatus ID="LoginStatus1"
> runat="server" LogoutPageUrl="~/Home.aspx" /></span>
>                    </LoggedInTemplate>
>                </asp:LoginView>
>            </div>
>        </div>
>    </div>
>    </form>
> </body>
> </html>
>
>
> CODE BEHIND PAGE STARTS HERE
>
> using System;
> using System.Collections;
> using System.Configuration;
> using System.Data;
> using System.Linq;
> using System.Web;
> using System.Web.Security;
> using System.Web.UI;
> using System.Web.UI.WebControls;
> using System.Web.UI.WebControls.WebParts;
> using System.Web.UI.HtmlControls;
> using System.Xml.Linq;
>
> public partial class App_Master_ScoutopiaHome :
> System.Web.UI.MasterPage
> {
>    protected void Page_Load(object sender, EventArgs e)
>    {
>        if (Context.User.Identity.IsAuthenticated)
>        {
>            Label profileName = LoginView1.FindControl
> ("lbl_ProfileName") as Label;
>            profileName.Text = "Welcome " + Profile.FirstName + " " +
> Profile.LastName;
>        }
>        else
>        {
>            string scriptString = "";
>            scriptString += "<script type=\"text/javascript\">";
>            scriptString += "function usernameGetFocus() {";
>            scriptString += "$get(\"ctl00_Login1_UserName\").focus
> ();";
>            scriptString += "setTimeout('loginView_Hide();',30000);";
>            scriptString += "}";
>            scriptString += "function loginView_Hide() {";
>            scriptString += "var popup_login = new Fx.Opacity
> ('popup_login', {duration: 250}).set(0);";
>            scriptString += "popup_login.start(0);";
>            scriptString += "}";
>            scriptString += "</script>";
>            Page.ClientScript.RegisterClientScriptBlock(this.GetType
> (), "loginView", scriptString);
>        }
>    }
> }
>
>
> Thanks again for all the assistance.

Reply via email to