The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> form code fails using Safari browser, form works with most browsers but fails using Safari
dhemmer1
post Nov 19 2011, 08:11 PM
Post #1





Group: Members
Posts: 5
Joined: 19-November 11
Member No.: 15,900



I have developed a form using the code below.
It seems to work with IE and most PC's but fails on a MAC

this form submits data to my email address and upon compleation should direct
the user to a PayPal BUY button page.

on the MAC's when the submit button is hit the user is directed to their default email client.
On some MAC's after the emai is sent or closed they then go to the "BUY" page. On other MAC's they end up with a 404 error.

On PC everything seems to work properly.
When they SUBMIT the form, data is sent to my email and they are taken to the payPal BUY page.

Any help will be appreciated. biggrin.gif
Dave
================
<form action="http://www.SnapHost.com/captcha/send.aspx" method="GET" id="myform">
<input type="hidden" name="skip_WhereToSend"
value="nemo@example.com" />
<input type="hidden" name="skip_Subjec"
value="Calender Sales" />
<input type="hidden" name="skip_WhereToReturn"
value="www.mnpioneers.com/central/calendarsales/buy.htm" />
<input type="hidden" id="skip_SnapHostID" name="skip_SnapHostID"
value="WANY3J9XXJHR" />

misc form code is here

<!-- Do not remove this link or we will block your website!
Please refer to our ProCaptcha service which is ad-free -->

<a href="http://www.SnapHost.com/captcha/ProCaptchaOverview.aspx"
style="text-decoration:none; font-size:11px; font-family:Verdana, Arial, Helvetica; color:#000099;">

This web form is protected from SPAM by
<span style="text-decoration:underline;">SnapHost.com</span></a></td></tr>
<tr><td>
<input id="skip_CaptchaCode" name="skip_CaptchaCode" type="text"
style="width:130px; height:48px; font-size:38px;" maxlength="6" size="20" /><br />
<i>Enter Captcha code</i></td><td>
<a href="http://www.SnapHost.com/captcha/"><img
alt="Captcha Code" style="border-width:0px;" src="http://www.SnapHost.com/captcha/CaptchaImage.aspx?id=WANY3J9XXJHR" /></a>
</td></tr></table>
<a href="mailto:dhemmer1@xxx.com?subject=Calendar Sales"><input type="submit" name="submit" value="Submit"></a> <input
type="reset" name="B2" value="Reset"><br>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 19 2011, 09:39 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



I changed your email address to a dummy one so the bots won't get your real one. wink.gif

The URL here is probably wrong.
CODE
<input type="hidden" name="skip_WhereToReturn"
value="www.mnpioneers.com/central/calendarsales/buy.htm" />


A fully qualified URL must begin with 'http://'. Browsers (well, Safari anyway) will see that as a relative URL and resolve it relative the page the form is on. If the URL to the page with the form is http://example.com/form.html they will be sent to http://example.com/www.mnpioneers.com/cent...arsales/buy.htm which probably doesn't exist.

See http://htmlhelp.com/faq/html/basics.html#relative-url .
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
dhemmer1
post Nov 19 2011, 11:07 PM
Post #3





Group: Members
Posts: 5
Joined: 19-November 11
Member No.: 15,900



Thanks for the help. I made the suggested correction related to the URL.

Didn't fix the core problem though. What I have since learned is that on MAC's running any other browser but Safari they work just fine.
Safari sends the email with the data as it's supposed to but then it also pulls up a blank new email in the default email client. - shouldn't do that.
If the user sends the pulled up email or even closes it with out sending it then Safari seems to finish the script and pulls up the paypal "BUY" page.

I'm not at all famillar with the Apple world or Safari so any more help with this would be appreciated

biggrin.gif Dave
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Nov 19 2011, 11:17 PM
Post #4


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



Where is the </form> closing tag? Why do you not have a proper form Submit button, but a mailto: link instead? Basically mailto is asking for trouble.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 19 2011, 11:27 PM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



OK, another problem. I didn't read past the bad redirect URL before, but you have a peculiar link at the bottom that must be the cause of the email client being evoked.

CODE
<a href="mailto:dhemmer1@xxx.com?subject=Calendar Sales"><input type="submit" name="submit" value="Submit"></a>


You can't link a form control. Actually, I don't think it says explicitly in the spec that you can't, but it's something you just don't do. From your description, most browsers ignore the link, but Safari does not. I don't know why you have the mailto link there. If it's for a good reason, do it some other way. Otherwise just remove it.

[ADDED]
Brian, there is a submit button - inside the mailto link.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
dhemmer1
post Nov 20 2011, 10:05 AM
Post #6





Group: Members
Posts: 5
Joined: 19-November 11
Member No.: 15,900



Thank you very much.
Your suggestions were very helpful and I was able to figure out how to get the mailto; out of the code and now it works just fine.

Dave biggrin.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 02:46 AM