Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Ajax ISBN: 978-0-471-77778-6
This is the forum to discuss the Wrox book Professional Ajax by Nicholas C. Zakas, Jeremy McPeak, Joe Fawcett; ISBN: 9780471777786
Important: For the new 2nd edition of this book, please post here instead: [url="http://p2p.wrox.com/forum.asp?FORUM_ID=307"]http://p2p.wrox.com/forum.asp?FORUM_ID=307[/url]
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Ajax ISBN: 978-0-471-77778-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 27th, 2006, 03:08 AM
Registered User
 
Join Date: May 2006
Location: Schwarzach, , Germany.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Extend Autosuggest control

I have done the Autosuggest Control and it works fine on my first try.

Now I wanted to do it on a second page and there it works wrong.
On my second page it shall request different data than on the first page and I want to use the same js-file.
So I extend the creation of SuggestionProvider:
function SuggestionProvider(requestMethod) {
    this.http = zXmlHttp.createRequest();
    this.requestMethod = requestMethod;
}
and I use the instance variable "requestMethod" later in SuggestionProvider.prototype.requestSuggestions():
var oData = {
        requesting: this.requestMethod,
        text: oAutoSuggestControl.userText,
        limit: 5
    };

Now the effect in Firefox is that on my second page I get the same suggestions as on the first page.
Although I make these calls in window.onload():
Page1:
var oOptions = new AutoSuggestControl(document.getElementById("item_m odel"), new SuggestionProvider("productModel"));

Page2:
var oOptions = new AutoSuggestControl(document.getElementById("option "), new SuggestionProvider("options"));

In IE I get the right suggstions. Is there only one instance of XMLHTTPRequest ?



Manfred Ursprung




Similar Threads
Thread Thread Starter Forum Replies Last Post
autosuggest using ajax rajesh_css Ajax 1 October 29th, 2008 03:09 AM
AJAX Control Toolkit - AlwaysVisibleControl Extend ilegend .NET Framework 3.5 1 September 24th, 2008 02:14 AM
how to extend classes hafizmuhammadmushtaq Java Basics 1 April 8th, 2008 02:45 AM
Extend a border nloding CSS Cascading Style Sheets 1 September 1st, 2006 08:43 PM
AutoSuggest and Links gt96 BOOK: Professional Ajax ISBN: 978-0-471-77778-6 1 July 4th, 2006 04:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.