You are here: Re: passing php variables with javascript? « PHP Programming Language « IT news, forums, messages
Re: passing php variables with javascript?

Posted by Matthew256 on 11/09/06 16:49

dkirkd...@yahoo.com wrote:
> I am trying to open a small new window using javascript and pass a php
> variable onto the new window and this is really being a pain. I believe
> that this is possible but everything that I have tried so far has not
> worked. The relevant code that I am usiing is below. Everything works
> like it should except the new window contains nothing. Anyone familiar
> with this? Any help would be greatly appreciated.
>
> <?
> if ($yes_no == "Y"){
> ?><td><a href="javascript:newwindow('<?print ($aster);?>')"
> title='<?echo "$aster"?>'>Notes</a></td><?
> } else { ?><td>&nbsp;</td><?
> }
> ?>
> </tr>
> <?
> }
> odbc_close($connect);
> ?>
> <SCRIPT language="JavaScript">
> <!--hide
> function newwindow()
> {
> window.open('cust_parts_notes.php','Notes','width=300,height=200,resizable=yes');
>
> }
> //-->
> </SCRIPT>
> </body>
> </html>
>
> The referenced page 'cust_parts_notes.php' only contains:
>
> <?
> echo "$aster";
> ?>


window.open('cust_parts_notes.php?aster=<?print
($aster);?>','Notes','width=300,height=200,resizable=yes');

echo $_GET['aster'];

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация