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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different Forms in one file only

Status
Not open for further replies.

Lupo

Programmer
Oct 29, 2001
31
0
0
CH
I think a have a black out, maybe I had one over the eight last night. :)

I have the following problem I can't resolve. I've got the order from my boss to write a browser (only IE) based data maintenance "tool" (address). My problem is, this "tool" must be able run on every webserver (IIS, Apache, Abyss, Jana, etc.) and the data have to be sent by email without any mailer (JMail, Cdonts, etc.)... please don't laugh, that's the trough.

Until now it's not a problem. The problem is, everything should be written in just one file. A "drop-down list" with 21 roles (e.g. suppliers, graphic designer, product manager, etc.) and 8 different form types. Based on the role different data have to be entered and/or the e-mail has to be sent first for approval before it will be sent to the data administrator. Furthermore, based on the selected role only the relevant form should be on the screen.

Due to all this facts, I think I can only use pure HTML and JavaScript. But, how? Is anyone out there who can help me with this problem? Thanks in advance for any hints?


WEB Designer & WEB Developer (as per my working contract) and

Lupos.jpg
 
JavaScript can't send e-mail. It can only open the client's e-mail program. If that's good enough, then maybe you can use something like this:

function sendEmail(data){
location.href='mailto:admin@domain.com?body='+escape(data);
}

Adam
while(ignorance==true){perpetuate(violence,fear,hatred);life--};
 
Hi Adam,

think there was a little misunderstanding, means my explanation and/or my english was (is) very bad.

Actually not the transmission of e-mails is the problem. I (still) have problem with the steps before. I have a drop-down list with approx. 21 different roles, eight different form possibilities and everything in one file.

1st the user has to select a "role" or "function" from the "drop-down list"
2nd only the assigned form (1 out of 8) should appear on the screen

For instance:

- by selection of role A - Form 1 should appear on the screen
- by selection of role B - Form 2 should appear on the screen
- by selection of role C - Form 1 should appear on the screen
- by selection of role D - Form 2 should appear on the screen
- by selection of role E - Form 2 should appear on the screen

My problems are:
[ol]
[li]How do I have to pass parameters as form no., e-mail-address, role title from the drop-down list over to the role assigned form?[/li]
[li]How do I have to hide the seven forms I do not need?[/li]
[/ol]

Do you have any idea?



rgds Lupo
WEB Designer & WEB Developer (as per my working contract) [wink] and
Lupos.jpg
 
Have you looked at disabling the form elements you do not need - or using css to hide the form you do not need - providing you dont nest the forms the only form to be submitted will be the one with the submit button.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top