Time:
Scotland: Fri, 8:03 pm Rhode Island: Fri, 3:03 pm Florida: Fri, 3:03 pm New Mexico: Fri, 1:03 pm California: Fri, 12:03 pm
Buy this Ad Space. 180px wide. Please get in touch with KH@ if you are interested and make an offer.
US$10 per year - Save $100s! The Fabulously Unfair WebX Auction Bar. For Ebay etc. Ro-Sham-Bo the opposition. Laugh like Eric Cartman when you win! CLICK HERE NOW!More information and sign-up.
WebXpertz Hosting. Custom fit from $5pm. PHP/MySQL You'll save money, we'll save money. Seems fair to me. Interested? If so Please PM me here and tell me what you need. Thanks!
|
For continued disscussion on this topic : passing values to a new popup window
dfred 07-10-2001, 05:50 PM Here is my issue. on my parent page I am running a loop to display one or many objects. beside each object I have a radio button that when pressed opens a popup window where some data is gathered. each radio button had a distinct name...radio1,radio2, ect. I need to pass that value of the radio button to the popup page so that when I submit the popup window back to the parent page, I can concatinate the name with the data entered in the popup window. this is passed to an action page and needs to be seperate from each object.
also using cold fusion to create the loop.
Hope someone can help.
DAN
hotpepper 07-10-2001, 06:25 PM Is this a different question than the one (http://www.webxpertz.net/forums/showthread.php?t=8515) you quoted on Friday?
dfred 07-10-2001, 06:53 PM no same question but nobody really responed so I stopped replying to myself and thought of reposting it in hopes of new interest.
The problem seems simple enough but I am not a JS expert.
Thanks for noticing my question(s).
Dan
hotpepper 07-10-2001, 06:58 PM Wish I could help you but I'm no better off than you. My JS, though improving, IMO is still quite rudimentary. And your question is beyond my abilities. :)
dfred 07-10-2001, 07:22 PM Not a problem...I figured that since there are many people that have posted questions about popup windows and many that were answered, somebody out there would know the answer.
Dan
Arielladog 07-10-2001, 07:29 PM Hey dfred,
I lost you when you got to here:
I can concatinate the name with the data entered in the popup window. this is passed to an action page and needs to be seperate from each object.
also using cold fusion to create the loop.
Can you explain that any better?
aDog :cool:
Traktopel 07-10-2001, 07:36 PM var ID = 0
function NewWindow1()
{
msgWindow=window.open("red_reason_popup.cfm?ID=1","displayWindow","toolbar=no,width=450,height=280,directories=no,status=no,scrollbars=no,resize=no,menubar=no")
}
I don't understand the use of the ID variable...? Also all in all I don't understand
quite well how all this works but one way to pass a value to the window you open
is via the URL, after the ? ( you already seem to be using this but what for? )
For eaxmple, in your loop, put:
<input type="radio" name="comp_condition_#loopcounter#" value="R" onclick="NewWindow1(#loopcounter#);">
( ColdFusion sure seems weird to me... :haha: )
then, in the function :
function NewWindow1(name) {
msgWindow=window.open("red_reason_popup.cfm?" + name,"displayWindow",
"toolbar=no,width=450,height=280,directories=no,status=no,scrollbars=no,resize=no,menubar=no");
}
and finally, in the page that gets opened (popup.cfm) add
var URL=location.href;
var name = URL.substring ( URL.indexOf('?')+1, URL.length );
and you get the number of the radio button in the name variable
is this fine?
dfred 07-10-2001, 09:09 PM to explain what I am trying to do...
I was able to pass a url parameter...comp_condition = "a num"
this number changes depending on which popup window is opened...1 for first one, 3 for third one, ect.
I now want to use that number (ex. 1) and cancatinate that number with any data that is added on the popup page.
example:
1-red_reason_info
this then will pass back to the parent page to be submitted to an action page.
I hope this helps...i have not checked out the code that someone sent me.
DAN
Arielladog 07-10-2001, 10:59 PM Hey dfred,
Could you just do something like this:
num = location.search.split("=")[1];
window.opener.document.receipt.A900COLORCODE.value = num+ "-" +document.red_reason.A900COLORCODE.value;
aDog :cool:
dfred 07-11-2001, 02:18 PM num = location.search.split("=")[1];
window.opener.document.receipt.A900COLORCODE.value = num+ "-" +document.red_reason.A900COLORCODE.value;
this seems to be what I want, but the [1] needs to be a variable not a static number. each time i open a popup window, that number needs to be whatever the url parameter (comp_condition) is weather it is 1, 2, 3, 5, 10, ect.
how would you suggest this?
DAN
dfred 07-11-2001, 03:25 PM Hey I was not a wake this morning. that code when I added to my page worked. I did not realize that the [1] was for an array. when I looked up what split was, i realized what was going on. Thanks for all your help.
DAN
vBulletin® v3.6.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.
|