I have the following jQuery that does find the ASP.NET server control (tested by placing an alert() inside block), but it does not set the height on the next DIV in the DOM using .next(). However if I use straight JS to do the same thing, calling the DIV by ID directly it works fine. What I am trying to do is not use the hardcoded ID of the DIV in case it changes, and rather walk the DOM to dynamically get to the element and set the height. So 1st: the HTML source of what I am trying to manipulate:
Next the non-working jQuery that I think should work:
//Using the 'DIV' that is created by the viewer (at runtime), resize it dynamically to fit the window
var myHeight = $(window).height();
if ($('#<%=WebViewer.ClientID %>') != null) {
$('#<%=WebViewer.ClientID %>').next('div').height(myHeight - 10);
}
And lastly the JS that does work, but I would prefer not to access that DIV by a hardcoded ID and use jQuery instead:
var myHeight = $(window).height();
//Using the 'DIV' that is created by the viewer (at runtime), resize it dynamically to fit the window
if (document.getElementById('WebViewer_controlDiv') != null) {
document.getElementById('WebViewer_controlDiv').style.height = myHeight - 10;
}
why walking the DOM in jQuery to get the 'next' div and set its height is not working?
I am new to jQuery, i am tring that In my pages contain four checkboxes then if any checkbox is checked then one div is dispaly , in that div some controls is placed. My intension is if checkbox is checked then validation for that particular div contained controls,
I have implemented a lot fo JQuery features into my ASP.Net web application. I am using JQuery, JQueryUI, JQuery Validation and a couple of other plugins. They are all coexisting and working fine. This one page in my app has the JQueryUI tabs, Modal progress pop-up working just fine. This page also has a couple of JQuery AJAX calls to my server side events. That all works fine!
I just added a Jquery date picker to one of the text boxes on the first tab on my data entry form and nothing happens or is displayed when you click on the date textbox. I am going to post the HTML markup for the page and my JQuery code. Please let me know if you see anything glaring? HTML
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
I'm try to do validation on a textbox input to validate a phone number.I have an asp.net textbox and checkbox. The default is to validate a US phone number and when I check the checkbox I should change the RegularExpression and error message to validate an international phone using my own RegularExpression.
i am trying to include some tooltips in my MVC project. but i cant get any jquery effect from it, what i see is just default tooltip. I had follows several examples but still cant get it. currently i am doing like this:
I'm developing a website using asp.net mvc and I have this image that fire an Ajax event when clicked. It works just fine on FF and IE 7 & 8, but on IE 6 it doesn't even call the method on the controller (I did put a breakpoint there and ran it on debug mode to check). I'm on it for a few days now and can't find a solution. Here's my code:
I am using jquery to expand/collpase a div that contains a menu but i get the following error only in IE 8 and maybe on all IE but have no way to test with older versions as I dont have one installed. I even upgraded to lates jquery library but problem persists. Other browsers work perfect.Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Timestamp: Wed, 16 Mar 2011 20:25:37 UTC Message: Object doesn't support this property or method Line: 16 Char: 39490 Code: 0
$('#' + textboxID).autocomplete({ delay: delay, source: ["cats", "dogs"] }); which works fine. I want to use a webservice: $('#' + textboxID).autocomplete({ delay: delay, source: webserviceURL}); This doesn't work. My webservice URL is /blah/blah.asmx/myMethod The webservice definition is: [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public List<string> myMethod(string term) { // Logic here, return list of strings }
The method never gets called. Can anyone point me in the right direction? I have other webservices in the same .asmx which work fine with other controls (other controls are using $.ajax to call them).
Edit: Getting closer, I now get a 500 error saying Request format is unrecognized for URL unexpectedly ending in '/myMethod'. I think it's not treating my url quite right..
I am using ASP.NET to develop a website and I am going to use the jQuery datepicker in my website. I used following code, but it won't work. Does anyone know why?
I have a Jquery UI datepicker control in my asp.net MVC application and it works fine in IE and Firefox but it doens't work in chrome when I click the datepicker button. Here is my Index view:
And in the content page, I created a VERY simple script to load the Date Picker, as per JQuery UI demo page. I always get a 'Microsoft JScript runtime error: Object doesn't support this property or method'. Here's my content page:
The CSS folder is in place, and pure JQuery calls work. This simple datepicker is not working with this master page / content setup. I've tried many combinations for the datepicker ID, using ClientID (as is), UniqueID, [id$=datepicker], etc. Can someone shed a light on this? What am I missing?
I am trying to use a solution for a cascading dropdownlist (the selection in one dropdownlist determines the options in the second one) found here:
[URL]
[code]...
how to get a default value for the dropdownlists. Since otherwise the customer dropdownlist will have a value when you first get to the page, but the task list won't...
I have an update panel on my page with some links that have onClick events that trigger a JQuery box to pop up. This works fine unless an AJAX postback has occurred. I saw some code on another post:
I am using ASP.Net and jQuery + jQuery UI. Everything works fine with the jQuery on any other page, however when I create a popup window with window.open(...) jQuery seems to no longer function.
I have all of the script files included on the Popup's Master page, so am not sure why it won't fire.