12-03-2008, 22:20
|
#1
|
|
while(!naked){--clothes}
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,086
|
IE7 Warning using forms
hey everyone,
I made a form a while back for my club and this sent info by opening up the persons email client and adding in information to the body of the email.
I tried another version of this form and it works great from FF to Thunderbird, but IE gives me a warning and does not put the information on the email body.
I get the warning screen below.
is there anyway I can get round this?
oh I am posting the form with text/plain
ik
__________________
Let me guess, you picked out yet another colorful box with a crank that I'm expected to turn and turn until OOP! big shock, a jack pops out and you laugh and the kids laugh and the dog laughs and I die a little inside.
|
|
|
13-03-2008, 12:58
|
#2
|
|
ntl,why not?
Join Date: Jan 2004
Location: N.E. Lincs
Age: 53
Posts: 124
|
Re: IE7 Warning using forms
I get this with IE6, as far as I could find out IE doesn't support this feature any more, it's a shame
|
|
|
13-03-2008, 13:06
|
#3
|
|
cf.procrastinator
Join Date: Oct 2004
Location: Nottingham
Posts: 1,314
|
Re: IE7 Warning using forms
If your server supports PHP, would be neater to send email server side (appropriately sanitised), and would also ensure it was in the format you specify. The user may not even have a mail client installed! Otherwise, what's the advantage to the form over just displaying your email address?
Sorry, perhaps not the most helpful of answers...
__________________
I brake for cake!
|
|
|
13-03-2008, 14:26
|
#4
|
|
cf.geek
Join Date: Jun 2003
Location: Swindon
Age: 36
Services: Virgin Media 2 for £20 (2Mbit & Phone), Sky+
Posts: 652
|
Re: IE7 Warning using forms
Quote:
Originally Posted by supered
I get this with IE6, as far as I could find out IE doesn't support this feature any more, it's a shame
|
In my opinion no browser should support this feature, not only is it so unreliable, but also very insecure.
It works by relying on the visitor having an email program installed, and it setup as the email client in their browser.
It never works with MS Outlook where I work, and I think it hardly ever works with webmail.
A server side solution is much better, PHP, ASP, perl etc, if your web host supports it.
If your host does not, I'd recommend using http://www.response-o-matic.com/ I used them years ago before I got decent hosting.
Mike
|
|
|
13-03-2008, 14:47
|
#5
|
|
.NET 2.0 Developer
Join Date: Jul 2006
Location: Sutton-In-Ashfield
Age: 30
Services: Software & Web Application Development
Posts: 2,323
|
Re: IE7 Warning using forms
I have a Contact Us form on my business site that I made, but I use my own class (server side in .NET) that sends the email. It doesn't use any client side email applications. Much better that way.
|
|
|
13-03-2008, 15:55
|
#6
|
|
while(!naked){--clothes}
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,086
|
Re: IE7 Warning using forms
problem is I think the site will be hosted on a virgin account.
thats why I was wanting it this way, damn ok then, I will get back to you about possible other langauges if they aggree to get it hosted on a paid server.
cheers though
ik
__________________
Let me guess, you picked out yet another colorful box with a crank that I'm expected to turn and turn until OOP! big shock, a jack pops out and you laugh and the kids laugh and the dog laughs and I die a little inside.
|
|
|
13-03-2008, 16:18
|
#7
|
Join Date: Jul 2003
Location: Poole, Dorset
Age: 23
Services: Sky+
V-Box
VM 10MBit
Posts: 9,762
|
Re: IE7 Warning using forms
Check out www.hostforweb.com for some v. good hosting prices
|
|
|
13-03-2008, 16:36
|
#8
|
|
cf.geek
Join Date: Feb 2008
Location: Gloucester
Services: V+
VM 20MB
VM Fixed Line
VM Mobiles
Posts: 581
|
Re: IE7 Warning using forms
If you give me a PM I can do you a "good deal" for your hosting - Starting at about £3.50 per month for you hosting. Inlcudes, PHP, MYSQL, cPanel etc!
Re: The Form - this is caused by the mailto:email@emailaddress problem - this form will only work if the user has outlook or a pop 3 program installed a setup - most people do - some people don't.
HTML Form
PHP Code:
<form method="POST" action="contact.php">
Fields marked (*) are required
<p>Salutation:<br>
<input type="text" name="Salutation">
<p>Name:<br>
<input type="text" name="Name">
<p>LastName:<br>
<input type="text" name="LastName">
<p>Tel:<br>
<input type="text" name="Tel">
<p>Mobile:<br>
<input type="text" name="Mobile">
<p><input type="submit" name="submit" value="Submit">
</form>
<p>
PHP Form - To be called contact.php
PHP Code:
<?php
// get posted data into local variables
$EmailFrom = "test@test.com";
$EmailTo = "test@test.com";
$Subject = "Test Form";
$Salutation = Trim(stripslashes($_POST['Salutation']));
$Name = Trim(stripslashes($_POST['Name']));
$LastName = Trim(stripslashes($_POST['LastName']));
$Tel = Trim(stripslashes($_POST['Tel']));
$Mobile = Trim(stripslashes($_POST['Mobile']));
// validation
$validationOK=true;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
exit;
}
// prepare email body text
$Body = "";
$Body .= "Salutation: ";
$Body .= $Salutation;
$Body .= "\n";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "LastName: ";
$Body .= $LastName;
$Body .= "\n";
$Body .= "Tel: ";
$Body .= $Tel;
$Body .= "\n";
$Body .= "Mobile: ";
$Body .= $Mobile;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.htm\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
}
?>
Last edited by webcrawler2050; 13-03-2008 at 16:40.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +1. The time now is 12:26.
|