11 Replies Latest reply on Dec 7, 2009 1:12 AM by pyae phyoe shein

    passing variables to a pop-up window not working

    Irish-Phoenix Level 1




      I'm trying to pass records to a popup window and I can't get it to work properly. Can anyone help me figure out what I'm doing wrong? I'm stumped!


      This is my code:


      the link that spawns it and the java script used for the window:


      <SCRIPT LANGUAGE="JavaScript" type="text/javascript">
      <!-- Begin
      function NewWindow(mypage, myname, w, h, scroll) {
      var winl = (screen.width - w) / 2;
      var wint = (screen.height - h) / 2;
      winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
      win = window.open(mypage, myname, winprops)
      if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
      //  End -->


      <a href="detail.cfm?ID=#ID#" onClick="NewWindow(this.href,'name','450','310','yes');return false;" class="dateNav">#place3#, #place2#</a>


      here is the code for the query on the page in the pop up window:


      <cfparam name="url.ID" type="integer" default="0">
      <cfparam name="variables.ID" type="integer" default="#url.ID#">

      <cflock timeout="2" scope="SESSION" type="READONLY">
      <CFQUERY name="getBaby" datasource="#APPLICATION.dataSource#" cachedwithin="#CreateTimeSpan(0, 6, 0, 0)#">
      SELECT nursery.MyImage AS place1, nursery.BFname AS place2, nursery.BLname AS place3, nursery.Blb AS place4, nursery.Bht AS place5, nursery.Date_Born AS place6, nursery.ID AS ID
      FROM nursery
      WHERE nursery.ID = <cfqueryparam value="#url.ID#" cfsqltype="cf_sql_integer">
      <cfset getBaby=getBaby>


      I am obviously missing something here, but can't figure out what it is.