Passing multiple values back from popup?

2002-07-30 Thread Kris Pilles

I'm trying to pass multiple values back to my form from a popup...
Bascialyl I want to pass the value and the display of my select from the
popup back to the form Can anyone tell me how to do this???



-Original Message-
From: Thane Sherrington [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, July 30, 2002 12:52 PM
To: CF-Talk
Subject: Re: How to Display a Page incase of Timeout?


At 12:48 PM 7/30/02 -0400, Paul wrote:
Thanks for the reply Isaac,

 I tried placing the following code in the application.cfm page but
 the user is not logged in until they enter the members area of the
site. 
 Will this code work outside of the application page? Currently the 
 loginid is not declared in the application page.

cflock scope=session type=readonly timeout=10
cfset loggedin = YesNoFormat(IsDefined(session.loginid))
/cflock

cfif not loggedin
cfinclude template=loginform.cfmcfabort
/cfif

I'm not sure what you're doing here, but you could do:

cflock scope=session type=readonly timeout=10
 cfif not IsDefined(Session.LoginID)
 cfinclude template=loginform.cfm
 [Put your various closing stuff here /body /html
etc, 
if not in your loginform.cfm file.]
 cfabort
 /cfif
/cflock

If you put this code (and the login code) in your application.cfm file,
it 
will run on every page, protecting each.


T



__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Passing multiple values back from popup?

2002-07-30 Thread Douglas Brown

You will need to use js to do it.


Basically, 

in your popup window you will put a script in like so

script
function writeResults(){
opener.document.formName.fieldName.value = document.formName.fieldName.value;
window.close();
}

and then call the function in your submit button



Douglas Brown
Email: [EMAIL PROTECTED]
- Original Message - 
From: Kris Pilles [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, July 30, 2002 9:57 AM
Subject: Passing multiple values back from popup?


 I'm trying to pass multiple values back to my form from a popup...
 Bascialyl I want to pass the value and the display of my select from the
 popup back to the form Can anyone tell me how to do this???
 
 
 
 -Original Message-
 From: Thane Sherrington [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, July 30, 2002 12:52 PM
 To: CF-Talk
 Subject: Re: How to Display a Page incase of Timeout?
 
 
 At 12:48 PM 7/30/02 -0400, Paul wrote:
 Thanks for the reply Isaac,
 
  I tried placing the following code in the application.cfm page but
  the user is not logged in until they enter the members area of the
 site. 
  Will this code work outside of the application page? Currently the 
  loginid is not declared in the application page.
 
 cflock scope=session type=readonly timeout=10
 cfset loggedin = YesNoFormat(IsDefined(session.loginid))
 /cflock
 
 cfif not loggedin
 cfinclude template=loginform.cfmcfabort
 /cfif
 
 I'm not sure what you're doing here, but you could do:
 
 cflock scope=session type=readonly timeout=10
  cfif not IsDefined(Session.LoginID)
  cfinclude template=loginform.cfm
  [Put your various closing stuff here /body /html
 etc, 
 if not in your loginform.cfm file.]
  cfabort
  /cfif
 /cflock
 
 If you put this code (and the login code) in your application.cfm file,
 it 
 will run on every page, protecting each.
 
 
 T
 
 
 
 
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Passing multiple values back from popup?

2002-07-30 Thread S . Isaac Dealey

 I'm trying to pass multiple values back to my form from a popup...
 Bascialyl I want to pass the value and the display of my select from the
 popup back to the form Can anyone tell me how to do this???



 -Original Message-
 From: Thane Sherrington [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 12:52 PM
 To: CF-Talk
 Subject: Re: How to Display a Page incase of Timeout?


 At 12:48 PM 7/30/02 -0400, Paul wrote:
Thanks for the reply Isaac,

 I tried placing the following code in the application.cfm page but
 the user is not logged in until they enter the members area of the
 site.
 Will this code work outside of the application page? Currently the
 loginid is not declared in the application page.

cflock scope=session type=readonly timeout=10
cfset loggedin = YesNoFormat(IsDefined(session.loginid))
/cflock

cfif not loggedin
cfinclude template=loginform.cfmcfabort
/cfif

 I'm not sure what you're doing here, but you could do:

 cflock scope=session type=readonly timeout=10
  cfif not IsDefined(Session.LoginID)
  cfinclude template=loginform.cfm
  [Put your various closing stuff here /body /html
 etc,
 if not in your loginform.cfm file.]
  cfabort
  /cfif
 /cflock

 If you put this code (and the login code) in your application.cfm file,
 it will run on every page, protecting each.

You really don't want to use cfinclude within a cflock ... but the code
I provided above does the same thing -- ( without putting the cfinclude
inside the cflock ) and will as you said, protect every page -- and it
doesn't require the login variables to be declared within the application
cfm, so it should work with the existing setup.

Thane: If you're getting an error from the code I supplied, what is the
error? and of course, did you modify it at all and if so how so?

Isaac Dealey
Certified Advanced ColdFusion Developer

www.turnkey.to
954-776-0046
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Passing multiple values back from popup?

2002-07-30 Thread Bruce, Rodney S HQISEC/SIGNAL

I just had a similar issue:

I did something like this:

!---calls the popup
SCRIPT
function getdevicename(){
showModalDialog(yourtemplete.cfm,window,help: no;
unadorned:; height:400; width: 350; screenX:10; screenY:10);
}

!-function(s) that can be called form subwindow to enter returned
values into form-
function enterinfo(){
document.myform.field1.value = value1;
document.myform.field2.value = value2;
}

/SCRIPT


!---THen you can call this function on the subwindow like this---
SCRIPT
function returnvals(){
var callerWindowObj = dialogArguments;
callerWindowObj.value1 = document.subform.field1.value;
callerWindowObj.value2 = document.subform.field2.value; 
callerWindowObj.enterinfo();
window.close();
/SCRIPT

Hope this helps
Rodney



-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 1:07 PM
To: CF-Talk
Subject: Re: Passing multiple values back from popup?


 I'm trying to pass multiple values back to my form from a popup...
 Bascialyl I want to pass the value and the display of my select from the
 popup back to the form Can anyone tell me how to do this???



 -Original Message-
 From: Thane Sherrington [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 12:52 PM
 To: CF-Talk
 Subject: Re: How to Display a Page incase of Timeout?


 At 12:48 PM 7/30/02 -0400, Paul wrote:
Thanks for the reply Isaac,

 I tried placing the following code in the application.cfm page but
 the user is not logged in until they enter the members area of the
 site.
 Will this code work outside of the application page? Currently the
 loginid is not declared in the application page.

cflock scope=session type=readonly timeout=10
cfset loggedin = YesNoFormat(IsDefined(session.loginid))
/cflock

cfif not loggedin
cfinclude template=loginform.cfmcfabort
/cfif

 I'm not sure what you're doing here, but you could do:

 cflock scope=session type=readonly timeout=10
  cfif not IsDefined(Session.LoginID)
  cfinclude template=loginform.cfm
  [Put your various closing stuff here /body /html
 etc,
 if not in your loginform.cfm file.]
  cfabort
  /cfif
 /cflock

 If you put this code (and the login code) in your application.cfm file,
 it will run on every page, protecting each.

You really don't want to use cfinclude within a cflock ... but the code
I provided above does the same thing -- ( without putting the cfinclude
inside the cflock ) and will as you said, protect every page -- and it
doesn't require the login variables to be declared within the application
cfm, so it should work with the existing setup.

Thane: If you're getting an error from the code I supplied, what is the
error? and of course, did you modify it at all and if so how so?

Isaac Dealey
Certified Advanced ColdFusion Developer

www.turnkey.to
954-776-0046

__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Passing multiple values back from popup?

2002-07-30 Thread S . Isaac Dealey

 I'm trying to pass multiple values back to my form from a popup...
 Bascialyl I want to pass the value and the display of my select from the
 popup back to the form Can anyone tell me how to do this???

oops! Forgot to answer the question in my last reply ...

Using javascript, you would return variable using window.opener ... i.e.

select onchange=myfunction();.../select

script language=javascript
function myfunction() {
sel = document.myform.myselect;
window.opener.document.myform.myhiddenfield.value = sel.value;
window.opener.document.myform.myhiddenfield2.value =
sel.options[sel.selectedIndex].someproperty
}
/script

I don't remember the name of the property for the label off the top of my
head, sorry...

Isaac Dealey
Certified Advanced ColdFusion Developer

www.turnkey.to
954-776-0046
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists