Solved

jquery function params

Posted on 2009-07-13
2
444 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 82

Accepted Solution

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

Author Closing Comment

by:WebserviceMX
ID: 31603120
thanks just closing
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
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:
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

737 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