#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    Toronto,Ontario
    Posts
    1
    Rep Power
    0

    Passing a variable to a pop up window


    Hi I am tryng to pass a php variable using javascript to a new form in a pop up window using href. Heres how far I got it pops up the window

    main window
    <SCRIPT language="JAVASCRIPT" type="text/JAVASCRIPT">
    <!--
    function newWindow(){
    JobWindow=window.open("JobNotes.php","jobWin","width=330,height=300")
    JobWindow.focus()
    }


    -->
    </script>

    $result=mysql_query("SELECT DISTINCT Production.QuoteNumber,Production.DocketNumber,Estimating.Customer,Estimating.Shipping,Estimating.Jo bName,Production.Quantity,Production.Status
    FROM Production,Estimating
    WHERE Estimating.DocketNumber=Production.DocketNumber
    AND Production.Status='open'ORDER BY Customer LIMIT $offset,$limit");

    // now you can display the results returned


    while ($r = mysql_fetch_array($result)){
    $DocketNumber = $r["DocketNumber"];
    $Quantity = $r["Quantity"];
    $Customer = $r["Customer"];
    $JobName = $r["JobName"];
    $Status = $r["Status"];
    $QuoteNumber = $r["QuoteNumber"];
    $Shipping = $r['Shipping'];





    if (!$QuoteNumber) {
    $Quote="<font color=\"#CC0000\" face=\"Arial, Helvetica, sans-serif\"><b>Add Quote !</b></font>";

    }else{
    $Quote= "$QuoteNumber";
    }



    echo"<table width=\"400\" cellpadding=\"4\" cellspacing=\"0\" bgcolor=\"#CCCCCC\" border=\"0\" align=\"center\">
    <tr><td valign=\"middle\"><font face=\"helvetica\"><b>$Customer</b></font></td><td align=\"right\" valign=\"middle\">
    <font face=\"helvetica\">

    <a href=\"Production.php?DocketNumber=$DocketNumber\">Production</a>
    </font>
    </td></tr>
    </table>
    <table width=\"400\" cellpadding=\"4\" cellspacing=\"0\" bgcolor=\"#EEEEEE\" border=\"0\" align=\"center\">
    <tr>
    <dd>Docket Number : $DocketNumber &nbsp;&nbsp;&nbsp;&nbsp; Quote Number : $Quote
    <dd>Job Name: <b>$JobName</b>
    <dd>Quantity: $Quantity

    <dd>Shipping : <font color=\"#CC0000\" face=\"Arial, Helvetica, sans-serif\"><b>$Shipping</b></font><br>

    <table width=\"400\" cellpadding=\"4\" cellspacing=\"0\" border=\"0\" align=\"center\">
    <td><a href=QuickLook.php?DocketNumber=$DocketNumber><img src=\"images/briefcase.gif\"border=\"0\" width=\"28\" height=\"25\"></td>
    <td align=center><a href=ViewJobNotes.php?DocketNumber=$DocketNumber><img src=\"images/glasses.gif\"border=\"0\" width=\"30\" height=\"20\"></td>
    ";

    ?>

    <td align=right valign=bottom><a href=javascript:newWindow('JobNotes.php?DocketNumber=#<?php echo"$DocketNumber"; ?>#')"><img src=images/dogear.gif width=30 height=40 border=0></a></td>
    <?php

    // in the pop up I just ask it to echo the DocketNumber to see if its passing the variable

    echo"DocketNumber-$DocketNumber";

    Thanks for any help you can offer
    Carmine
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Location
    Toronto
    Posts
    5
    Rep Power
    0
    Opps I just realized that I posted to the wrong group sorry

IMN logo majestic logo threadwatch logo seochat tools logo