Need advice.

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I know the subject line is lame, but I'm totally lost and don't know
quite where to begin.

I've inherited some code at work.  The author is gone.  The code is
totally undocumented; not one single comment anywhere.

The code is a conglomeration of applets, Java, Javascript, Perl and
HTML.  The Perl code generates the HTML data.

Here's the problem:  An input screen has two buttons. The user has to
push one button to grab textarea data they just typed before they press
the 'Submit' button to upload the data (text plus images) or they'll
lose the text.  The actual situation is worse than this, but this is
enough to get the general idea across.

What I'd like to do is to make the program just a wee bit more
user-friendly by not requiring the user to press two stupid buttons.
How can I have the 'Submit' button grab the data from the textarea?

I apologize for this problem description being so vague but the code has
me in knots. I'm not an expert in all of the above languages.  Your
assistance would be greatly appreciated.  Thank you.

Re: Need advice.

Quoted text here. Click to load it

Start over from scratch.  You'll thank yourself later.

20% Discount Code:  newsgroup
Serving the web since 1997

Re: Need advice.

Guest said...

Quoted text here. Click to load it

start again
Quoted text here. Click to load it


there is no "grab". you fill out the form elements press submit and
the goodies you supplied are sent to the server. the server then does
what it was told to do with them. thats it.

use method post and enctype multipart/form-data on your form.

01/October/2003 08:58:25 am

Re: Need advice.

Guest wrote:
Quoted text here. Click to load it

is normal behaviour if the text-area and the submit button are in the same

William Tasso -

Re: Need advice.

Guest wrote:
Quoted text here. Click to load it

Sounds like the page has been divided into two forms, each with a
seperate submission.  Combine into one form.

Quoted text here. Click to load it

I agree with brucie and tina that you *should* do a rewrite; but
years of working in industry also lets me know that 90% of
the time you won't be permitted to do so by the _powersThatBe_.

Read the code carefully, and try to understand how all the parts
interact with each other.  Collect information about all the
languages used.

In places where you get stuck, begin to make tiny changes to see
how they affect the system.  *Always* backup the changed file *before*
making any changes!  (You'll forget to do this at least once, and regret
the hell out of it, so backup the whole system now.)  You'll soon
understand how the system works and be able to tweak it in any way you like.

m /

Re: Need advice.

m said...

Quoted text here. Click to load it

or use an editor that can undo all the way back to when the editor was
started. not just the last x changes or to the last time the file was

it comes in very handy.

01/October/2003 10:28:06 am

Re: Need advice.

m wrote:
Quoted text here. Click to load it

Thanks to all for your opinions.  The code is very buggy and I don't
think it can be fixed.  I spoke to my boss and we agreed it needs to be
rewritten from the ground up.

I used to think my CS professors had a bad case of OCD when they went on
and on about the need for commenting code.  The lack of good comments
will cost the company far more than it cost to write the original code.

Thank you for your responses.

Site Timeline