window.open('http://www.urlname/newsletter/admin/ebomb_pop.cfm?&bombsaway=tr
ue&subject=#form.subject#&emailtype=#form.emailtype#&whichtable=#form.whicht
able#&town=#form.town#','ScapeBomb','width=300,height=300,toolbar=no,locatio
n=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes');
need pound signs around your form vars here
_____
From: Mark Henderson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 15, 2004 10:52 PM
To: CF-Talk
Subject: Problem with passing values to popup
Here is my dilemma. I'm using Matt Robinson's mail script (found here
http://mysecretbase.com/Slowing_Down_CFMAIL.cfm) to slow down cfmail.
However, I want to open the cfmail page in a popup window (launched from a
form) and have certain form fields passed to this window. Some code will
help explain. In the form, the client chooses which database they want to
mail to....
=========================
in dsp_emailUsers.cfm
<cfparam name="subject" default="">
<cfparam name="emailtype" default="">
<cfparam name="town" default="">
<cfparam name="whichtable" default="">
<script type="text/_javascript_">
function formpop() {
formWin =
window.open('http://www.urlname/newsletter/admin/ebomb_pop.cfm?&bombsaway=tr
ue&subject=form.subject&emailtype=form.emailtype&whichtable=form.whichtable&
town=form.town','ScapeBomb','width=300,height=300,toolbar=no,location=no,dir
ectories=no,status=no,menubar=no,scrollbars=no,resizable=yes');
if (formWin && !formWin.closed)
formWin.focus();
return true;
}
</script>
<h2>S'cape Mailer </h2>
<cfoutput>
<form method="post" action=""> name="scapemailer" class="center" formpop()"></cfoutput>
Subject: <br />
<input type="text" name="subject" size="50" style="margin-top:5px;" />
<input type="radio" name="emailtype" value="text" class="radio" />
Plain text
<input type="radio" name="emailtype" value="html" class="radio" />
HTML<br /><br />
Choose a database:
<input type="radio" name="whichtable" value="client_test"
class="radio" />
Send Test
<input type="radio" name="whichtable" value="client" class="radio"
/>
Go Live
</div>
<input name="submit" type="submit" value="Send mail" class="button" />
</div>
</form>
<cfelse>
<cflocation URL=""> </cfif>
THis seems to be fine, UNTIL it goes to query the email database with the
whichtable variable...
in the ebomb_pop.cfm file
=================
<cfset admin_mail = "[EMAIL PROTECTED]">
<cfset ebomb_filename = "scapebomb_test.html">
<cfset request.dsn="scape">
<!--- TEST THREAD --->
<!--- Run Rate is the number of seconds between refresh --->
<cfset variables.RunRate=20>
<!---
Query Run is the number of query rows (email addresses)
that will be processed on each execution of this template
--->
<cfset variables.QueryRun=5>
<!---
pull the email addresses. Cache this query since its
going to be re-used every few seconds.
--->
<cfquery
datasource="#request.dsn#"
name="MailList"
cachedwithin="#CreateTimeSpan(0,1,0,0)#">
SELECT
FROM
#whichtable#
WHERE
email IS NOT NULL
</cfquery>
etc etc
it barfs and returns a whacky msaccess application error about
'C:\winnt\form.mdb could not be found'. But if I hardcode either client, or
client_test, everything works fine. Any ideas why this is happening? It's
quite odd , bcos on the post process page of the original form, I checked by
outputting the value #whichtable#, and here things are just fine (it always
displays either client or client_test depending on which I have chosen).
Maybe I need to use _javascript_ to call the values in the popup?
Regards
Mark H
_____
[HYPERLINK "http://www.houseoffusion.com/lists.cfm/link=t:4"Todays Threads]
[HYPERLINK "http://www.houseoffusion.com/lists.cfm/link=i:4:178575"This
Message] [HYPERLINK
"http://www.houseoffusion.com/lists.cfm/link=s:4"Subscription] [HYPERLINK
"http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=678.598.4"Fast
Unsubscribe] [HYPERLINK "http://www.houseoffusion.com/signin/"User Settings]
[HYPERLINK
"https://www.paypal.com/cgi-bin/webscr?amount=&item_name=House+of+Fusion&bus
iness=donations%40houseoffusion.com&undefined_quantity=&cmd=_xclick"Donation
s and Support]
_____
HYPERLINK "http://www.houseoffusion.com/banners/view.cfm?bannerid=36" \n
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.759 / Virus Database: 508 - Release Date: 9/9/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.759 / Virus Database: 508 - Release Date: 9/9/2004
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

