Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript/Coldfusion text box selectors no longer works 2

Status
Not open for further replies.

dfwalton

Programmer
Jul 24, 2002
143
in Firefox only. Still works fine in IE. Any ColdFusion/Javascript gurus out there with an idea of what recently changed in Firefox to break this?
 
Hi

Please post the generated HTML instead. We can do nothing with the server-side code when debugging client-side bugs.

Note that the technical term "selector" is related to CSS. But your code contains no CSS. It is also used in some JavaScript libraries' terminology, but again, your code uses none of them. If you referred to something else, you will have to specify what exactly.

Anyway, "no longer works" is not a useful description of an issue. You will have to describe the erroneous behavior and the expected one, and if necessary, the steps to reproduce them.

In meantime, your HTML looks syntactically incorrect and the JavaScript contains some ancient practices. I would think about a complete rewrite.


Feherke.
 
Thanks for you feedback, feherke!

Starting from the end: What did I mean by "no longer works". In IE, clicking in the Employee field allows you to type the first few letters of a name to select an employee into a position in the event. Uou can test this using the attached htm file.

This functionality worked in FF before version 5. It no longer works there.


Yes, the javascript is archaic. But since it has worked for 7+ years, and continues to work on IE, I do not have the time, nor my client the resources, to rewrite this. As for syntactically incorrect: you would know better than I. It has, however, worked effectively for a long time.

My question boils down to, what has changed in FF that makes the Employee control no longer function. By function, I mean, the ability to begin typing the first letters of a last name into the field to find and populate the form with the desired Emps name and other important info.
 
 http://www.mediafire.com/?kqfoo7f29qpebbk
Hi

dfwalton said:
Uou can test this using the attached htm file.
Sadly, that is the [tt]frameset[/tt] document, so it has absolutely no proper content.

Anyway, now that I know that you have an autocomplete feature there, I will look again over your first code, but the generated HTML would be still helpful.

Feherke.
 
Wow. Thanks. That worked! Who knew?? I guessed it was something simple, but never that!

REally appreciate your hanging in there with me.

David
 
Hi

Later yesterday I remembered : there is a new attribute for [tt]input[/tt] tags in HTML5. That has priority when is referenced from an [tt]input[/tt]'s attribute.

( HTML5 | The elements of HTML | Forms | The [tt]input[/tt] element | Common [tt]input[/tt] element attributes | The [tt]autocomplete[/tt] attribute )

That means, there is an alternative solution : leave the function declaration as it was with the name autocomplete(), and change only the calls in the [tt]input[/tt] tags to [tt]onkeypress="return [highlight]window.[/highlight]myautocomplete(this, event, cf2js, ...[/tt] . But personally I would prefer the renaming.


Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top