Sorry...

Outlook snafu; probably my fault, entirely...

Okay, I've gotten it to work now...

Javascript as follows:

<script language="JavaScript" type="text/JavaScript">

function Preview() { 
//'LetterPreview','toolbar=yes,location=yes,status=yes,menubar=yes,scrol
lbars=yes,resizable=yes'
var previewWindow;

previewWindow =
window.open("","LetterPreview","toolbar=no,location=no,status=no,menubar
=no,scrollbars=yes,resizable=no,height=600,width=525");

document.Letter.action = "letterPreview.cfm";
document.Letter.target = "LetterPreview";
document.Letter.submit();
//document.Letter.action="letterPreview.cfm";
//document.Letter.submit()
return true;
}

function Send() {
document.Letter.action = "letterSendUpdate.cfm";
document.Letter.target = "_self";
document.Letter.submit();
return true;
}
//-->
</script>

And the button code:

<input name="btnPreview" type="button" class="ButtonInv"
onClick="Preview();" value="Preview Letter">

The SQL on the Preview page simply works from the FORM.elements:

<CFQUERY NAME="qLetters" DATASOURCE="FasterDesigns">
        SELECT  *
        FROM    tblLetters
        WHERE   letterID = #FORM.letter#
</CFQUERY>
<CFQUERY NAME="qAdmin" DATASOURCE="FasterDesigns">
        SELECT  *
        FROM    tblUsers 
        WHERE   userRole = 1
        AND             userID = #FORM.admin#
</CFQUERY>
<CFQUERY NAME="qClient" DATASOURCE="FasterDesigns">
        SELECT  tblUsers.*
        FROM    tblUsers INNER JOIN tblProjects ON tblUsers.userID =
tblProjects.projectUser
        WHERE   projectID = #FORM.client#
</CFQUERY>

And all is well on the homefront.  A bit simpler than I expected, and
thanks to everyone for the insights, challenges and everything else that
got me thinking in the right direction.

Russ

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to