Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7615811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:44:08+00:00 2026-05-31T02:44:08+00:00

Weird, what went wrong? Thanks Sources <link href=@Url.Content(~/Content/themes/base/jquery-ui.css) rel=stylesheet type=text/css /> <script src=@Url.Content(~/Scripts/jquery-1.4.4.min.js) type=text/javascript></script>

  • 0

Weird, what went wrong? Thanks

Sources

<link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.js")" type="text/javascript"></script>

Did i miss any or because they are not the latest?

The Script

$(document).ready(function(){ 
    $(".Search").keydown(function(event) {
        if (event.keyCode == 32) {
            event.preventDefault();
        }
    });
});​

The View

 <?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-16" />
    <title>@ViewBag.Title</title>
    <link rel="stylesheet" media="screen,projection" type="text/css" href="@Url.Content("~/Content/newKaizen/css/reset.css")" />
    <!-- RESET -->
    <link rel="stylesheet" media="screen,projection" type="text/css" href="@Url.Content("~/Content/newKaizen/css/main.css")" />
    <!-- MAIN STYLE SHEET -->
    <link rel="stylesheet" media="screen,projection" type="text/css" href="@Url.Content("~/Content/newKaizen/css/2col.css")" title="2col" />
    <!-- DEFAULT: 2 COLUMNS -->
    <link rel="alternate stylesheet" media="screen,projection" type="text/css" href="@Url.Content("~/Content/newKaizen/css/1col.css")" title="1col" />
    <!-- ALTERNATE: 1 COLUMN -->
    <link rel="stylesheet" media="screen,projection" type="text/css" href="@Url.Content("~/Content/newKaizen/css/style.css")" />
    <!-- GRAPHIC THEME -->
    <link rel="stylesheet" media="screen,projection" type="text/css" href="@Url.Content("~/Content/newKaizen/css/mystyle.css")" />
    <!-- WRITE YOUR CSS CODE HERE -->
    <!--[if lte IE 6]><link rel="stylesheet" media="screen,projection" type="text/css" href="@Url.Content("~/Content/newKaizen/css/main-ie6.css")" /><![endif]-->
    <!-- MSIE6 -->
    <link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/EditorHookup.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.ui.datepicker.validation.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.js")" type="text/javascript"></script>
    <!--<script src="@Url.Content("~/Scripts/RangeDateValidator.js")" type="text/javascript"></script>-->
    <script type="text/javascript">
        $(document).ready(function () {     
            $(".appt_date").datepicker({
                gotoCurrent: true,
                dateFormat: 'dd/mm/yy',
                minDate: 0,
                numberOfMonths: 2
            });
        });


    $(function() {
        var dates = $("#StartDate, #EndDate").datepicker({
            defaultDate: "+1w",
            changeMonth: true,
            numberOfMonths: 2,
            minDate:0,
            onSelect: function( selectedDate ) {
                var option = this.id == "StartDate" ? "minDate" : "maxDate",
                    instance = $( this ).data( "datepicker" ),
                    date = $.datepicker.parseDate(
                        instance.settings.dateFormat ||
                        $.datepicker._defaults.dateFormat,
                        selectedDate, instance.settings );
                dates.not( this ).datepicker( "option", option, date );
            }
        });
});

$(document).ready(function(){ 
    $(".Search").keydown(function(event) {
        if (event.keyCode == 32) {
            event.preventDefault();
        }
    });
});​

    </script>
</head>
<body>
    <div id="main">
        <!-- Tray -->
        <div id="tray" class="box">
            <p class="f-left box">
            </p>
            <p class="f-right">
                User: <strong><a href="#">@Context.User.Identity.Name</a></strong> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <strong><a href="@Url.Action("LogOff", "Account")" id="logout">Log out</a></strong></p>
        </div>
        <!--  /tray -->
        <hr class="noscreen" />
        <!-- Menu -->
        <div id="menu" class="box">
            <ul class="box">
                <h3 style="color: #fff; font-size: 1.5em;">
                    Memory Clinic Management System</h3>
            </ul>
        </div>
        <!-- /header -->
        <hr class="noscreen" />
        <!-- Columns -->
        <div id="cols" class="box">
            <!-- Aside (Left Column) -->
            <div id="aside" class="box">
                <div class="padding box">
                    <!-- Logo (Max. width = 200px) -->
                    <p id="logo">
                        <a href="@Url.Action("Index", "Patient")">
                            <img src="@Url.Content("~/Content/newKaizen/design/logo.jpg")" alt="KTPH logo" title="Visit Site" /></a></p>
                    @if (@Context.User.Identity.Name == "admin")
                    {
                        <!-- Search -->
                        <form action="#" method="get" id="search">
                        <fieldset>
                            <legend>Search</legend>
                            <p>@Html.TextBox("SearchString", "", new { @class = "Search" })</p>
                            <br />
                            <input type="submit" value="Search" class="input-submit-02" /><br />
                        </fieldset>
                        </form>

                        <!-- Create a new patient -->
                        <p id="btn-create" class="box">
                            <a href="@Url.Action("Create", "Patient")"><span>Add new Patient</span></a></p>
                    }
                </div>
                <!-- /padding -->
                <ul class="box">
                    @if (IsSectionDefined("PatientsManagement"))
                    {
                        @RenderSection("PatientsManagement")
                        <li id="submenu-active"><a href="@Url.Action("Index", "Patient")">Patients Management</a>
                            <ul>
                                <li>@Html.ActionLink("View All Patients", "Index", "Patient")</li>
                                <li>@Html.ActionLink("Appointments", "Index", "Appointment")</li>
                            </ul>
                        </li>
                    }
                    else
                    {
                        <li id="submenu-nonactive"><a href="@Url.Action("Index", "Patient")">Patients Management</a>
                            <ul>
                                <li>@Html.ActionLink("View All Patients", "Index", "Patient")</li>
                                <li>@Html.ActionLink("Appointments", "Index", "Appointment")</li>
                            </ul>
                        </li>
                    }
                    @if (IsSectionDefined("FormsManagement"))
                    {
                        @RenderSection("FormsManagement")
                        <li id="submenu-active"><a href="@Url.Action("CGSIndex", "Test")">Forms Management</a>
                            <ul>
                                <li>@Html.ActionLink("Caregiver Survey", "CGSIndex", "Test")</li>
                                <li>@Html.ActionLink("Patient Assessment", "PAIndex", "Test")</li>
                                <li>@Html.ActionLink("Generate Forms", "Generate", "Survey")</li>
                            </ul>
                        </li>
                    }
                    else
                    {
                        <li id="submenu-nonactive"><a href="@Url.Action("CGSIndex", "Test")">Forms Management</a>
                            <ul>
                                <li>@Html.ActionLink("Caregiver Survey", "CGSIndex", "Test")</li>
                                <li>@Html.ActionLink("Patient Assessment", "PAIndex", "Test")</li>
                                <li>@Html.ActionLink("Generate Forms", "Generate", "Survey")</li>
                            </ul>
                        </li>
                    }
                    @if (IsSectionDefined("ReportsAnalytics"))
                    {
                        @RenderSection("ReportsAnalytics")
                        <li id="submenu-active"><a href="#">Reports & Analytics</a>
                            <ul>
                                <li><a href="#">Consultation Respository</a></li>
                                <li><a href="#">Generate Reports</a></li>
                            </ul>
                        </li>
                    }
                    else
                    {
                        <li id="submenu-nonactive"><a href="#">Reports & Analytics</a>
                            <ul>
                                <li><a href="#">Consultation Respository</a></li>
                                <li><a href="#">Generate Reports</a></li>
                            </ul>
                        </li>
                    }
                </ul>
            </div>
            <!-- /aside -->
            <hr class="noscreen" />
            <!-- Content (Right Column) -->
            <div id="content" class="box">
                @RenderBody()
            </div>
            <!-- /content -->
        </div>
        <!-- /cols -->
        <hr class="noscreen" />
        <!-- Footer -->
        <div id="footer" class="box">
            <p class="f-left">
                </p>
        </div>
        <!-- /footer -->
    </div>
    <!-- /main -->
</body>
</html>

The Markup

<input class="Search" id="SearchString" name="SearchString" type="text" value="         " />

Resource
Jquery Disable Spacebar

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:44:10+00:00Added an answer on May 31, 2026 at 2:44 am

    There is a problem with Ready function (below code has some problem)

    <script type="text/javascript">
            $(document).ready(function () {     
                $(".appt_date").datepicker({
                    gotoCurrent: true,
                    dateFormat: 'dd/mm/yy',
                    minDate: 0,
                    numberOfMonths: 2
                });
            });
    
    
        $(function() {
            var dates = $("#StartDate, #EndDate").datepicker({
                defaultDate: "+1w",
                changeMonth: true,
                numberOfMonths: 2,
                minDate:0,
                onSelect: function( selectedDate ) {
                    var option = this.id == "StartDate" ? "minDate" : "maxDate",
                        instance = $( this ).data( "datepicker" ),
                        date = $.datepicker.parseDate(
                            instance.settings.dateFormat ||
                            $.datepicker._defaults.dateFormat,
                            selectedDate, instance.settings );
                    dates.not( this ).datepicker( "option", option, date );
                }
            });
    });
    
    $(document).ready(function(){ 
        $(".Search").keydown(function(event) {
            if (event.keyCode == 32) {
                event.preventDefault();
            }
        });
    });​
    
        </script>
    

    Please all the javascript in one ready function only. Please rewrite your code with the below code.

    $(function() {
            var dates = $("#StartDate, #EndDate").datepicker({
                defaultDate: "+1w",
                changeMonth: true,
                numberOfMonths: 2,
                minDate:0,
                onSelect: function( selectedDate ) {
                    var option = this.id == "StartDate" ? "minDate" : "maxDate",
                        instance = $( this ).data( "datepicker" ),
                        date = $.datepicker.parseDate(
                            instance.settings.dateFormat ||
                            $.datepicker._defaults.dateFormat,
                            selectedDate, instance.settings );
                    dates.not( this ).datepicker( "option", option, date );
                }
            });
    
     $(".Search").keydown(function(event) {
            if (event.keyCode == 32) {
                event.preventDefault();
            }
        });
    
     $(".appt_date").datepicker({
                    gotoCurrent: true,
                    dateFormat: 'dd/mm/yy',
                    minDate: 0,
                    numberOfMonths: 2
                });
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Weird problem. I update the site CSS sheet and the changes show straight away
Super weird problem here. I'm having trouble getting jQuery to bind any selectors except
when I made my game, all went fine, but suddenly I had a weird
I am finding weird symbols appearing as a result of an import which went
Weird to describe but here goes. I have a table with several rows. One
Weird question, but one that puzzles me a bit. In the old days when
Weird question, but i need to find an answer. Is there any way, in
Weird problem: After rotating my app to portrait, picking the toolbar item and exposing
weird que i know, but could something like the following be achived somehow? int
Weird question this, going round in circles. I have 2 pages. Page 1. Has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.