LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] HTML/Javascript question...

[ILUG] HTML/Javascript question...

Braun Brelin bbrelin at gmail.com
Wed Feb 22 23:07:04 GMT 2006


Hello all,

I'm not sure if I can give enough non-generic info to describe the
problem, but here goes...

I have a web based form that looks kinda like this (pardon the ASCII graphics)


Field 1:  ---------------------------------------------------------------
            |                                                         
    |  (text field)
           -----------------------------------------------------------------

           ----------------
           | Lookup  |   - submit button
           ---------------


Field 2: ----------------------------------------------------------------
            |                                                              |
            |                                                         
    |  (text area field)
            |                                                              |
           -----------------------------------------------------------------

If a user inputs data into field 2 (the text area field) *before*
putting anything in
field 1 and then pressing lookup (Which goes off to a DB and returns a value
into field 1)  the data in field 2 vanishes.

The HTML form, unfortunately, is built from a perl program (OTRS) and
is not a static file so I'm having some trouble figuring out why this
is happening.  My question isn't why is OTRS doing this, but, in
general, what would cause text from a field to vanish like this? The
lookup button, as far as I can tell, calls some javascript to validate
the data in field 1 and then somehow, magically, calls the DB to
return a value to field 1 (i.e. it's a name lookup and field 1 allows
you to type in a partial match).

I'm guessing that the programmer in question did something stupid like
think that people would always put something into field 1 before
typing anything into field 2, but the OTRS code is so convoluted that
I'm having a difficult time following it...
Braun Brelin



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell