close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Why does FireFox hate this code?

Thread began 10/04/2011 7:43 pm by ccooper309155 | Last modified 10/05/2011 4:59 pm by ccooper309155 | 878 views | 7 replies |

ccooper309155

Why does FireFox hate this code?

Here is the UE 3.0.7 ASP code from a web page with a form. Works fine with IE8, IE9 and Chrome.

Firefox, however, just returns to a blank form w/o sending the email.

Any idea why? Thanks for any help.



<!--#include file="WA_Universal_Email/CDOSYS_VB.asp" -->
<!--#include file="WA_Universal_Email/MailFormatting_VB.asp" -->
<%
function WA_Universal_Email_1_SendMail(RecipientEmail)
dim MailObject, MailAttachments, MailBCC, MailCC, MailTo, MailBodyFormat, MailBody, MailImportance, MailFrom, MailSubject
MailAttachments = ""
MailBCC = ""
MailCC = ""
MailTo = ""
MailBodyFormat = ""
MailBody = ""
MailImportance = ""
MailFrom = "" & cStr(cStr(Request.Form("FromName"))) & "|WA|" & cStr(cStr(Request.Form("FromEmail"))) & ""
MailSubject = "A totally unexpected link from bigdaddystarch.com"

'Global Variables
gAddBCC = ""
gAddCC = ""
gAddRecipient = ""
gBodyFormat = ""
gSetImportance = ""

set WA_MailObject = WAUE_Definition("mail.bigdaddystarch.com","25","","notemail@bigdaddystarch.com","notpassword","1")

if (RecipientEmail <> "") then
set WA_MailObject = WAUE_AddRecipient(WA_MailObject,RecipientEmail)
MailTo = gAddRecipient
gAddRecipient = ""
else
'To Entries
end if

'Attachment Entries

'BCC Entries
set WA_MailObject = WAUE_AddBCC(WA_MailObject,"giblets@bigdaddystarch.com")
MailBCC = gAddBCC

'CC Entries
MailCC = gAddCC

'Character Set
set WA_MailObject = WAUE_SetCharset(WA_MailObject,"ISO-8859-1")

'Body Format
set WA_MailObject = WAUE_BodyFormat(WA_MailObject,0)
MailBodyFormat = gBodyFormat

'Set Importance
set WA_MailObject = WAUE_SetImportance(WA_MailObject,"3")
MailImportance = gSetImportance

'Start Mail Body
MailBody = MailBody & "<html><head><style type=" & Chr(34) & "text/css" & Chr(34) & ">" & vbCrlf & ""
MailBody = MailBody & "<!--" & vbCrlf & ""
MailBody = MailBody & "body,td,th {" & vbCrlf & ""
MailBody = MailBody & " font-family: Arial, Helvetica, sans-serif;" & vbCrlf & ""
MailBody = MailBody & " font-size: 12px;" & vbCrlf & ""
MailBody = MailBody & "}" & vbCrlf & ""
MailBody = MailBody & "-->" & vbCrlf & ""
MailBody = MailBody & "</style></head><body>" & vbCrlf & ""
MailBody = MailBody & "" & vbCrlf & ""
MailBody = MailBody & "<p>Hey "
MailBody = MailBody & cStr(Request.Form("ToName"))
MailBody = MailBody & "</p>" & vbCrlf & ""
MailBody = MailBody & "<p>Apparently, I've gotten the silly idea into my head that you may actually be interested in this:<BR>" & vbCrlf & ""
MailBody = MailBody & " <BR>" & vbCrlf & ""
MailBody = MailBody & " <a href=" & Chr(34) & "http://www.bigdaddystarch.com/"
MailBody = MailBody & cStr(Request.QueryString("URLEND"))
MailBody = MailBody & "" & Chr(34) & ">http://www.bigdaddystarch.com/"
MailBody = MailBody & cStr(Request.QueryString("URLEND"))
MailBody = MailBody & "</a></p>" & vbCrlf & ""
MailBody = MailBody & "<p>"
MailBody = MailBody & cStr(Request.Form("AddiMess"))
MailBody = MailBody & "</p>" & vbCrlf & ""
MailBody = MailBody & "<p>Yours unruly,</p>" & vbCrlf & ""
MailBody = MailBody & "<p>"
MailBody = MailBody & cStr(Request.Form("FromName"))
MailBody = MailBody & "</p>" & vbCrlf & ""
MailBody = MailBody & "<p>&nbsp;</p>" & vbCrlf & ""
MailBody = MailBody & "</body></html>"
'End Mail Body

set WA_MailObject = WAUE_SendMail(WA_MailObject,MailAttachments,MailBCC,MailCC,MailTo,MailImportance,MailFrom,MailSubject,MailBody)

set WA_MailObject = nothing
end function
%>
<%
if ((cStr(Request.Form("btnSend")) <> "")) then
'WA Universal Email object="CDOSYS"
'Send Loop Once Per Entry
WA_Universal_Email_1_SendMail("" & cStr(cStr(Request.Form("ToEmail"))) & "")

'Send Mail All Entries
if ("http://www.bigdaddystarch.com/" & cStr(Request.QueryString("URLEND"))<>"") then
Response.Redirect("http://www.bigdaddystarch.com/" & cStr(Request.QueryString("URLEND")))
end if
end if
%>

Sign in to reply to this post

Jason ByrnesWebAssist

please send a link where i can see this and a copy of the page compressed into a zip archive so I can see the entire page code in context

Sign in to reply to this post

ccooper309155

Hi Jason

Here is the link:

aboutme.asp

How do I send you a zip file of the page?

Sign in to reply to this post

Jason ByrnesWebAssist

when replying to the thread, go to the Additional Options section, and click the Manage Attachments button

Sign in to reply to this post

ccooper309155

Okay, attached the ASP page in a ZIP file.

Just sanitized it a little bit by changing authentication email address and password. Otherwiise it is "as is."

Thanks.

Attached Files
emailLink.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the html5 form plugin code is causing the problem.

remove this code from the page:
<script>
$(document).ready(function(){
$('#frmMail').html5form();
});
</script>


and it will start working.

Sign in to reply to this post

ccooper309155

I'll try that.

Firefox seems to struggle with javascript.

Sign in to reply to this post

ccooper309155

Thanks Jason -- it worked!

Except I didn't actually remove the javascript. It's there for the sake of IE8 et al, so I made it conditional using <!--[if lte IE 8]>

Thanks.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...