aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes Why always show the javascript class AutoSuggestControl is not defined? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Why always show the javascript class AutoSuggestControl is not defined?" Watch "Why always show the javascript class AutoSuggestControl is not defined?" New topic
Author

Why always show the javascript class AutoSuggestControl is not defined?

Usera User
Greenhorn

Joined: Jul 13, 2005
Posts: 21
Why always show AutoSuggestControl is not defined?

I have a js file defined the class AutoSuggestControl
function AutoSuggestControl(oTextbox) {
...........
}

And the index.html included this file and new the object at onfocus event.

<script type="text/javascript" src="autosuggest.js"></script>

<input type="text" id="name" onfocus="new AutoSuggestControl(this)" />

But when the textbox is onfocus, a javascript error shows AutoSuggestControl not defined.
[ August 06, 2008: Message edited by: Calvin Wong ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
When you use a tool such as Firebug [firefox] or fiddler [ie] do you see the file being requested? Is the file in the same directory as the file you are requesting? If you type


into the address bar, does it say undefined?

Eric
 
I agree. Here's the link: jrebel
 
subject: Why always show the javascript class AutoSuggestControl is not defined?
 
Similar Threads
dwr error
problem when integrating jspell with tinyMCE editor
Calendar Popup in jsp
trouble calling two different functions
problem using greybox