Your making it to complex I think. Just submit the form using
target="new". Something like this...
<script>
function setFormParams(elem, type) {
if (type == 'preview') {
elem.action = 'letterPreview.cfm';
elem.target = 'new';
else if (type == 'complete') {
elem.action = 'completeForm.cfm';
}
elem.submit();
</script>
<form id="letter">
<input type="submit" id="preview" value="preview" onclick="setFormParams(this.form,
'preview')">
<input type="submit" id="complete" value="sumbit" onclick="setFormParams(this.form,
'complete')">
</form>
--
jon
mailto:[EMAIL PROTECTED]
Sunday, December 15, 2002, 2:59:04 AM, you wrote:
R> I am attempting to take values from a form that I have (it's a form that
R> chooses recipient, sender, letter to be sent, custom header, custom
R> footer and whether or not a password is sent to the user, for what it's
R> worth) and then pass them to a pop-up window for display/preview prior
R> to submitting and having all values combined into the email and sent,
R> and then added to the database.
R> I've found a couple of Javascript methods for handling this, but I'd
R> prefer to keep the pop-up page reading the CF values--which it's not;
R> it's saying that my FORM.values are undefined.
R> Ideally, I'd simply like to pass all my values to the popup, display
R> them, have a window.close and then allow the user to submit the letter,
R> if they so choose, but right now, I'm not correctly passing anything.
R> Here's what I'm working with (and it's probably butchered after a few
R> tries here, so please bear with me):
R> (button): <input name="Submit2" type="Button" class="ButtonInv"
R> onClick="newWin()" value="Preview Letter">
R> <SCRIPT language="javascript" type="text/javascript">
R> <!--
R> <!--- Form name = Letter; trying to see if I can manipulate the code
R> below to work for me; failing horribly --->
R> <!--- document.Letter.action="letterPreview"; --->
R> <!--- document.Letter.submit() --->
R> function newWin(){
R> var confirmWin =
R> window.open('letterPreview.cfm','','width=800,height=600,scrollbars=yes,
R> left=380,top=0')
R> if(confirmWin.opener==null){
R> confirmWin.opener = self;
R> }
R> }
//-->>
R> </SCRIPT>
R> And now, my head's starting to spin and I'm getting a little lost.
R> Any assistance?
R> Thanks very much!
R> Russ
R>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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.