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

  • Home
  • SEARCH
  • 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 7984555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:18:37+00:00 2026-06-04T11:18:37+00:00

I’ve got a problem with the jquery autocomplete function. If I specify a source

  • 0

I’ve got a problem with the jquery autocomplete function. If I specify a source which doesn’t redirect, my autocomplete works without problems (this was in my test environement). For production, this has to work in our workflow tool.

The page for the jquery source is also written in this workflow tool, and does output the data. Only problem is, when I call this output page with the GET parameters, it redirects me to another page containing the JSON results.

jquery seems to have a bit of a problem with that, since I don’t get any suggestions.

This is the jquery for the input field:

$(function() {
        $("#unameLeiter").autocomplete({
            source: function(request, response) {
                $.ajax({
                    url: "http://localhost:8082/ivy/pro/designer/ldapCurrent2/137553578A7A2B3F/persons.ivp",
                    dataType: "jsonp", 
                    data: {
                        search: request.term
                    },
                    success: function(data) {
                        response($.map(data.persons, function(item) {
                            return {
                                label: item.cn,
                                value: item.imPersonalNumber
                            }
                        })); 
                    }


   });
        },
        minLength: 0,
        select: function(event, ui) {
            $("<div/>").text(ui.item.label + " " + ui.item.value).prependTo("#output");
        }
    })
})

The HTML looks pretty nasty, but that’s not the important part, since there’s just the input field and the output div. When I watch the network requests, I can see that jquery makes proper calls to the “source” url, but then gets redirected to another URL (the results shown there are what I searched for).

So, how do I handle sources in jquery, which redirect to the actual output?

To summarize

  1. jquery sends data like this http://source/persons.ivp?callback=jquery87346&search=John
  2. Workflow tool takes the parameters, processes them and redirects to a new url http://source/L84FJ8LA4LS/CMSObject.ivc?taskId=84&processId=LKIA47&pid=KS4U6T84LSZ
  3. The new URL contains the results for the parameter John
  4. jQuery doesn’t handle the result due to an 302 permanently moved redirect.

I have no way of changing the behaviour of this workflow tool. So I’ll have to solve this with jQuery.

Update: I noticed that the JSP file which outputs the JSON data, html-encodes my output, which seems to disturb jquery. Does anybody know how I can print data in JSP without html-encoding it?

How it looks when I view source-code of output-page:
jquery1234({&quot;total&quot;:&quot;2&quot;, &quot;persons&quot;:[{&quot;cn&quot;:&quot;John Smith&quot;, &quot;imPersonalNumber&quot;:&quot;5616&quot;},{&quot;cn&quot;:&quot;Peter Jackson&quot;, &quot;imPersonalNumber&quot;:&quot;7016743&quot;}]})

How it looks normally:

jquery1234({"total":"2", "persons":[{"cn":"John Smith", "imPersonalNumber":"5616"},{"cn":"Peter Jackson", "imPersonalNumber":"7016743"}]})
  • 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-04T11:18:39+00:00Added an answer on June 4, 2026 at 11:18 am

    As it turned out, the problem wasn’t the redirect. It was the fact that the tool escaped the whole data. After I found out how to prevent him from doing so, everything worked fine.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the

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.