jquery

hi how restrict the year in jquery datepicker?such that it display no year other than current year in database

How to set jquery.datepick.js to display only the current year in the database? ...

jquery two different date validation

hello, var cin = $("#datepicker").val(); var cout = $("#datepicker2").val(); dateformat is : dateFormat: 'DD, d MM, yy' how do i use jquery to check cin(checkin) date not past cout(checkout) date? which means, cout date cannot earlier then cin date ...

jQuery not replacing text in ReportViewer

I'm trying to replace text that I got back in the ReportViewer using jQuery. My div, wrapped in the table cell, display "empty" as text - which I plan on replacing with my own formatted text on the client side. I can use jQuery just fine to set a class on the div (which is inside a td element). Example: jQuery('div:contains("empty")')....

Background text in textbox

Hi All, I want to display a background text in the textbox. ex: The Title textbox in the stackoverflow Ask question page. Needs: If i enter some text inside the textbox it should disappear. Geetha. ...

How to use JQuery to focus on a specific DIV tag?

Hi all, Say I got a few DIV tags in a HTML page like: <DIV ID="all"> <DIV ID="div1"> <Input type="radio" name="data['site1']['user']" VALUE="1">user1<br/> </DIV> <DIV ID="div2"> <Input type="radio" name="data['site1']['user']" VALUE="2">user2<br/> </DIV> <DIV ID="div3"> ...

can we use jquery for client side validation of a custom validation control?

There are two textboxes one for email and other one for phone i have used one custom validation control so that user have to fill any one of textboxes for client side i used javascript function ValidatePhoneEmail(source, args) { var tboxEmail = document.getElementById('<%= tboxEmail.ClientID %>'); var tboxPhone = docum...

Check Ctrl / Shift / Alt keys on 'click' event

How could I identify which Ctrl / Shift / Alt keys are pressed in the following code ? $("#my_id").click(function() { if (<left control key is pressed>) { alert("Left Ctrl"); } if (<right shift and left alt keys are pressed>) { alert("Right Shift + Left Alt"); } }); I work with Firefox 3.6.3. Thanks ! ...

Want to set 'src' of script to my IP-Won't load in Safari or Chrome. Relative link asp.netmvc

I have a script that links to the server I am hosting (IP can change) usually I would just use for links: var url ='http://' + window.location.hostname + 'end of url'; But in this case it isnt appearing to be so easy. I have tried: (1) $('#scriptid').attr('src', url); as well as: (2) var script = document.createElement( 'script'...

Rendering javascript at the server side level. A good or bad idea?

Now a community wiki! I want to make it clear first: This isn't a question in relation to server-side Javascript or running Javascript server side. This is a question regarding rendering of Javascript code (which will be executed on the client-side) from server-side code. Having said that, take a look at below ASP.net code for example:...

How to programmatically emulate the click on a link Using jquery?

How to programmatically emulate the click on a link using jquery? ...

What is wrong in this JSON string?

My JSON string looks like this, [{"id" : "38","heading" : "Can you also figure out how to get me back the 10 hours I sp.....","description" : "Im having a very similar problem with the Login control - again it always generates a default style containing border-collapse - only in this case .....","img_url" : "~/Event...

new page/forward in javascript

I am making a greasemonkey script and i would like a link to go forward and modify the current html and allow the user to click back to go to the original page. How might i do this? using jquery + greasemonkey + javascript. Targeting firefox mostly. -edit- http://jsfiddle.net/ seems to do it. If you write random html in the html sectio...

How do i search through and sort a collection of li's using jquery?

Hi, i got some li's that i'd like to sort and search through using jquery. I've found http://plugins.jquery.com/project/TinySort to sort things and http://stackoverflow.com/questions/1428645/search-through-a-big-list-fast-with-jquery to search through the li's. Is there a good plugin that can handle both things (search+sort) or is the...

Add a different ID to each li element by jQuery

Hi guys, I'm new here and I'd like to ask a question about jQuery. I have the unordered list like: <ul id="pages"> <li class="something"><a href="#"></a></li> <li class="something"><a href="#"></a></li> <li class="something"><a href="#"></a></li> </ul> And I'd like to add a different ID to every li displayed in this <ul> ...

jQuery not and classes

Hi Guys, I have 2 anchor links (a.selector) and when one is clicked it has a class applied to it of 'active-arrow' and the click also removes the class of the same name from the other anchor as well as lowering the opacity to 0.2. I then want to have a fade effect when the user hovers over the anchor that doesn't have 'active-arrow' ap...

How to decode JSON (varying number of elements, varying keys) using Jquery

My JSON looks like this: { "[email protected]":"Person1", "[email protected]":"Person65", "[email protected]":"Person24" } It's returned in various number of elements, and various keys. How do I traverse the data if my code is like this: $.post("includes/ajax.php", { group_id : $('#group').val() }, function(data) { //how d...

What if Web page's background matters

Hi, I have a complex background image and images, that should be on exact positions of the background image. How can I organize web page? I can't use absolute positions, because I need to organize background to view it nice on any monitor, any resolution and any browser. It can be aligned to center or smth else. Web page can be writ...

jquery set focus on dynamic content?

In jquery I've appended a <li> element to an unordered list. How do I focus on the newly created <li> ? If I do the following: $("ul").append('<li><input type="text" value="Hi!"></li>'); $("li:last").focus(); //doesn't work because new <li> isn't in dom yet the focus doesn't work, as noted above. I know jquery 1.4.2 has a live() ev...

dynamically scan pictures in a folder and display using jquery slideshow

guys, anyone know how to scan a folder using jquery or javascript code snippet, after that get a picture file name and embed in <li></li> or <div></div>, i've used php code to read through the folder and loop through the element to display the thumbnails and all, but it's not work well. I've try on galleria, gallerific, galleryView jqu...

Trigger the change event of a textbox in jQuery

I have an asp:TextBox with asp:RegularExpressionValidator to validate if it's a number. Obviously an onchange event will be attached to this textbox while rendering. Also I add a change event at $(document).ready to make some calculation when the value is changed. <asp:TextBox id="myText" runat="server" /> <asp:regularexpressionvalidato...