Click to See Complete Forum and Search --> : trying to pass variables to a popup window via javascript


IndyB
08-01-2003, 03:33 PM
I have to pass some cf url variables to a popup window via a javascript function.

With four of the variables its no problem, but when I ad the fifth, the popup link does not work.

The fifth variable is a bit unique, I'm getting it from a dynamically created form, take a look:

<input type="text" name="ineligible_#set_id#_#line_id#" value="#loop.ineligible#">

- What I need is the Name attribute, not the Value as would normally be the case. To get the name, I'm doing this: <cfset ineligible_name = "ineligible_"&#set_id#&"_"&#line_id#>

This seems to work, b/c I can display #ineligible_name# and the correct names appear.

So the problem must be in my javascript... and like I said, it all works fine until I ad the #ineligible_name# variable. Please check it out and see if you notice anything wrong. Thanks.

-------- Here's the code --------
<td><a href="javascript: worksheet (#page.claim_id#,#set_id#,#line_id#,#line_amount_pass#,#ineligible_name#)"><img src="/pics/button.magnify.gif" width="17" height="21" border="0"></a></td>

<script>
function worksheet(claim_id,set_id,line_id,line_amount_pass,ineligible_name)
{
url = "/application/claims/admin/adjudicate/popup.worksheet.fee_schedule.cfm?claim_id="+claim_id+"&set_id="+set_id+"&line_id="+line_id+"&line_amount="+line_amount_pass+"&ineligible_field="+ineligible_field;

dopopup(url,'#replace(createuuid(), "-", "_", "All")#',Number(screen.availWidth-200),Number(screen.availHeight-300),0,0,'yes','yes','yes','yes','yes','yes','yes','yes','yes','yes');
}
</script>

dgcotton
09-01-2003, 05:33 PM
Did you ever get this resolve3d? I am trying to a very simular thing and am running into the same issue.

Khalid Ali
09-01-2003, 06:08 PM
I am not familiar with CF,you will have to be very carefull in making sure that there is not strange character such as # in the anywhre in the js ,because you never know when any one of those is causing problem.

Here is a link where you can see window communications with javascript.

http://www.webapplikations.com/pages/html_js/window/ParentWinInteractionWithChildWin.html