Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Autocomplete, extraParams and this
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
olly  
View profile  
 More options Mar 3 2010, 10:32 am
From: olly <ohneso...@design-xpress.de>
Date: Wed, 3 Mar 2010 07:32:48 -0800 (PST)
Local: Wed, Mar 3 2010 10:32 am
Subject: Autocomplete, extraParams and this
Hi there,

been searchin' for a solution for hours, hope someone here can help me
out.

This what I'm trying to do, I have several inputs on one page with
autocomplete. I need to pass a variable based on the input field the
user is in. So I decided to go with having this information as id
value.

I've found several solutions for autocompletes only called by the id,
not the class,

  $(".autocomplete").autocomplete (getAutocompleteValue.php', {
    extraParams: { type: $(this).attr ('id') },
  });

Here is a way I found, but I can't get it to work:

  $(".autocomplete").each (function () {
    var field = this;
    $(field).setOptions({
      extraParams: {
        type: function() { return field.id; }
      }
    });
  });

By trying this, every autocomplete has the same extra params set as
the first autocomplete.

I think I'm just screwed up by trying for hours, so maybe someone has
a little hint or even a solution for my?

best olly


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »