Need advice.

G

Guest

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.
 
T

Tina - AffordableHOST.com

Guest said:
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.


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

--Tina
 
B

brucie

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

start again
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.
hmmmm....

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?

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.
 
W

William Tasso

Guest said:
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?

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

m

Guest said:
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.

Sounds like the page has been divided into two forms, each with a
seperate submission. Combine into one form.
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.

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
http://www.mbstevens.com/
 
B

brucie

*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.)

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
saved.

it comes in very handy.
 
G

Guest

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


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
http://www.mbstevens.com/

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,079
Messages
2,570,575
Members
47,207
Latest member
HelenaCani

Latest Threads

Top