.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

jquery not working in content pages and debugging jquery

Posted By:      Posted Date: October 03, 2010    Points: 0   Category :ASP.Net

Hey! Friends

        Please provide me some sample code to work with jquery in content pages. For example my jquery code for validating username availability works in web form but not in content page.

Thank You.

View Complete Post

More Related Resource Links

using jquery in content pages


i have found out a way to find controls on content pages by using

var txt = $('input[id$=TextBox1]'). But how to access html elements like "<p>" tag and others in jquery when the html elements are in content page only.


jquery with content pages.... ARRRGGHHH!!!


Sorry, for the subject, but this is getting very annoying... 

basically, from what i have endured from the past day and half, jquery does not work with content pages.

i currently have the main jquery script in the master page ( in header ):


script language="javascr

Loading pages content with jquery


Hi people

I would like to know, based on your experience, if loading every page content into a div with jquery is a good practice.





JQuery Treeview plugin is not working with Ajax page load in ie8


Hi there,

I developed a page where i m using jquery treeview plugin to generate tree. It worked fine on FF, IE8 with out ajax.

But when my page loads thro' ajax call in IE8, it is not collapsing or expanding tree.

Any idea?

Thanks in advance.

jquery confirm windows isn't working


Hi, i am using jquery to implement a modal confirm windows but it not working

i have a template field button with ajax confirm using jquery but i have a problem. Apper the confirm windows but when i click on "yes" doesn't execute the delete command. without ajax (using template field button and simple confirm windows javascript) works so well.

Can you give me a hand with this?

thx in advance!

<link href="_assets/css/StyleSheet.css" rel="stylesheet" type="text/css" />
<link href="_assets/css/confirm.css" rel="stylesheet" type="text/css" />
<script src="_assets/js/jquery-1.2.6.min.js" type="text/javascript"></script>
<script src="_assets/js/jquery.simplemodal-1.1.1.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function() {
       $(".deleteCustomer").click(function(ev) {
                var msg = $(this).attr("title");
                confirm(msg + "?");

jquery is not working in asp.net panel and/or update panel ? need help

I have 3 panels on single .aspx page and depending on condition required panel is displayed . Default panel is panel 1 .  I have created a image gallery which displays thumbnails of various images and when I hover on that image its preview is displayed. I have put the code for this image gallery in 2nd panel, it displays thumbnails but on hover preview is not displayed. but  if I somehow make postback then it works. And I place the same code in !st panel it works ? Can anyone tell me whats wrong with my code? Regards, anas anjaria I have 3 panels on single .aspx page and depending on condition required panel is displayed . Default panel is panel 1 . I have created a image gallery which displays thumbnails of various images and when I hover on that image its preview is displayed.I have put the code for this image gallery in 2nd panel, it displays thumbnails but on hover preview is not displayed. but  if I somehow make postback then it works.<div> /* PAnel 1*/ <asp:UpdatePanel ID="updpnl2" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Panel ID="pnl2" runat="server" Visible="false"> /*other coding stuff*/ <div id="wrap"> <div id="styles-table"> <div id="styles-wrap"&g

jquery is not working after postback

Hi I am having a small problem with jquery so I did a simple sample to illustrate my problem. the problem is basically that jquery stops working after an autopostback. if you run the sample below, start by setting focus on the first textbox and then blur the first textbox u will notice that the second textbox gets hidden. that all works perfect now try to click on the checkbox to do a postback and then try setting focus on the first textbox. the jquery is no longer working!, why? what am I missing?<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %> <!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></title> <script src="Scripts/jquery-1.2.6.js" type="text/javascript"></script> <script type="text/javascript" > $(document).ready(function() { $("#TxtB1").focus(function() { $("#TxtB2").show("slow"); }); $("#TxtB1").blur(function() { $("#TxtB2").hide("slow"); }); })

Problem running jquery script in Content Page

Hi!! I have a master page in asp.net and a content page with some basic asp.net controls like textbox,buttons,treeview....i have a jquery script in the content page and reference set to the jquery file..The script changes the text property of a button on the keydown event set for the textbox...the script works fine if i copy and paste it in a normal page...the script only ran once when i worte it for the first time the next day when i tried to run the script it was not working..i m facing this problem for running the script in content page and i a m not aware of how to write jquery script for the content page.. i m really not finding any solution where i am wrong i have even tried setting the internet explorer security setting to low..plz plz plz plz plz plz help me on Thanks!!

get() method of Jquery not properly working in IE



 I used get method for getting JSON data from .aspx page.This JSON data for chart application which show monthly records.For selecting month I used dropdown and defaultly I set current month chart.But for showing previouse month records in chart   i want to select the  previouse month but chart not shows selected Month record rather than it shows default record.

Color Box Jquery Not Working in Update Panel After the Initial Postback


Hi Guys,

I have an UpdatePane that contains a Listview


		<asp:LinkButton ID="lnkName" runat="server" CommandArgument='<%# Container.DisplayIndex %>'
            CommandName="SelectedRow" Text='<%# Eval("Name") %>' Class="info" Rel='<%# Eval("ID") %>' />

This linkButton will serves as the trigger to call my color box jquery. Function stated below

 <script src="script/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="script/jquery.colorbox-min.js" type="text/javascript"> </script>
    <script type="text/javascript">

        $(document).ready(function() {

            $("a.info").click(function() {

                $(this).attr("href", "EmployeeDirectoryDetail.aspx?id=" + $(this).attr("rel"));
                $(this).colorbox({ height: "200p

jquery tabs with ascx content


First time I have started looking at jquery, and i'm not sure if the following is possible.

I have an aspx page containing the tabs, rather than putting all the content into the aspx page I decided to add a placeholder to each tab and load an ascx page.

This works, but now I want to add the ability to move to the next tab on a button click.

The button resides in the ascx page.

But is it possible to do this from the ascx page, as the tabs are on the aspx page?

JQuery Plugin Not Working With TabContainer


Hi Folks

I have an asp.net TabContainer control on my page (web forms). The TabContainer has two tabs and works fine. The first tab just contains text, the 2nd tab however, contains a JQuery image slider plugin which I used from here http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding

The slider works fine on a normal page, if even works fine on the first tab. However, I cannot get it to work on the second tab. I've read that it's something to do with the fact that the second tab is inactive on load, therefore its display is set to none.

Has anyone got a solution to help me?



jQuery and Master Pages - Object expected


Here is the layout of my problem: I have a Master Page that is referenced by pages in the root of my site, as well as some pages in an 'Admin' folder. All of that works just fine. I added some jQuery to add some features to an auto-search textbox, and placed the code referencing the jQuery file and the script in the head section of the Master Page. The script looks a little like this:  

       SelectText(this); // Function to call on click event.

I just used the actual id generated by ASP.NET to grab the textbox to avoid the "what's the actual id?" issues. When the home page loads, all is well. When I try to navigate to one of the pages in the 'Admin' folder, I get an 'Object expected' error. At first I thought it was due to a possible renaming of my textbox, but I checked the source of the page and this was not the case. In fact, I removed all of the script code except the:


part, and the 'Object expected' error still occurs. I am only setting up the jQuery here, and it still throws an exception. I have no idea what is causing

jquery datepicker not working in dialog



I have an ajax call that opens a dialog that contains a datepicker. The call looks like this:

            type: "GET",
            url: encodeURI('<%: Url.Action("action", "controller") %>'),
            cache: false,
            dataType: 'html',
            error: function (XMLHttpRequest, textStatus, errorThrown) { $("#dialog").html(errorThrown); },
            success: function (data, textStatus, XMLHttpRequest) {
            complete: function (XMLHttpRequest, textStatus) {

function openCalendar() {
        $('#EndDate').live('click', function () {
            $(this, document).datepicker({ showOn: 'both' }).focus();

The picker opens ok on click but when I try to select some day it won't set the day in the input field and it won't close also.

Thank you in advance

Why JQuery menu does not work for pages which are in a separat folder pages?


I have added a jquey menu in my master page its working fine for those asp.net pages which are at the same level as master page.

But this menu isn't working at all for all of those page which aur in Editor's and Admin's folder. In these pages menu is displaying as simple html menu and unfortunately no jquery effect is shown on it.

I'm very confused why this menu isn't working for the pages which are in a seprate folder while the master page is added at the root level outside of all these folders.

Please let me know why its doing so?



jquery auto comple not working



if click the check box and search for text in autocomplete jquery its not firing

looking froward the reply

Mvc JQuery Validation not working with IIS



Im using MVC 2 and .NET 4 on my local machine.   I can debug my project using the Visual Studio Development Server locally.  Everything works great, including the validation using

 <script src="../Scripts/swfobject.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../Scripts/jquery.validate.min.js"></script>
    <script type="text/javascript" src="../../Scripts/MicrosoftMvcJQueryValidation.js"></script>
The validation doesnt work in any way  if I change to debugging using the Local IIS Web server.
Also, the validation doesnt work in any way on the production web server using IIS.
What am I missing?  What does IIS need (or what does the server need) to make   MicrosoftMvcJQueryValidation.js work?   
MicrosoftMvcJQueryValidation.js is MVC 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend