473,394 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

MVC, nested masterpage and Javascript

Hi.

Is there a problem when trying to use Javascript on a nested masterpage?

On my masterpage, i've got this in the <head>:
<asp:ContentPlaceHolder ID="HeadContent" runat="server" />

And on the nested masterpage:
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<asp:ContentPlaceHolder ID="NestedHeadContent" runat="server" />
</asp:Content>

And on my content page page:
<asp:Content ID="Content1" ContentPlaceHolderID="NestedHeadContent"
runat="server">
... .js includes goes here ...
<script type="text/javascript">
$(function()
{
$('.startDate-pick').datePicker({startDate:'01/01/1996'});
});
</script">
</asp:Content>

And in the body of the nested page, i've got this input field with the class
used above:
<input id="startDate" name="startDate" type="text" size="7"
class="startDate-pick" />
This works on content pages within the masterpage, but not on content pages
within the nested masterpage. Why is that, and what can I do about it?

Thanks in advance.

Tommy
Sep 13 '08 #1
0 1663

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: iturner100 | last post by:
Hi, I've been struggling with this one for a couple of hours without much joy. Basically, I've got a set of nested masterpages (3 as it happens). I'm dynamically generating a new page in code...
0
by: VB Programmer | last post by:
I used Photoshop/Image Ready to create rollover buttons (for a nav menu). They work great. But, when I take the html, including the javascript and put it in a MasterPage, when I view the page...
2
by: delvsb | last post by:
Hi. I would like to ask whether it is normal that you cannot view the child master page in the design view when using nested masterpages. ex. i have the ff files maintemplate.master ...
1
by: rockdale | last post by:
Hi, I have a page which use a masterpage. And I put a javascript in this page like below: <%@ Page Language="C#" MasterPageFile="~/SITE.master" CodeFile="TEST.aspx.cs" Inherits="TEST_aspx"...
8
by: =?Utf-8?B?QW1yaXQgS29obGk=?= | last post by:
Okay, after much research, I have discovered a few interesting things in ASP.NET. I have a MasterPage that has a WebForm on it and it looks like this: <body> <form id="controls"...
4
by: daveh551 | last post by:
I've seen reference to Nested Master Pages in some of the documentation, but I haven't been successful in creating one in VS 2005 (Framework 2.0). I just did a search on it, and "How To:...
1
by: daveh551 | last post by:
Okay, another problem I'm having with nested master pages on VS 2005. I've got a MasterPage,master, as SubMaster.master, and a DesignTime.master, and a content page, default.aspx. The...
2
by: kurt sune | last post by:
Hello, I have a weird problem, I hope someone can explain this for me. I have a webpage using masterpage. In it I create a popup window using this code: Dim js As String = "<script...
16
krungkrung
by: krungkrung | last post by:
Hi all, Can somebody help me figure out whats wrong with my program? I created a site with the use of MasterPage..and with a plan of utilizing and abusing the capabilities of AJAX, I added the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.