/    Sign up×
Community /Pin to ProfileBookmark

document.email_form – What’s this?

Hello!

I am taking an internship in a company and I am facing with some troubles:

I am a beginner in ASP and JavaScript, but my boss gave me a really hard task (at least to me): “To fix a software made by another guy, who doesn’t work here anymore”

The software contains the command “document.email_form.action” and another commands based on the property or method “email_form”.

I’ve already typed this command on Google, and on MSDN but I didn’t find any information.

Finally, my question is: Does someone know where I can find information about this property or method?

Thanks in advance.

?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@FangFeb 01.2006 — It's a method used to change the action, what the form does when submitted, of the form named 'email_form'.
Copy linkTweet thisAlerts:
@JUDFeb 01.2006 — Hi danpanex,

document refers to the whole html file that you are working in.

email_from is the name of a form contained in the document.

action is an attribute within a <form> tag that tells the browser the url of the script to goto when the form is submitted.

A typical html form would be written like this:


[code=html]
<form name="email_form" action="sendEmail.php">
Email Address :<br><input type="text" name="email_address"><br>
Subject :<br><input type="text" name="subject"><br>
Message :<br><textarea name="message" rows="5" cols="40"></textarea><br>
<input type="submit">
</form>
[/code]


Therefore the command document.email_form.action targets the action attribute of the form named email_form within the html document.

It can be used to change the value of the attribute from sendEmail.php to some other url.

Ex: document.email_form.action = 'path/to/your/script.php'

Hope that helps you a little bit.

JUD
Copy linkTweet thisAlerts:
@danpanexauthorFeb 01.2006 — Thanks Fang and JUD...I appreciated too much your help!!!

Danpanex
×

Success!

Help @danpanex spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...