Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7728503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:44:01+00:00 2026-06-01T05:44:01+00:00

For a website, I will have a lot of auto complete fields on differents

  • 0

For a website, I will have a lot of auto complete fields on differents pages.

They works exactly the same on all pages, except they must not call the same url.

I was wondering if there is a possibility to mention the url on the <input> which is going to be an autocomplete field? The goal is to have one js code for many html codes

I tried something, but it doesn’t seems to works:
Html:

<input type="field" name="search" class="autocomplete" value="Search" url="smalltest/otherTest/..." />

And the JS

$(document).ready(function () {
    $("input.autocomplete").autocomplete({
        source: $(this).attr("url")
    }); });

I got exception in jquery lib.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:44:03+00:00Added an answer on June 1, 2026 at 5:44 am

    Change the url attribute to data-url then in your .autocomplete do this:

    source: $(this).data("url")

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to build a html website, which will contain about 50+ pages. The
I have a website that will contain a lot of types of businesses, each
I am currently working on a website that will have a high volume of
I'm about to create a user based website and will have to store photo,
I have a notification system on my website where users will be notified of
I have a website where an ajax call will get some Json data from
I have a website, which will be frequently updated. Sometimes changes happen to User
I have a website that generates pdf file from CSP. Will this pdf file
I have a problem when using jsonp to API HTTPS website. it will return
So I'm building a website that will use a lot of animated GIF's on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.