p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 4.5 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=710)
-   -   Unable to get blur event working - chap 16 (http://p2p.wrox.com/showthread.php?t=91841)

pitters January 6th, 2014 02:22 AM

Unable to get blur event working - chap 16
 
Hi Imar,

I followed the instructions - so well laid out! :) - from:
http://imar.spaanjaars.com/494/check...th-aspnet-ajax
but I am unable to see anything happening when I move the focus away from the userName field.
I copied your code - even copied and pasted it from your samples - but no joy.

My apologies for the lengthy post . . .

My signup.aspx is

Code:

<%@ Page Title="Sign up for a new account at Planet Wrox" Language="C#" MasterPageFile="~/MasterPages/FrontEnd.master" AutoEventWireup="true" CodeFile="SignUp.aspx.cs" Inherits="SignUp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">

  <asp:CreateUserWizard ID="CreateUserWizard1" runat="Server" MailDefinition-BodyFileName="~/App_Data/SignUpConfirmation.txt" MailDefinition-Subject="Your new account at PlanetWrox.com" ClientIDMode="Static">
<MailDefinition BodyFileName="~/App_Data/SignUpConfirmation.txt" Subject="Your new account at PlanetWrox.com"></MailDefinition>
    <WizardSteps>
      <asp:CreateUserWizardStep runat="server" >
        <ContentTemplate>
          <table>
            <tr>
              <td align="center" colspan="2">Sign Up for Your New Account</td>
            </tr>
            <tr>
              <td align="right">
                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label>
              </td>
              <td>
                <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td align="right">
                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
              </td>
              <td>
                <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td align="right">
                <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">Confirm Password:</asp:Label>
              </td>
              <td>
                <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword" ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td align="right">
                <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label>
              </td>
              <td>
                <asp:TextBox ID="Email" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email" ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td align="right">
                <asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question">Security Question:</asp:Label>
              </td>
              <td>
                <asp:TextBox ID="Question" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="QuestionRequired" runat="server" ControlToValidate="Question" ErrorMessage="Security question is required." ToolTip="Security question is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td align="right">
                <asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer">Security Answer:</asp:Label>
              </td>
              <td>
                <asp:TextBox ID="Answer" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="AnswerRequired" runat="server" ControlToValidate="Answer" ErrorMessage="Security answer is required." ToolTip="Security answer is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td align="center" colspan="2">
                <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match." ValidationGroup="CreateUserWizard1"></asp:CompareValidator>
              </td>
            </tr>
            <tr>
              <td align="center" colspan="2" style="color:Red;">
                <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
              </td>
            </tr>
          </table>
        </ContentTemplate>
      </asp:CreateUserWizardStep>
      <asp:CompleteWizardStep runat="server" />
    </WizardSteps>
  </asp:CreateUserWizard>
<%--  debugger;--%>
      <script type="text/javascript">
        var userNameTextBox = $get('<%= CreateUserWizard1.ClientID %>_CreateUserStepContainer_UserName');
       
        var userNameRequiredMessage = $get('<%= CreateUserWizard1.ClientID %>_CreateUserStepContainer_UserNameRequired');

        var errorMessage = document.createElement('span');
        errorMessage.style.visibility = 'hidden';
        errorMessage.style.color = 'red';
        errorMessage.innerHTML = 'User name already taken';
        userNameRequiredMessage.parentNode.appendChild(errorMessage);

        function UserNameExists()
        {
          var UserName = UserNameTextBox.value;
          PageMethods.UserNameExists(userName, UserNameExistsCallback);
        }

        function UserNameExistsCallback(result)
        {
          errorMessage.style.visibility = result ? 'visible' : 'hidden';
        }

        $addHandler(UserNameTextBox, 'blur', UserNameExists);

    </script>
 <%--</asp:ScriptManager>--%>   
 
</asp:Content>

and my Code Behind is

Code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;
using System.Web.Security;

public partial class SignUp : System.Web.UI.Page
{
  [WebMethod]
  public static bool UserNameExists(string UserName)
  {
    return Membership.GetUser(UserName) != null;
  }
  protected void Page_Load(object sender, EventArgs e)
  {

  }
}

My HTML source is (Chrome)
Code:

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
        Sign up for a new account at Planet Wrox
</title>

  <script src="/Scripts/modernizr-2.6.2.js"></script>
<link href="App_Themes/Monochrome/Monochrome.css" type="text/css" rel="stylesheet" /><style type="text/css">
        /* <![CDATA[ */
        #Menu1 img.icon { border-style:none;vertical-align:middle; }
        #Menu1 img.separator { border-style:none;display:block; }
        #Menu1 img.horizontal-separator { border-style:none;vertical-align:middle; }
        #Menu1 ul { list-style:none;margin:0;padding:0;width:auto; }
        #Menu1 ul.dynamic { z-index:1; }
        #Menu1 a { text-decoration:none;white-space:nowrap;display:block; }
        #Menu1 a.static { padding-left:0.15em;padding-right:0.15em; }
        #Menu1 a.popout-dynamic { background:url("/WebResource.axd?d=YAYach_zykzn7tRotFpEUu4GoLCvLnZX9EMIk-7HZc0BToIWtkGmtEvS1QlKTPzH3iLUGaIOeMLAXy1s11x1DAzwWjM89NEHYAoqAUG8AE41&t=635089743480000000") no-repeat right center;padding-right:14px; }
        /* ]]> */
</style></head>
<body>
    <form method="post" action="SignUp.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="cQdb4i3IOP7L7qRpmd1vIPbkQNmw/zGSNUHc68XAetranMpTNOFdpV5cquJfAoBQmyUb9t4sZXGL6VFL82OkMnJQrs9BU7YxYcfnQeO5lVImbcH2mzLNw43dgAe1VLbXN2gI/CGAIMU21szEZEYui/6x4j//XIUMkLvdBnLMNdOV9MckYgwLzD9ZsnbsQjA6Zk5z6l8GrTbYEQpb+S2V/EFtzAwp3I1jsDofIz62WcCUTq4KQfOunZnFD+kam26xLP0BCRV04Hiou3GLQW2ZyCpc3V/BR1/axTCDHIq6YssV7ylQir2btkSAzpBoMBMUqUH5QtHWrzZ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hiZ+gG2A7B16gCb6UiP1uUx1+tCeESOU6cEddsCSKFJK0DrHrM1ke4aU46Xn6kcySiqEbEcUJrH+4oiIWjKUOwEoJQSXPaz3KAoWAZz/9jiY2tTiF8+FDaGy0Clcudmw==" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>


<script src="/WebResource.axd?d=pynGkmcFUV13He1Qd6_TZFc2JxtZT0zpQOqRp64JeEAbLcBZ8xArgIymS0Poy6_Qf4pbiiFzfFmRySv204CjfQ2&amp;t=635089743480000000" type="text/javascript"></script>


<script src="/ScriptResource.axd?d=zvkqIRNUspAvS1yKeFhMb4GQ6P1kTzCl7U_55KUu0Ljn9akJKvSbYIIqw4edQQe-_pO49FvfwXyqOFd3zJ7SmrDwPXFELcwbe1fZlHX6BPe4RR3ValSnz7vpclfkDZobNHMXnct_KJPSuprHGPFcwg2&amp;t=69ddb300" type="text/javascript"></script>
<script src="/ScriptResource.axd?d=nv7asgRUU0tRmHNR2D6t1PK51r9ZnxBgl-LgkyLnKUHflAXQGuLYmrl6hygvJFFLzRE2ZMnTrQ80p-Pd-7e1Eyciv5KdFkuFOhBVVGkxzQHOwjCNXvoSfg91HCsDKyG3XSgYodZnwsdfkuHIWSI54g2&amp;t=69ddb300" type="text/javascript"></script>
<script src="/ScriptResource.axd?d=D9drwtSJ4hBA6O8UhT6CQlx78wJmh-QzmYQNEEeFYKJ152ipkosivsQ6ow7H2UacmXuCR9VCbdgx8SSs23toGuAYrOiDWKkGEGnO5eQezWqY7vSXIlmRaNBN32-Ua6Jgc_80uveBd61D-Ere8RxRp8VtWZcx91qPluw_FaBWFRI1&amp;t=6119e399" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
//]]>
</script>

<script src="/ScriptResource.axd?d=JnUc-DEDOM5KzzVKtsL1tXrkrMQs5u46pvn35KqY-ri_Wtnc22kb9Xs3weLiGXoGs4x0L2k29zMNjlNsiB5Bzdg3ipqs2XWnueeZqgKDv4SIdFq9cWeu5WUCrACURINcfS6Znp7y-mpJdUEa88KGmY70jANZU0te0u6kxG8pC-cCqVCUBlQjcnf5oOXtXRtI0&amp;t=6119e399" type="text/javascript"></script>
<script src="Scripts/jquery-2.0.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var PageMethods = function() {
PageMethods.initializeBase(this);
this._timeout = 0;
this._userContext = null;
this._succeeded = null;
this._failed = null;
}
PageMethods.prototype = {
_get_path:function() {
 var p = this.get_path();
 if (p) return p;
 else return PageMethods._staticInstance.get_path();},
UserNameExists:function(UserName,succeededCallback, failedCallback, userContext) {
/// <param name="UserName" type="String">System.String</param>
/// <param name="succeededCallback" type="Function" optional="true" mayBeNull="true"></param>
/// <param name="failedCallback" type="Function" optional="true" mayBeNull="true"></param>
/// <param name="userContext" optional="true" mayBeNull="true"></param>
return this._invoke(this._get_path(), 'UserNameExists',false,{UserName:UserName},succeededCallback,failedCallback,userContext); }}
PageMethods.registerClass('PageMethods',Sys.Net.WebServiceProxy);
PageMethods._staticInstance = new PageMethods();
PageMethods.set_path = function(value) {
PageMethods._staticInstance.set_path(value); }
PageMethods.get_path = function() {
/// <value type="String" mayBeNull="true">The service url.</value>
return PageMethods._staticInstance.get_path();}
PageMethods.set_timeout = function(value) {
PageMethods._staticInstance.set_timeout(value); }
PageMethods.get_timeout = function() {
/// <value type="Number">The service timeout.</value>
return PageMethods._staticInstance.get_timeout(); }
PageMethods.set_defaultUserContext = function(value) {
PageMethods._staticInstance.set_defaultUserContext(value); }
PageMethods.get_defaultUserContext = function() {
/// <value mayBeNull="true">The service default user context.</value>
return PageMethods._staticInstance.get_defaultUserContext(); }
PageMethods.set_defaultSucceededCallback = function(value) {
 PageMethods._staticInstance.set_defaultSucceededCallback(value); }
PageMethods.get_defaultSucceededCallback = function() {
/// <value type="Function" mayBeNull="true">The service default succeeded callback.</value>
return PageMethods._staticInstance.get_defaultSucceededCallback(); }
PageMethods.set_defaultFailedCallback = function(value) {
PageMethods._staticInstance.set_defaultFailedCallback(value); }
PageMethods.get_defaultFailedCallback = function() {
/// <value type="Function" mayBeNull="true">The service default failed callback.</value>
return PageMethods._staticInstance.get_defaultFailedCallback(); }
PageMethods.set_enableJsonp = function(value) { PageMethods._staticInstance.set_enableJsonp(value); }
PageMethods.get_enableJsonp = function() {
/// <value type="Boolean">Specifies whether the service supports JSONP for cross domain calling.</value>
return PageMethods._staticInstance.get_enableJsonp(); }
PageMethods.set_jsonpCallbackParameter = function(value) { PageMethods._staticInstance.set_jsonpCallbackParameter(value); }
PageMethods.get_jsonpCallbackParameter = function() {
/// <value type="String">Specifies the parameter name that contains the callback function name for a JSONP request.</value>
return PageMethods._staticInstance.get_jsonpCallbackParameter(); }
PageMethods.set_path("SignUp.aspx");
PageMethods.UserNameExists= function(UserName,onSuccess,onFailed,userContext) {
/// <param name="UserName" type="String">System.String</param>
/// <param name="succeededCallback" type="Function" optional="true" mayBeNull="true"></param>
/// <param name="failedCallback" type="Function" optional="true" mayBeNull="true"></param>
/// <param name="userContext" optional="true" mayBeNull="true"></param>
PageMethods._staticInstance.UserNameExists(UserName,onSuccess,onFailed,userContext); }
function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
return true;
}
//]]>
</script>

<div class="aspNetHidden">

        <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="oEf6eLunfwSBX9pU/4/u9Chf9RMvn89klq6wQ0N3b1oojw2c36qItBfpYoF2jjDakMsCGTl2auynwLybuPNJ0y19ryXObJS5FHb6MavnKse37xj2hpHee2RFWIpH02Aq2hUCKqMIelrzT35Q33brITjTBfdU1CNNwUXt464DjrI7b5quRktZvEbSSWKfhnsA/wHDc4bBIDiGmdBQJWbOn7JDFh4jX7mTc8UJ33qKI0MYELweqeu6CQXTuoCYdoIzp0pC7dfd/6effslrpe0snp4Sqwj836Mf2opr+acoY5vKVA0wOeKyeOMRxZHhBrT4" />
</div>
    <script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ctl00$Scriptmanager1', 'form1', [], [], [], 90, 'ctl00');
//]]>
</script>
 
        <Scripts>
          <asp:ScriptReference Name="jquery" />
          <asp:ScriptReference Name="Juice" />
        </Scripts>
    <div id="PageWrapper">
      <header><a href="/"></a></header>
      <nav>
        <a href="#Menu1_SkipLink" style="position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;">Skip Navigation Links</a><div class="MainMenu" id="Menu1">
        <ul class="level1">
                <li><a title="Go to the homepage" class="level1" href="/Default.aspx">Home</a></li><li><a title="Reviews published on this site" class="level1" href="/Reviews/Default.aspx">Reviews</a><ul class="level2">
                        <li><a title="All Reviews Grouped by Genre" class="level2" href="/Reviews/AllByGenre.aspx">By Genre</a></li><li><a title="All Reviews" class="level2" href="/Reviews/All.aspx">All Reviews</a></li>
                </ul></li><li><a title="All Gig Pics" class="level1" href="/PhotoAlbums/">Gig Pics</a><ul class="level2">
                        <li><a title="All Gig Pics" class="level2" href="/PhotoAlbums/Default.aspx">Gig Pics</a></li><li><a title="Create a New Photo Album with Gig Pics" class="level2" href="/NewPhotoAlbum.aspx">New Album</a></li>
                </ul></li><li><a title="About this Site" class="level1" href="/About/Default.aspx">About</a><ul class="level2">
                        <li><a title="Contact Us" class="level2" href="/About/Contact.aspx">Contact Us</a></li><li><a title="About Us" class="level2" href="/About/AboutUs.aspx">About Us</a></li><li><a title="My Profile" class="level2" href="/MyProfile.aspx">My Profile</a></li>
                </ul></li><li><a title="Log in to this web site" class="level1" href="/Login.aspx">Login</a></li>
        </ul>
</div><a id="Menu1_SkipLink"></a>
       
       
      </nav>
      <section id="MainContent">
        <span id="SiteMapPath1"><a href="#SiteMapPath1_SkipLink" style="position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;">Skip Navigation Links</a><a id="SiteMapPath1_SkipLink"></a></span>
        <br /><br />
             

  <table cellspacing="0" cellpadding="0" id="CreateUserWizard1" style="border-collapse:collapse;">
        <tr style="height:100%;">
                <td><table cellspacing="0" cellpadding="0" style="height:100%;width:100%;border-collapse:collapse;">
                        <tr>
                                <td style="height:100%;width:100%;">
          <table>
            <tr>
              <td align="center" colspan="2">Sign Up for Your New Account</td>
            </tr>
            <tr>
              <td align="right">
                <label for="UserName" id="UserNameLabel">User Name:</label>
              </td>
              <td>
                <input name="ctl00$cpMainContent$CreateUserWizard1$CreateUserStepContainer$UserName" type="text" id="UserName" />
                <span data-val-controltovalidate="UserName" data-val-errormessage="User Name is required." data-val-validationGroup="CreateUserWizard1" id="UserNameRequired" title="User Name is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>
              </td>
            </tr>
            <tr>
              <td align="right">
                <label for="Password" id="PasswordLabel">Password:</label>
              </td>
              <td>
                <input name="ctl00$cpMainContent$CreateUserWizard1$CreateUserStepContainer$Password" type="password" id="Password" />
                <span data-val-controltovalidate="Password" data-val-errormessage="Password is required." data-val-validationGroup="CreateUserWizard1" id="PasswordRequired" title="Password is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>
              </td>
            </tr>
            <tr>
              <td align="right">
                <label for="ConfirmPassword" id="ConfirmPasswordLabel">Confirm Password:</label>
              </td>
              <td>
                <input name="ctl00$cpMainContent$CreateUserWizard1$CreateUserStepContainer$ConfirmPassword" type="password" id="ConfirmPassword" />
                <span data-val-controltovalidate="ConfirmPassword" data-val-errormessage="Confirm Password is required." data-val-validationGroup="CreateUserWizard1" id="ConfirmPasswordRequired" title="Confirm Password is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>
              </td>
            </tr>
            <tr>
              <td align="right">
                <label for="Email" id="EmailLabel">E-mail:</label>
              </td>
              <td>
                <input name="ctl00$cpMainContent$CreateUserWizard1$CreateUserStepContainer$Email" type="text" id="Email" />
                <span data-val-controltovalidate="Email" data-val-errormessage="E-mail is required." data-val-validationGroup="CreateUserWizard1" id="EmailRequired" title="E-mail is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>
              </td>
            </tr>
            <tr>
              <td align="right">
                <label for="Question" id="QuestionLabel">Security Question:</label>
              </td>
              <td>
                <input name="ctl00$cpMainContent$CreateUserWizard1$CreateUserStepContainer$Question" type="text" id="Question" />
                <span data-val-controltovalidate="Question" data-val-errormessage="Security question is required." data-val-validationGroup="CreateUserWizard1" id="QuestionRequired" title="Security question is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>
              </td>
            </tr>
            <tr>
              <td align="right">
                <label for="Answer" id="AnswerLabel">Security Answer:</label>
              </td>
              <td>
                <input name="ctl00$cpMainContent$CreateUserWizard1$CreateUserStepContainer$Answer" type="text" id="Answer" />
                <span data-val-controltovalidate="Answer" data-val-errormessage="Security answer is required." data-val-validationGroup="CreateUserWizard1" id="AnswerRequired" title="Security answer is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>
              </td>
            </tr>
            <tr>
              <td align="center" colspan="2">
                <span data-val-controltovalidate="ConfirmPassword" data-val-errormessage="The Password and Confirmation Password must match." data-val-display="Dynamic" data-val-validationGroup="CreateUserWizard1" id="PasswordCompare" data-val="true" data-val-evaluationfunction="CompareValidatorEvaluateIsValid" data-val-controltocompare="Password" data-val-controlhookup="Password" style="display:none;">The Password and Confirmation Password must match.</span>
              </td>
            </tr>
            <tr>
              <td align="center" colspan="2" style="color:Red;">
               
              </td>
            </tr>
          </table>
        </td>
                        </tr>
                </table></td>
        </tr><tr>
                <td align="right"><table cellspacing="5" cellpadding="5" style="height:100%;width:100%;">
                        <tr align="right">
                                <td align="right"><input type="submit" name="ctl00$cpMainContent$CreateUserWizard1$__CustomNav0$StepNextButtonButton" value="Create User" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$cpMainContent$CreateUserWizard1$__CustomNav0$StepNextButtonButton&quot;, &quot;&quot;, true, &quot;CreateUserWizard1&quot;, &quot;&quot;, false, false))" id="StepNextButtonButton" /></td>
                        </tr>
                </table></td>
        </tr>
</table>

      <script type="text/javascript">
        var userNameTextBox = $get('CreateUserWizard1_CreateUserStepContainer_UserName');
       
        var userNameRequiredMessage = $get('CreateUserWizard1_CreateUserStepContainer_UserNameRequired');

        var errorMessage = document.createElement('span');
        errorMessage.style.visibility = 'hidden';
        errorMessage.style.color = 'red';
        errorMessage.innerHTML = 'User name already taken';
        userNameRequiredMessage.parentNode.appendChild(errorMessage);

        function UserNameExists()
        {
          var UserName = UserNameTextBox.value;
          PageMethods.UserNameExists(userName, UserNameExistsCallback);
        }

        function UserNameExistsCallback(result)
        {
          errorMessage.style.visibility = result ? 'visible' : 'hidden';
        }

        $addHandler(UserNameTextBox, 'blur', UserNameExists);

    </script>
   
 

      </section>
      <aside id="Sidebar">Select a Theme  <br />
        <select name="ctl00$ThemeList" onchange="javascript:setTimeout('__doPostBack(\'ctl00$ThemeList\',\'\')', 0)" id="ThemeList">
        <option selected="selected" value="Monochrome">Monochrome</option>
        <option value="DarkGrey">DarkGrey</option>

</select>
        <br />
        <br />
        <div id="Banner1_VerticalPanel">
       
  <a href="http://p2p.wrox.com" id="Banner1_VerticalLink" target="_blank">
    <img id="Banner1_Image1" src="Images/Banner120x240.gif" alt="This is a sample banner" />
  </a>

</div>




        <br />
      </aside>
      <footer>
       
       
      </footer>
    </div>
     

     

   
<script type='text/javascript'>new Sys.WebForms.Menu({ element: 'Menu1', disappearAfter: 500, orientation: 'horizontal', tabIndex: 0, disabled: false });</script></form>
</body>
</html>

I tried putting a breakpoint at the line
public static bool UserNameExists(string UserName) (in the Code Behind)
but that did nothing
I tried Shift CTRL J and that gave the following message:
Uncaught TypeError: Cannot read property ‘parentNode’ of null SignUp.aspx:263

Line 263 in the source is
userNameRequiredMessage.parentNode.appendChild(err orMessage);

I'm sure it's a minor step I've missed - like last time [:(]

Regards
pitters

Imar January 6th, 2014 10:02 AM

Hi there,

Take a look at this:

ClientIDMode="Static"

You set the ClientIDMode to static which means ASP.NET changes the way IDs are rendered. In the article, I mention the ClientIDMode and then show the code you need to use instead (which is much simpler):
Code:

var userNameTextBox = $get('UserName');
var userNameRequiredMessage = $get('UserNameRequired');

So either get rid of the ClientIDMode, or use this simpler code instead. The article has full details on this.

Cheers,

Imar

pitters January 9th, 2014 12:09 PM

Struggling with blur event
 
Hi Imar,
Did as you suggested and shortened the names - blur still not activating
Then checked casing to make sure all the same - no change.
Then did something that causes my menu to be vertical instead of horizontal
(orientation still = horizontal)
Looked all over - even compared my code to your source on FrontPage.master
and webconfig - but cannot see what could have caused this.
I had given up on the blur event and had started doing the Membership/Roles section . . .
Regardsw
pitters

Imar January 10th, 2014 04:23 PM

If you still want to give it a try, can you post the code for the page as well as the final HTML in the browser?

Imar

pitters January 11th, 2014 02:36 AM

blurring vision!
 
Hi Imar,

Thank you for being prepared to keep me trying! [:o]
Should I ask my question about menu being vertical as a new thread?

Signup.aspx is
Code:

<%@ Page Title="Sign up for a new account at Planet Wrox" Language="C#" MasterPageFile="~/MasterPages/FrontEnd.master" AutoEventWireup="true" CodeFile="SignUp.aspx.cs" Inherits="SignUp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">

  <asp:CreateUserWizard ID="CreateUserWizard1" runat="Server" MailDefinition-BodyFileName="~/App_Data/SignUpConfirmation.txt" MailDefinition-Subject="Your new account at PlanetWrox.com" ClientIDMode="Static">
<MailDefinition BodyFileName="~/App_Data/SignUpConfirmation.txt" Subject="Your new account at PlanetWrox.com"></MailDefinition>
    <WizardSteps>
      <asp:CreateUserWizardStep runat="server" >
        <ContentTemplate>
          <table>
            <tr>
              <td align="center" colspan="2">Sign Up for Your New Account</td>
            </tr>
            <tr>
              <td align="right">
                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label>
              </td>
              <td>
                <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td align="right">
                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
              </td>
              <td>
                <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td align="right">
                <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">Confirm Password:</asp:Label>
              </td>
              <td>
                <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword" ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td align="right">
                <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label>
              </td>
              <td>
                <asp:TextBox ID="Email" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email" ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td align="right">
                <asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question">Security Question:</asp:Label>
              </td>
              <td>
                <asp:TextBox ID="Question" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="QuestionRequired" runat="server" ControlToValidate="Question" ErrorMessage="Security question is required." ToolTip="Security question is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td align="right">
                <asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer">Security Answer:</asp:Label>
              </td>
              <td>
                <asp:TextBox ID="Answer" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="AnswerRequired" runat="server" ControlToValidate="Answer" ErrorMessage="Security answer is required." ToolTip="Security answer is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td align="center" colspan="2">
                <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match." ValidationGroup="CreateUserWizard1"></asp:CompareValidator>
              </td>
            </tr>
            <tr>
              <td align="center" colspan="2" style="color:Red;">
                <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
              </td>
            </tr>
          </table>
        </ContentTemplate>
      </asp:CreateUserWizardStep>
      <asp:CompleteWizardStep runat="server" />
    </WizardSteps>
  </asp:CreateUserWizard>
<%--  debugger;--%>
      <script type="text/javascript">
        var userNameTextBox = $get('UserName');
       
        var userNameRequiredMessage = $get('UserNameRequired');

        var errorMessage = document.createElement('span');
        errorMessage.style.visibility = 'hidden';
        errorMessage.style.color = 'red';
        errorMessage.innerHTML = 'User name already taken';
        userNameRequiredMessage.parentNode.appendChild(errorMessage);

        function UserNameExists()
        {
          var UserName = userNameTextBox.value;
          PageMethods.UserNameExists(UserName, UserNameExistsCallback);
        }

        function UserNameExistsCallback(result)
        {
          errorMessage.style.visibility = result ? 'visible' : 'hidden';
        }

        $addHandler(userNameTextBox, 'blur', UserNameExists);

    </script>
 <%--</asp:ScriptManager>--%>   
 
</asp:Content>


Signup.aspx.cs is
Code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;
using System.Web.Security;

public partial class SignUp : System.Web.UI.Page
{
  [WebMethod]
  public static bool UserNameExists(string UserName)
  {
    return Membership.GetUser(UserName) != null;
  }
  protected void Page_Load(object sender, EventArgs e)
  {

  }
}


HTML is (Chrome)
Code:


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
        Sign up for a new account at Planet Wrox
</title>

  <script src="/Scripts/modernizr-2.6.2.js"></script>
<link href="App_Themes/Monochrome/Monochrome.css" type="text/css" rel="stylesheet" /><style type="text/css">
        /* <![CDATA[ */
        #Menu1 img.icon { border-style:none;vertical-align:middle; }
        #Menu1 img.separator { border-style:none;display:block; }
        #Menu1 img.horizontal-separator { border-style:none;vertical-align:middle; }
        #Menu1 ul { list-style:none;margin:0;padding:0;width:auto; }
        #Menu1 ul.dynamic { z-index:1; }
        #Menu1 a { text-decoration:none;white-space:nowrap;display:block; }
        #Menu1 a.static { padding-left:0.15em;padding-right:0.15em; }
        #Menu1 a.popout-dynamic { background:url("/WebResource.axd?d=YAYach_zykzn7tRotFpEUu4GoLCvLnZX9EMIk-7HZc0BToIWtkGmtEvS1QlKTPzH3iLUGaIOeMLAXy1s11x1DAzwWjM89NEHYAoqAUG8AE41&t=635089743480000000") no-repeat right center;padding-right:14px; }
        /* ]]> */
</style></head>
<body>
    <form method="post" action="SignUp.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="VHr/U1xYwDVSW2rCLtR90Dnmz29oVg/mg0omjJKpIv0ieItaf2pgnsNG4Qu+t6aEKzl6EP0e+iXwMtoYp/GTm+slh8FuJASMTyiRRiVH0NWjZc4ahF2T5sSZCqnv5qgpiHiOcXSJIXKzRDARxQ9z6IrQtqagdWtr1ok25ot/RUlLNqfH6QB3miY6365zxVD5AsWEaIf/eqzxQ3alnDeLVhutPlTIOdLUuEAK81ydH2Qr8BOx83V6/GPYBH0MUW9NtR92nQ6cTcxdun6NvnOWSsLI37mfC9kdtEZih0DF3gmeUFOS6mu3SMlDWRmHfp0/2L8hSY4kcJ2YSnqg3QVl08VyTaoJwXHZ0+M4r42/4wh80GTQnA3HIOtSEe565NXYA492TocMxVWfUZn+wkZgbQ73x2E7FXaq5vbLCq37p3qCI7A1iwAIB0dxWTZ1vCLzT22rr5tIxBuwusJahfCdwU4gt3mtr9fvtgWN+PwV0jvyZpkNu+LDOwQlg4hzE34WD4mAPKhKw3Jo7yVm2uxPFhqhuzcyNsF5Ovn9PPmCQ0aTC5s3576X1EBVyhW+4clHynQem08wMPgoHyyqkQGepLA0UTtOEg7KpjxBO2Flv4/ec+YT3ugiELo5I1EkT5bUyZSKNrpT6qllVzMInOBYptgQPDm/OZbU/S5+eDGeNAYVxqQ5mzGgK92lHM1M7w7w97YddEGPnxm0pCY+8xG1sKCsZfJEHtiGN4srwamH+n/Iah+/Fr3Vefb1JUqIAWUWoSeJd/hkfhar5U9mfRBpl7GcmmNWOqEL10rxXYybCG/NG1G+yM+b6swRa5wxU57sycpU/d8Xtneu7EJePv468ytfsnV5GdoXaT/b45vLNi+qfY2VEYMxrQEwqp6iW0DpS3Al5usQatWcaaPxa1ZEvWs2iQJ9VEImfpzcKjaatIFOQLL27OVt9vlZWbcNPK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WMs+CkUx3YYTZ//pwmOmyovJR0BEv//bOHf5an9Je7+XMAPs3ev/I77Ez94AvdR+VOLKe2nSld2JOL7hOwMyGc+K3S77sU3HUeXzBEti3UqT4kSg86DwQ6ph2wcBD02jVv7zBzvaNNSry3DC0NlTAH4Ikb3tkIyEwi/UjiH/mUyShoVXKnaDSkPUqy648cShTP4vIeB+Y373mMFMlb9puRKM62AwqLBIQRAefaXw1s8fajChhqwjhA+SKZAWtjtMwdxygBQ2br/bUFUrv2zUYVC4E1hXQqMIwIH834AvagRfrI2SzYgAf6s8Z684hPOsb2xwAQZeL4cf7vbZi6UIYtLVmucbmDbjXPeGtzizPZ4cHa9M2NfZtAwz+nxDMorbrVmVHwQUa2i30h5mroCe5bY7ND+NXkd/7ByLavvCwclo+OoDFVi9micKa/z3x2cj9nuLTaHNOAUyBgWGM70AphueXcHtSP8mvG/CVJaZhxUFqbEtJv70AGffYsGhEzME4uQTIKuWM0Ui60CjuaoWQ6uPcBYVrqeHAGjLwTpLYZ4IhOzWpiq599ISe9rci+MbVkZ8r4UvePPQ==" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>


<script src="/WebResource.axd?d=pynGkmcFUV13He1Qd6_TZFc2JxtZT0zpQOqRp64JeEAbLcBZ8xArgIymS0Poy6_Qf4pbiiFzfFmRySv204CjfQ2&amp;t=635089743480000000" type="text/javascript"></script>


<script src="/ScriptResource.axd?d=zvkqIRNUspAvS1yKeFhMb4GQ6P1kTzCl7U_55KUu0Ljn9akJKvSbYIIqw4edQQe-_pO49FvfwXyqOFd3zJ7SmrDwPXFELcwbe1fZlHX6BPe4RR3ValSnz7vpclfkDZobNHMXnct_KJPSuprHGPFcwg2&amp;t=69ddb300" type="text/javascript"></script>
<script src="/ScriptResource.axd?d=nv7asgRUU0tRmHNR2D6t1PK51r9ZnxBgl-LgkyLnKUHflAXQGuLYmrl6hygvJFFLzRE2ZMnTrQ80p-Pd-7e1Eyciv5KdFkuFOhBVVGkxzQHOwjCNXvoSfg91HCsDKyG3XSgYodZnwsdfkuHIWSI54g2&amp;t=69ddb300" type="text/javascript"></script>
<script src="/ScriptResource.axd?d=D9drwtSJ4hBA6O8UhT6CQlx78wJmh-QzmYQNEEeFYKJ152ipkosivsQ6ow7H2UacmXuCR9VCbdgx8SSs23toGuAYrOiDWKkGEGnO5eQezWqY7vSXIlmRaNBN32-Ua6Jgc_80uveBd61D-Ere8RxRp8VtWZcx91qPluw_FaBWFRI1&amp;t=6119e399" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
//]]>
</script>

<script src="/ScriptResource.axd?d=JnUc-DEDOM5KzzVKtsL1tXrkrMQs5u46pvn35KqY-ri_Wtnc22kb9Xs3weLiGXoGs4x0L2k29zMNjlNsiB5Bzdg3ipqs2XWnueeZqgKDv4SIdFq9cWeu5WUCrACURINcfS6Znp7y-mpJdUEa88KGmY70jANZU0te0u6kxG8pC-cCqVCUBlQjcnf5oOXtXRtI0&amp;t=6119e399" type="text/javascript"></script>
<script src="Scripts/jquery-2.0.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var PageMethods = function() {
PageMethods.initializeBase(this);
this._timeout = 0;
this._userContext = null;
this._succeeded = null;
this._failed = null;
}
PageMethods.prototype = {
_get_path:function() {
 var p = this.get_path();
 if (p) return p;
 else return PageMethods._staticInstance.get_path();},
UserNameExists:function(UserName,succeededCallback, failedCallback, userContext) {
/// <param name="UserName" type="String">System.String</param>
/// <param name="succeededCallback" type="Function" optional="true" mayBeNull="true"></param>
/// <param name="failedCallback" type="Function" optional="true" mayBeNull="true"></param>
/// <param name="userContext" optional="true" mayBeNull="true"></param>
return this._invoke(this._get_path(), 'UserNameExists',false,{UserName:UserName},succeededCallback,failedCallback,userContext); }}
PageMethods.registerClass('PageMethods',Sys.Net.WebServiceProxy);
PageMethods._staticInstance = new PageMethods();
PageMethods.set_path = function(value) {
PageMethods._staticInstance.set_path(value); }
PageMethods.get_path = function() {
/// <value type="String" mayBeNull="true">The service url.</value>
return PageMethods._staticInstance.get_path();}
PageMethods.set_timeout = function(value) {
PageMethods._staticInstance.set_timeout(value); }
PageMethods.get_timeout = function() {
/// <value type="Number">The service timeout.</value>
return PageMethods._staticInstance.get_timeout(); }
PageMethods.set_defaultUserContext = function(value) {
PageMethods._staticInstance.set_defaultUserContext(value); }
PageMethods.get_defaultUserContext = function() {
/// <value mayBeNull="true">The service default user context.</value>
return PageMethods._staticInstance.get_defaultUserContext(); }
PageMethods.set_defaultSucceededCallback = function(value) {
 PageMethods._staticInstance.set_defaultSucceededCallback(value); }
PageMethods.get_defaultSucceededCallback = function() {
/// <value type="Function" mayBeNull="true">The service default succeeded callback.</value>
return PageMethods._staticInstance.get_defaultSucceededCallback(); }
PageMethods.set_defaultFailedCallback = function(value) {
PageMethods._staticInstance.set_defaultFailedCallback(value); }
PageMethods.get_defaultFailedCallback = function() {
/// <value type="Function" mayBeNull="true">The service default failed callback.</value>
return PageMethods._staticInstance.get_defaultFailedCallback(); }
PageMethods.set_enableJsonp = function(value) { PageMethods._staticInstance.set_enableJsonp(value); }
PageMethods.get_enableJsonp = function() {
/// <value type="Boolean">Specifies whether the service supports JSONP for cross domain calling.</value>
return PageMethods._staticInstance.get_enableJsonp(); }
PageMethods.set_jsonpCallbackParameter = function(value) { PageMethods._staticInstance.set_jsonpCallbackParameter(value); }
PageMethods.get_jsonpCallbackParameter = function() {
/// <value type="String">Specifies the parameter name that contains the callback function name for a JSONP request.</value>
return PageMethods._staticInstance.get_jsonpCallbackParameter(); }
PageMethods.set_path("SignUp.aspx");
PageMethods.UserNameExists= function(UserName,onSuccess,onFailed,userContext) {
/// <param name="UserName" type="String">System.String</param>
/// <param name="succeededCallback" type="Function" optional="true" mayBeNull="true"></param>
/// <param name="failedCallback" type="Function" optional="true" mayBeNull="true"></param>
/// <param name="userContext" optional="true" mayBeNull="true"></param>
PageMethods._staticInstance.UserNameExists(UserName,onSuccess,onFailed,userContext); }
function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
return true;
}
//]]>
</script>

<div class="aspNetHidden">

        <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="Agwnp7vxmmNEcGSQuNTZ4MYECeWNYk+zCBjCHLOeQizjT6l4PC+c0CqRJivdF0MKi/0GoaIMrpzR8ElLFQg3W0f7KIGDeNncPLcrwuygZmGMPzIJRhVqcr49/80qqqJ8abyrFz7CIFLvSZWlivY4dxmGr4CMcKgU06kYNLaU+yDoR1uSGTgs89XUoteAMKpWrsOEJ1v3yOAt7x0tSYRGW2EI0+gBYcpNDEMFxr6G4hWiVqvt6tE/DtGol8XJeWWfMlQOvy9U+4RdTgyJkqPrGz/UJS/qhH0M51VAFNHBqAUEiV7uMckpu0Iq8myoZXjC" />
</div>
          <script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ctl00$Scriptmanager1', 'form1', [], [], [], 90, 'ctl00');
//]]>
</script>
 
        <Scripts>
          <asp:ScriptReference Name="jquery" />
          <asp:ScriptReference Name="Juice" />
        </Scripts>
    <div id="PageWrapper">

      <header><a href="/"></a></header>
      <nav>
        <a href="#Menu1_SkipLink" style="position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;">Skip Navigation Links</a><div class="MainMenu" id="Menu1">
        <ul class="level1">
                <li><a title="Go to the homepage" class="level1" href="/Default.aspx">Home</a></li><li><a title="Reviews published on this site" class="level1" href="/Reviews/Default.aspx">Reviews</a><ul class="level2">
                        <li><a title="All Reviews Grouped by Genre" class="level2" href="/Reviews/AllByGenre.aspx">By Genre</a></li><li><a title="All Reviews" class="level2" href="/Reviews/All.aspx">All Reviews</a></li>
                </ul></li><li><a title="All Gig Pics" class="level1" href="/PhotoAlbums/">Gig Pics</a><ul class="level2">
                        <li><a title="All Gig Pics" class="level2" href="/PhotoAlbums/Default.aspx">Gig Pics</a></li><li><a title="Create a New Photo Album with Gig Pics" class="level2" href="/NewPhotoAlbum.aspx">New Album</a></li>
                </ul></li><li><a title="About this Site" class="level1" href="/About/Default.aspx">About</a><ul class="level2">
                        <li><a title="Contact Us" class="level2" href="/About/Contact.aspx">Contact Us</a></li><li><a title="About Us" class="level2" href="/About/AboutUs.aspx">About Us</a></li><li><a title="My Profile" class="level2" href="/MyProfile.aspx">My Profile</a></li>
                </ul></li><li><a title="Log in to this web site" class="level1" href="/Login.aspx">Login</a></li>
        </ul>
</div><a id="Menu1_SkipLink"></a>
       
       
      </nav>
      <section id="MainContent">
        <span id="SiteMapPath1"><a href="#SiteMapPath1_SkipLink" style="position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;">Skip Navigation Links</a><a id="SiteMapPath1_SkipLink"></a></span>
        <br /><br />
             

  <table cellspacing="0" cellpadding="0" id="CreateUserWizard1" style="border-collapse:collapse;">
        <tr style="height:100%;">
                <td><table cellspacing="0" cellpadding="0" style="height:100%;width:100%;border-collapse:collapse;">
                        <tr>
                                <td style="height:100%;width:100%;">
          <table>
            <tr>
              <td align="center" colspan="2">Sign Up for Your New Account</td>
            </tr>
            <tr>
              <td align="right">
                <label for="UserName" id="UserNameLabel">User Name:</label>
              </td>
              <td>
                <input name="ctl00$cpMainContent$CreateUserWizard1$CreateUserStepContainer$UserName" type="text" id="UserName" />
                <span data-val-controltovalidate="UserName" data-val-errormessage="User Name is required." data-val-validationGroup="CreateUserWizard1" id="UserNameRequired" title="User Name is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>
              </td>
            </tr>
            <tr>
              <td align="right">
                <label for="Password" id="PasswordLabel">Password:</label>
              </td>
              <td>
                <input name="ctl00$cpMainContent$CreateUserWizard1$CreateUserStepContainer$Password" type="password" id="Password" />
                <span data-val-controltovalidate="Password" data-val-errormessage="Password is required." data-val-validationGroup="CreateUserWizard1" id="PasswordRequired" title="Password is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>
              </td>
            </tr>
            <tr>
              <td align="right">
                <label for="ConfirmPassword" id="ConfirmPasswordLabel">Confirm Password:</label>
              </td>
              <td>
                <input name="ctl00$cpMainContent$CreateUserWizard1$CreateUserStepContainer$ConfirmPassword" type="password" id="ConfirmPassword" />
                <span data-val-controltovalidate="ConfirmPassword" data-val-errormessage="Confirm Password is required." data-val-validationGroup="CreateUserWizard1" id="ConfirmPasswordRequired" title="Confirm Password is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>
              </td>
            </tr>
            <tr>
              <td align="right">
                <label for="Email" id="EmailLabel">E-mail:</label>
              </td>
              <td>
                <input name="ctl00$cpMainContent$CreateUserWizard1$CreateUserStepContainer$Email" type="text" id="Email" />
                <span data-val-controltovalidate="Email" data-val-errormessage="E-mail is required." data-val-validationGroup="CreateUserWizard1" id="EmailRequired" title="E-mail is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>
              </td>
            </tr>
            <tr>
              <td align="right">
                <label for="Question" id="QuestionLabel">Security Question:</label>
              </td>
              <td>
                <input name="ctl00$cpMainContent$CreateUserWizard1$CreateUserStepContainer$Question" type="text" id="Question" />
                <span data-val-controltovalidate="Question" data-val-errormessage="Security question is required." data-val-validationGroup="CreateUserWizard1" id="QuestionRequired" title="Security question is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>
              </td>
            </tr>
            <tr>
              <td align="right">
                <label for="Answer" id="AnswerLabel">Security Answer:</label>
              </td>
              <td>
                <input name="ctl00$cpMainContent$CreateUserWizard1$CreateUserStepContainer$Answer" type="text" id="Answer" />
                <span data-val-controltovalidate="Answer" data-val-errormessage="Security answer is required." data-val-validationGroup="CreateUserWizard1" id="AnswerRequired" title="Security answer is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>
              </td>
            </tr>
            <tr>
              <td align="center" colspan="2">
                <span data-val-controltovalidate="ConfirmPassword" data-val-errormessage="The Password and Confirmation Password must match." data-val-display="Dynamic" data-val-validationGroup="CreateUserWizard1" id="PasswordCompare" data-val="true" data-val-evaluationfunction="CompareValidatorEvaluateIsValid" data-val-controltocompare="Password" data-val-controlhookup="Password" style="display:none;">The Password and Confirmation Password must match.</span>
              </td>
            </tr>
            <tr>
              <td align="center" colspan="2" style="color:Red;">
               
              </td>
            </tr>
          </table>
        </td>
                        </tr>
                </table></td>
        </tr><tr>
                <td align="right"><table cellspacing="5" cellpadding="5" style="height:100%;width:100%;">
                        <tr align="right">
                                <td align="right"><input type="submit" name="ctl00$cpMainContent$CreateUserWizard1$__CustomNav0$StepNextButtonButton" value="Create User" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$cpMainContent$CreateUserWizard1$__CustomNav0$StepNextButtonButton&quot;, &quot;&quot;, true, &quot;CreateUserWizard1&quot;, &quot;&quot;, false, false))" id="StepNextButtonButton" /></td>
                        </tr>
                </table></td>
        </tr>
</table>

      <script type="text/javascript">
        var userNameTextBox = $get('UserName');
       
        var userNameRequiredMessage = $get('UserNameRequired');

        var errorMessage = document.createElement('span');
        errorMessage.style.visibility = 'hidden';
        errorMessage.style.color = 'red';
        errorMessage.innerHTML = 'User name already taken';
        userNameRequiredMessage.parentNode.appendChild(errorMessage);

        function UserNameExists()
        {
          var UserName = userNameTextBox.value;
          PageMethods.UserNameExists(UserName, UserNameExistsCallback);
        }

        function UserNameExistsCallback(result)
        {
          errorMessage.style.visibility = result ? 'visible' : 'hidden';
        }

        $addHandler(userNameTextBox, 'blur', UserNameExists);

    </script>
   
 

      </section>
      <aside id="Sidebar">Select a Theme  <br />
        <select name="ctl00$ThemeList" onchange="javascript:setTimeout('__doPostBack(\'ctl00$ThemeList\',\'\')', 0)" id="ThemeList">
        <option selected="selected" value="Monochrome">Monochrome</option>
        <option value="DarkGrey">DarkGrey</option>

</select>
        <br />
        <br />
        <div id="Banner1_VerticalPanel">
       
  <a href="http://p2p.wrox.com" id="Banner1_VerticalLink" target="_blank">
    <img id="Banner1_Image1" src="Images/Banner120x240.gif" alt="This is a sample banner" />
  </a>

</div>




        <br />
      </aside>
      <footer>
       
       
      </footer>
    </div>
     

     

   
<script type='text/javascript'>new Sys.WebForms.Menu({ element: 'Menu1', disappearAfter: 500, orientation: 'horizontal', tabIndex: 0, disabled: false });</script></form>
</body>
</html>

Thanks so much
pitters [;)]

pitters January 11th, 2014 03:10 AM

Such fun!
 
[:D]

I just wanted to say a big "Thank you", Imar.
You have made it such fun to work through the exercises!

Really appreciate it [:)]
pitters

Imar January 11th, 2014 08:14 AM

Hi pitters,

I copied and pasted your code into SignUp from the PlanetWrox web site, and it just worked on the first try, in Firefox and in Chrome. So the code itself is fine.

I did notice this though:
Code:

<Scripts>
  <asp:ScriptReference Name="jquery" />
  <asp:ScriptReference Name="Juice" />
</Scripts>

This should be part of the ScriptManager in the Master Page, but never make it to the browser. Did you place it incorrectly in the Frontend Master Page?

Other than that, I don't see anything wrong, and it works for me. You could use a tool like Fiddler and see if any of your script libraries return an error or 404. I assume you also enabled Page Methods on the Script Manager?

Finally, are you by any chance using the FriendlyUrls package from Microsoft? That doesn't work with Page Methods.

Regarding the menu: check if you still have Orientation="Horizontal" in the Menu in the Master Page.

Cheers,

Imar

pitters January 11th, 2014 10:12 AM

Hi Imar,

Here's the first part of FrontEnd - you can see from the last line the orientation is Horizontal - I noticed it also in the last line of the HTML posted above

Should the script section be inside scriptmanager?
You are seeing the error message as soon as you tab away from putting in an existing username?

Don't know FriendlyUrls - don't think I'm using them. [:confused:]

You have blown my mind with Fiddler - just when I thought I was beginning to get a handle on this!! [:p]
Watched the first 3 videos - tried bps 404 and, if I read it correctly, looks like I have a problem with jscript?

Code:

#        Result        Protocol        Host        URL        Body        Caching        Content-Type        Process        Comments        Custom       
5        -        HTTP        localhost:52546        /ScriptResource.axd?d=JnUc-DEDOM5KzzVKtsL1tXrkrMQs5u46pvn35KqY-ri_Wtnc22kb9Xs3weLiGXoGs4x0L2k29zMNjlNsiB5Bzdg3ipqs2XWnueeZqgKDv4SIdFq9cWeu5WUCrACURINcfS6Znp7y-mpJdUEa88KGmY70jANZU0te0u6kxG8pC-cCqVCUBlQjcnf5oOXtXRtI0&t=6119e399        -1                        chrome:8128                       
6        -        HTTP        localhost:52546        /ScriptResource.axd?d=zvkqIRNUspAvS1yKeFhMb4GQ6P1kTzCl7U_55KUu0Ljn9akJKvSbYIIqw4edQQe-_pO49FvfwXyqOFd3zJ7SmrDwPXFELcwbe1fZlHX6BPe4RR3ValSnz7vpclfkDZobNHMXnct_KJPSuprHGPFcwg2&t=69ddb300        -1                        chrome:8128                       
7        -        HTTP        localhost:52546        /ScriptResource.axd?d=nv7asgRUU0tRmHNR2D6t1PK51r9ZnxBgl-LgkyLnKUHflAXQGuLYmrl6hygvJFFLzRE2ZMnTrQ80p-Pd-7e1Eyciv5KdFkuFOhBVVGkxzQHOwjCNXvoSfg91HCsDKyG3XSgYodZnwsdfkuHIWSI54g2&t=69ddb300        -1                        chrome:8128                       
8        -        HTTP        localhost:52546        /ScriptResource.axd?d=D9drwtSJ4hBA6O8UhT6CQlx78wJmh-QzmYQNEEeFYKJ152ipkosivsQ6ow7H2UacmXuCR9VCbdgx8SSs23toGuAYrOiDWKkGEGnO5eQezWqY7vSXIlmRaNBN32-Ua6Jgc_80uveBd61D-Ere8RxRp8VtWZcx91qPluw_FaBWFRI1&t=6119e399        -1                        chrome:8128

I hope I'm not just muddying the waters!

Regards
Tony


Code:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="FrontEnd.master.cs" Inherits="MasterPages_FrontEnd" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
  <script src="/Scripts/modernizr-2.6.2.js"></script>
</head>
<body>
    <form id="form1" runat="server">
          <asp:ScriptManager ID="Scriptmanager1" runat="server" EnablePageMethods="true" /> 
        <Scripts>
          <asp:ScriptReference Name="jquery" />
          <asp:ScriptReference Name="Juice" />
        </Scripts>
    <div id="PageWrapper">

      <header><a href="/"></a></header>
      <nav>
        <asp:Menu ID="Menu1" runat="server" CssClass="MainMenu" Orientation="Horizontal" DataSourceID="SiteMapDataSource1" StaticEnableDefaultPopOutImage="False"></asp:Menu>


Imar January 11th, 2014 04:05 PM

Quote:

you can see from the last line the orientation is Horizontal - I noticed it also in the last line of the HTML posted above
Indeed, In that case, I don't know what's going on.

Quote:

Watched the first 3 videos - tried bps 404 and, if I read it correctly, looks like I have a problem with jscript?
Not sure what you mean or what you posted. In Fiddler you can see the HTTP status code (for an example, look here: http://tournasdimitrios1.files.wordp...h-fiddler2.jpg) Codes like 200 are OK, 404 means "missing". In your "code", it seems the status code is completely missing?

Finally, take a look at this:

Code:

<asp:ScriptManager ID="Scriptmanager1" runat="server" EnablePageMethods="true" /> 
        <Scripts>

You have a self-closing ScriptManager and thus the scripts are never included. This may cause another error on your page, in turn causing issues with blur.

Cheers,

Imar


All times are GMT -4. The time now is 01:54 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.