Welcome to WebmasterWorld Guest from 54.166.3.44

Forum Moderators: mack

Message Too Old, No Replies

using to actions in a form

     
3:26 pm on Jul 15, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 15, 2003
posts:51
votes: 0


Iam trying to send an email and move to a confirm page:

<form name="form1" method="post" action="mailto:someone@example.com"&"confirm.htm">

Is this possible? If not what can I do to get this to work

[edited by: Woz at 9:56 am (utc) on July 21, 2003]
[edit reason] examplified form [/edit]

3:52 pm on July 15, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:June 19, 2003
posts:198
votes: 0


creative, but I've never heard of it..

best bet, from my experience, is to set up a serverside emailer (PHP or ASP both have free ones avail), and in that email script, redirect to the confirmation.

Better yet, do this:


<%
' Pseudo code:
If request.querystring("action").value="email" Then
response.write(confirmation)
End
%>

<form method="post" action="">
<input type="hidden" name="action" value="email">
...email form...
</form>

5:20 pm on July 15, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 11, 2003
posts:146
votes: 0


<form name="form1" method="post" action="mailto:(snip)"

This kind of form using only a mailto: link won't work in newer browsers, including IE6, so you will need to use a formmail-type script (written in perl, php, ASP, or whatever) to send the information. There are loads of prewritten scripts available, and most of them allow you to define the confirmation page in a hidden field.

Oh yes, and welcome to WebmasterWorld infernofiasco! You should consider editing your post to remove your email address, as it is against the terms of service and, whats more, leaving it there would be a sure-fire way of getting an mailbox full of spam!

8:11 am on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 15, 2003
posts:51
votes: 0


Basically the host iam using doesnt support php or asp, this is why i have had to use this approach! thanks though :)
8:17 am on July 16, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 14, 2003
posts:1550
votes: 0


infernofiasco what about cgi-bin/perl? Most forms handlers are written in this and most ISP's can provide you with either a working CGI bin folder OR one of their own script to handle forms. Have you asked them?

Leo

8:28 am on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 15, 2003
posts:51
votes: 0


To be honest i have never used cgi/perl, so i wouldnt know where to start :(
8:38 am on July 16, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 14, 2003
posts:1550
votes: 0


There is script already written for you all you have to do is add fields in the form to tell the form handler were to send you the form, were to send the visitor once the form has been sent, if there was mandatory fileds, not to send the form before they were filled in ... it's really easy

have a look here:
[webmasterworld.com...]

Leo

8:59 am on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 15, 2003
posts:51
votes: 0


Do i need matts script to use that method?
9:14 am on July 16, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 14, 2003
posts:1550
votes: 0


yes but it's free and already configured.

Have a look for nms scripts on google and select a form handling one. The nms scripts seems to be more secure against spam.

Leo

9:23 am on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 15, 2003
posts:51
votes: 0


Thanks for your help, but its went straight over my head! iam going to try and find something in vbscript or javascript so it client side :)
11:09 am on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 15, 2003
posts:51
votes: 0


right iam gonna attempt to use a script, do i place the script in a cgi-bin directory beside my index file?
11:20 am on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 11, 2003
posts:198
votes: 0


do i place the script in a cgi-bin directory beside my index file

Usually yes.
It also might be neccessary to edit the "attributes" of the script executeables. The command is called "chmod" is available in most ftp-programs (check the context menu when you right click a file on the server). You need to get a chmod number of --> 755 <-- to not receive a server error when you call the page.

if with "index file" you mean your starting page like index.htm... -> that one should not go in a cgi-bin folder, but in the root or elsewhere.

universalis:

This kind of form using only a mailto: link won't work in newer browsers, including IE6

...Using only a mailto: link won't work in..... whaat?

11:26 am on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 15, 2003
posts:51
votes: 0


I changed my chmod to 755, created a directory called cgi-bin on my ftp, just starting to edit script to work! (hopefully)
11:30 am on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 11, 2003
posts:198
votes: 0


created a directory called cgi-bin on my ftp

Unless you are working in your own server environment (there is some more configuration neccessary to make that folder work) you should check your Web Hoster for an already existing cgi-bin directory. Usually hosters allow execution only in those predefined folders.

11:33 am on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 15, 2003
posts:51
votes: 0


there wasnt one, i cant seem to get hold of my host to find out! so iam going to try anyway
11:39 am on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 15, 2003
posts:51
votes: 0


<form name="form1" method="post" action="">

<input type="hidden" name="subject" value="enquiry from MCC Website">
<input type="hidden" name="recipient" value="scarr@mcclimited.co.uk">
<input type="hidden" name="required" value="form1">
<input type="hidden" name="redirect" value="../confirm.htm">

i have typed this in my index.htm, do i need to declare the script anywhere in the html?

11:40 am on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 11, 2003
posts:198
votes: 0


Just check them online technical documents (look for cgi or perl, etc.).
If this is a lower-budget hosting though, there might be the chance you can not upload your custom scripts.

Other possibility could be using php which - again usually - is not restricted to run in a certain directory.

<form name="form1" method="post" action="">

Yes, the scripts (path and) name is the *action*, like action="/cgi-bin/mailerscript.pl".

11:54 am on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 15, 2003
posts:51
votes: 0


is there a java/vb script that allows the "mailto:" command?
12:01 pm on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 11, 2003
posts:198
votes: 0


Well, I don't know what universalis meant... but you could try something like:

<a href="mailto:EMAILADDRESS" onclick="window.location= 'NEWWEBPAGE.HTML'">The Link</a>

Won't work for forms though.

1:20 pm on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 15, 2003
posts:51
votes: 0


I switched it around and got it to work perfectly! thank you :)
1:36 pm on July 16, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 14, 2003
posts:1550
votes: 0


See ain't WebmasterWorld a perfect place ;)

I am, as probably every other people here, glad I could be of help

Leo

2:08 pm on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 11, 2003
posts:198
votes: 0


Of course, you're mostly welcome.

Still, consider experimenting with that cgi/perl/php stuff - you won't believe what you can achieve with this so called "server-side-scripting". And it's rather easy too; check out some scripts, try to get them work, manipulate them to your desires...
A JavaScript solution has some drawbacks: (1) What if somebody has JavaScript deactivated? (2) So called Email-Harvester check websites for valid email-addresses (like in the mailto:) to add them into their spam-lists.

Regards

3:36 pm on July 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 15, 2003
posts:51
votes: 0


Ive just started using .asp, so iam a bit rough on all fronts (html included) so hopefully with help from the likes of this community i should be well on my way to discovering all the cool stuff to achieve! :) thanks again

Oh it ended up as:

<a href="confirm.htm" onclick="javascript:form1.submit()">Send</a>

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members