Solved

Dreamweaver CS3 Form Submit

Posted on 2009-03-29
7
710 Views
Last Modified: 2012-05-06
I have a membership application (https://www.lightningclass.org/membership/joinRenew/membershipApplication.asp?1) which needs to accomplish three things: log the transaction to a text file, send emails to the applicant and to the Exec Secretary, and submit to PayPal for payment. I have tested these processes out on IE7, Firefox 5.0 and Safari 3.2.2. They work perfectly. However, the Exec Secretary is telling me that an estimated 30% of the applications don't work. We're trying to track down specifics, but most of the members have no idea what browser version they are using.

When testing out the new site I tried to test with IE6, but since you can't have two versions of IE running at the same time I had to give up on IE6. I was also told by one of your members that IE6 is about the worst version MS ever implemented. But I'm wondering if IE6 could be one of the problems. I spoke with another individual running IE6 that his system wouldn't display a page that contains a map, hot spots, and officer listings from an Access database. The problem was solved when he upgraded to IE7. The application form also retrieves info from an Access database for the dropdown lists, but that isn't where the problem is occurring. In most instances it complete the logging and emailing but hangs/quits before submitting to PayPal.

Here is the submit in the application form to accomplish the logging/emailing:
      
      document.emailForm.target = '_blank';
      document.emailForm.submit();
      
      // Add Delay..
      setTimeout (function () { ; }, 900);

Here is the VBScript code to return to the application to complete with the submittion to PayPal:
      msg.Configuration.Fields.Item _
      ("http://schemas.microsoft.com/cdo/configuration/sendusing")=1
      'Name or IP of remote SMTP server
      msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.aplus.com"
      'Server port
      msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
      msg.Configuration.Fields.item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup"  
      msg.Fields.item("http://schemas.microsoft.com/cdo/connectiontimeout") = 10

      msg.Configuration.Fields.Update
      msg.send
      %>      
      <script language="javascript">
      <!--
      window.open('','_parent','');
      window.close();      
        //-->
      </script>
After returning to the application form:
      document.paypalForm.submit();
      document.membershipApp.cartTotal.value = "";

When I initially developed this method over two years ago, we had the same porblem - around 70% worked, the others didn't for some unknown reason. I did struggle with getting all this accomplished with one submit. Does anyone see anything that could be causing a problem?
      <%
'      response.redirect redir
end if
set msg = nothing
%>
0
Comment
Question by:slegy
  • 4
  • 2
7 Comments
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 250 total points
ID: 24016307
Hi slegy,

ASP is not my thing, but I'll try.

>> an estimated 30% of the applications don't work.

What does "not work" mean exactly?

>> but most of the members have no idea what browser version they are using.

Do you have access to the server logs?  You should be able to see what is happening in those and get browser versions.

>> but since you can't have two versions of IE running at the same time I had to give up on IE6.

Look into VMware.  You can run multiple browsers but you have to virtualize to do it.

>> In most instances it complete the logging and emailing but hangs/quits before submitting to PayPal.

It is entirely possible that the script is crapping out on the javascript open depending on a combination of browser and other security software.  How is the payment being sent to PayPal.
0
 
LVL 25

Assisted Solution

by:Rouchie
Rouchie earned 250 total points
ID: 24018192
Okay here's my 50c worth.

>>> an estimated 30% of the applications don't work.
>>What does "not work" mean exactly?

Yes if you can explain what other people are/are not receiving, or if they are getting errors that would help.


>> but most of the members have no idea what browser version they are using.

Just plug in a free visitor tracker (like Google Analytics or StatCounter) to get that information easily.


>> It is entirely possible that the script is crapping out on the javascript open

Javascript over the years has been a real pain due to the different ways that each browser vendor implemented it.  So yes, IE5 and 6 were particularly painful, and code often didn't run as expected.  Most JavaScript writers added lots of extra code to ensure that their pages worked in these browsers too, but it is a long and hard process.

I would strongly recommend doing ALL of your validation on the server-side.  This means writing all the checks in ASP (like we did before) which removes any failing points from the user's side.

By doing this, you could first log the data into the text file (after validation of course), send the emails, then dynamically write the JavaScript using ASP and get it to submit automatically, so only the final javascript redirect to PayPal is actually being performed by the user's browser.

It might make you sigh after doing all that work with javascript forms(!), but in the long run you have a more robust and reliable solution that is easier to debug.
0
 

Author Closing Comment

by:slegy
ID: 31564070
Thanks guys. I was hoping that the JavaScript that handles the return to the application page could have been done differently. I can't exactly pinpoint what happens because I'm getting all the reports second hand from applicants who haven't a clue. But by "doesn't work" I believe it most often refers to the process hanging either trying to return to the app page and/or accomplishing the submit to PayPal. I just checked and I don't have access to server logs, as we are running on a shared server. I may be able to track down one reported error and have the aplus.net admins check (probably a long shot). And, VMware appears to be very expensive. I may try to put IE6 on my other machine and at least try to determine if it is the culprit. Rouchie, yes, I knew after our last go around that this is a prime candidate for rewrite, but it is a complete shopping cart application so it would not be a small effort. . .but, it appears that it is the best route to go. I'll close this for now. When I finally do tackle the effort I'm sure I'll need more help - and you two are the BEST! Thank you again.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24021433
I'm pretty sure there is a free, lite, version of VMware but I might be getting confused with VirtualBox (virtualbox.org)
0
 
LVL 25

Expert Comment

by:Rouchie
ID: 24021642
Yeah I'm sure Microsoft's latest incarnation is free too.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24021673
Virtual PC, right?
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24021681
I'm slowly moving over to Ubuntu for all but one desktop so I'm now thinking in their terms.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now