SunQuest
           Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old June 28th, 2001, 05:29 AM
Carmine D Carmine D is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: Toronto,Ontario
Posts: 1 Carmine D User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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

Reply With Quote
  #2  
Old June 28th, 2001, 09:06 AM
carmine22 carmine22 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Toronto
Posts: 5 carmine22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Opps I just realized that I posted to the wrong group sorry

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Passing a variable to a pop up window


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway