jquery

JQuery: return values to load callback function

It's required to partial upload Html page with $(selector).load('/sitePath', params, function() { ... }); method. Html layout comes ok but it would be nice to return some additional values for javascript also. Nowadays I return special javascript block with javascript variables inside html layout to read their values on load callback. ...

.slideToggle auto scroll down to reveal content

I am using .slideToggle to open a panel when the user clicks a link: <script type="text/javascript"> $(document).ready(function(){ $(".btn-slide").click(function(){ $("#panel").slideToggle("slow"); $(this).toggleClass("active"); return false; }); }); </script> The content of the toggled div (#panel) is taller than the height of th...

How to disable back button navigation on certain pages

Possible Duplicates: How do I stop the Back and Refresh buttons from resubmitting my form? Disable browsers back button Env: jQuery,richfaces How to disable back button navigation (in the menu bar) on certain pages of the user interface. ...

How to disable printing options in the browser for certain pages

Env: jQuery,richfaces,all major browsers How to disable printing options in the browser for certain pages (e.g. File-->Print Preview, Print) ...

How to disable copying text on certain pages in the user interface

Env: jQuery, richfaces We would like to disable copying (using CTRL+A) sensitive information on certain pages and pasting via the clipboard. We would rather expect the user to use few buttons to export the data. How do we achieve this? ...

Autocomplete text box like "Tags" text box in SOF

Hi, How to design & implement "Tags" text box used in SOF? Thanks. ...

jQuery how to find the class of the Droppable Div ?

Hi all I have two divs: one draggable and one droppable <div id="draggable" class="block" runat="server"> </div> <div id="dd" class="drop" title="drophere"> </div> When I release the draggable div I want to find the class of it's parent to take an action if it is dropped on a droppable div, otherwise cancel the dragging. I want to ...

how can i check uncheck functionality in jquery in checkboxlist?

I have a checkbox list I need to implement the check uncheck functionality like. When some one click on Όχι(none) all check box will be uncheck. <TABLE id=ctl00_m_g_0a9e1440_6a3d_47b2_9ccb_dd6176913570_ctl00_ddlSpeakForeignLanguages class=ms-authoringcontrols border=0> <TBODY> <TR> <TD vAlign=top><INPUT style="PADDING-LEFT: 5px" id=...

event contex for live function in jquery

HI , I am using JQuery 1.3 , i am facing problem in using live event as in jqyery . DOM element "context" is bound to default document root. so how to overcome such thing ? Note : As of jQuery 1.4, live events can be bound to a DOM element "context" rather than to the default document root. To set this context, we use the j...

How to wrap return type of ajax call in success with function

I have a Web Service and it always brings back one object from my class that i defined on the server side. in success method of $.ajax function i always get the this object. And on the client side i want to add couple of functions to display its properties quickier. Is there a way do that ? (JSON object will return, i am worrying about...

Dynamically adding a script/function block in jquery

EDITED: Just wondering if is it possible to add a function (or static script) block or a variable to body of html. Something like this, $('body').add(function(){/../}) or $('body').append('<script></script>') or $('body').fn.myFunc = function(){} Is it correct to use .extend instead? One example is if I use ExternalInterface...

Iterating a selectlist to highlight an item, highlights each item in turn

I have the following jQuery method that iterates over a selectlist containing a number of options. I want to hihlight the first line that has a match for some text typed by the user into a textbox named MMDCriteria. Currently the code is selecting and highlighting each item in turn until it gets to the end of the list. $("#MMDCriteria...

Ajax loading images in XML - loading image and fade?

I am loading in an XML document with multiple photos in it, via ajax. The process my function goes through is this: Open a UL Open a LI Open an img tag set the src to = the url in the xml document (see below) close img tag close LI open a LI open an img tag set the src to = the url in the xml document (see below) close img tag close LI ...

JQuery & Flickr API, not getting photoset details correctly

Hi, I amy trying to use the Flickr API to create a photo gallery on my website, I have the API & photoset, and am using the Flickr method 'getPhotos' which returns the photos from a given Set and I am calling this using jQuery. My javascript all seems to be working fine except whilst the details of the Flickr photoset are being return...

Is there any way to run first base function that defined in ajaxSetup ?

$.ajaxSetup({ success: function onSuccess(msg) { // add some functions to `msg` // then return to success method that defined in $.ajax msg.display = function(){ alert(msg.M_Prop); } return msg; } }); $.ajax({ success: function(newMsg){ // call new functions of n...

how to show alert "data already exists"

hello.i newbie this my first project,I don't know how to resolve any problems about the repetition of data i have an input page. it consist of 2 textfield: Model, Serial, and one combobox: 1. line. i want if there is input twice, I mean here is a double input data, will be out warning "data already exists". how do i do that?i ...

Facebook Status Update-Like Autocomplete/Tagging Feature with jQuery

I'd like to create a text input like the Facebook status update Publisher. Basically, an input that can activate an tagging/autocomplete feature with a certain key (ex: @), creating tags that act as single characters in the text input (can be deleted with a single backspace), and yet still accept regular text input. Different from Facebo...

Dynamically adding two form elements with jQuery

Hi guys, I am trying to create two form elements when the user clicks a button, which he can do 5 times, but I am new to jQuery so I am running into problems, here is the code: $(document).ready(function() { $('#btnAdd').click(function() { var num = $('.clonedInput').length; var numTwo = $('.clonedInputTwo...

Why use $ in the name of javascript variables?

Possible Duplicates: Why would a javascript variable start with a dollar sign? JQuery : What is the difference between var test and var $test What is the difference between this two ways of initializing variables? var $val = 'something' OR var val = 'something' as I see they are the same thing. Maybe in this case ...

jQuery - modal dialog form loaded via .load() multiple times and select list breaks

Hi, I am loading content with jquery.load() (1.4.2), which includes a form that I turn into a model dialog. When I open the dialog, I dynamically populate a form select list. It works the first time I load the content, but on subsequent loads it breaks and will only return the last selected item from the previous load. (I also think i...