Solved

jquery function params

Posted on 2009-07-13
2
438 Views
Last Modified: 2012-06-27
In the below code  i want to pass a parameter to a jquery function as in the usage, how can i receive it inside the extraParams options, i have tryed in different ways but no luck

thaks


// FUNCTION

$.fn.doAutoCompDesc = function(relID){ // here i ask for a parameter
 

		$(this).autocomplete('./?map=Factura_FormUtilities&level=descripcion',{

			onItemSelect:selectItem,

			onFindValue:findValue,

			formatItem:formatItem,

			extraParams: {rel:relID} // <--- how can i receive the function parameter here
 

		}

		);

	}
 

// USAGE

$(".description").doAutoCompDesc(2); // here i start using my function passing a parameter

Open in new window

0
Comment
Question by:WebserviceMX
2 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 300 total points
Comment Utility
what you posted looks correct. How are you accessing/dereferencing the value in  autocomplete()?
0
 

Author Closing Comment

by:WebserviceMX
Comment Utility
thanks just closing
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now