OK. Here is what I am trying to do. I want to use some popup windows in a good way. I am using them for page help items and the such.
Here is the code I have been using and this first part works great:
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">
At the top of the page:
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=400,height=200,scrollbars=yes');
return false;
}
//-->
</SCRIPT> </pre><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Then my links are the following:
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> <A HREF="popupbasic.html" onClick="return popu (this, 'notes')">my popup</A> </pre><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Easy...no problem. This works like a champ. However, I want to do is the following. I am doing a search on the page and I want the popup to have the search results in it. Here is the code of the page...sorry, but it is kinda long:
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"><?php
require("config/configdb.php"

;
$installBase = ereg_replace("(^.*)[/\\]$", "\\1", $config["installBase"]);
?>
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=400,height=200,scrollbars=yes');
return false;
}
//-->
</SCRIPT>
<TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BORDER="0">
<TR>
<TD ALIGN="center">
<FORM METHOD="get" ACTION="searchpics.php" TARGET="_self">
<TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0">
<TR>
<TD><INPUT TYPE="text" NAME="q" SIZE="25" TABINDEX="1">&nbs p;</TD>
<TD><INPUT TYPE="submit" VALUE="Search" TABINDEX="3">&nbs p;</TD>
<TD>
<SELECT NAME="r" TABINDEX="2">
<OPTION VALUE="0">All results</OPTION>
<OPTION VALUE="5">5 results</OPTION>
<OPTION SELECTED VALUE="10">10 results</OPTION>
<OPTION VALUE="20">20 results</OPTION>
<OPTION VALUE="30">30 results</OPTION>
<OPTION VALUE="50">50 results</OPTION>
</SELECT>
</TD>
</TR>
<TR>
<TD>
</TD>
<TD COLSPAN="2">&nbsp ;</TD>
</TR>
</TABLE>
</FORM>
</TD>
</TR>
</TABLE></pre><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">I know nothing of JavaScript. Know PHP really well, but not much for JavaScript. What I tried doing is adding the onClick inside both the form and input tags.
Adding the onClick to the form tag makes the popup window launch when you click inside the search box (funny - but not what I was looking for). The onClick inside the input does nothing.
Any help would be great, and again sorry for the long a$$ post, but I figure being able to see the code is easier for everyone.
You can see the page I am working on at. When I do a search on that page, I want it to display the results in a popup window, not a new page.
<a href="http://baby.brynteson.info/pics.php" target="_blank">http://baby.brynteson.info/pics.php</a>
Thanks,
dw9
<small>[ 06-03-2002, 02:53 PM: Message edited by: dawho9 ]</small>