Smart Mailer ASP Support Product Page

This topic was archived

Sending Without Clicking Submit Button

Reported 16 Dec 2003 01:56:36
1
has this problem
16 Dec 2003 01:56:36 Kym Harper posted:
I have a page with a form (form1) where I select recipients for a newsletter.

On submit, it goes to my page which displays the recipients (tested OK) in a form (form2) and this page contains SmartMailer ASP.

Mail is sent to the selected recipients OK but it does not wait for me to click Submit (on Form2) it just goes to the redirect page after sending.

I found this before where if the Smart Mailer page is on a page following another page with a form/submit, the submit button on the page with mailer seems to be automatically clicked <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Any fixes for this?

Thanks in advance.


Mail is sent

Replies

Replied 16 Dec 2003 14:37:28
16 Dec 2003 14:37:28 Patrick Woldberg replied:
I think this is because it detects the submit from the previous page. You should put in an extra check to see if it submits from the current page, place some kind of hidden field in form2 and check in the if statement of Smart Mailer if this hiddenfield is submitted

--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
Replied 16 Dec 2003 14:53:48
16 Dec 2003 14:53:48 Kym Harper replied:
Yes Patrick (and thankyou for the reply),
It does detect the Submit from the previous page (form1).

The contents of form 2 on page 2 with SmartMailer ASP are being sent fine.

My problem is I don't want it to send the mail until I click Submit on page2/form2 and can't figure out how to stop it from sending automatically (due to clicking submit on the previous page)
Replied 16 Dec 2003 17:21:04
16 Dec 2003 17:21:04 Patrick Woldberg replied:
Send me the pages to and I will look how to stop it sending automatically.

--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
Replied 17 Dec 2003 14:06:03
17 Dec 2003 14:06:03 Mazhar Khan replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>

It does detect the Submit from the previous page (form1).

My problem is I don't want it to send the mail until I click Submit on page2/form2 and can't figure out how to stop it from sending automatically (due to clicking submit on the previous page)
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Change the name of the submit button to say SUBMIT1 and then wrap the "smart asp mailer" code if then statement. Something like this:

&lt; % if request(SUBMIT1) &lt;&gt; "" then
... asp mail code ...
end if
%&gt;
You might have to remove it when reapplying the extension or modifying the code.

Hope this help
Regards
Farhad
Replied 17 Dec 2003 15:36:33
17 Dec 2003 15:36:33 Kym Harper replied:
Thanks Farhad,

Patrick solved this a little earlier for me via e-mail but I will try your idea seeing as you went to so much trouble.

For those following the thread or with similar problems, Patrick's solution was as follows:-

<i>In your form on the second page add a hidden field like</i>

&lt; input type="hidden" name="sendmail" value="true" &gt;

<i>and then change the if statement from Smart Mailer</i>

if Request.ServerVariables("REQUEST_METHOD" = "POST" then

<i>into</i>

if Request.Form("sendmail" = "true" then


Thanks All.
regards
Kym Harper

Reply to this topic