RE: [PHP] JavaScript & php question - mainly JS though so slightl y OT but hep needed!!! :o)
| From: | Martin Towell | Date: | Tue, 18 Dec 2001 23:05:32 +0000 |
| Subject: | RE: [PHP] JavaScript & php question - mainly JS though so slightl y OT but hep needed!!! :o) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-78144@lists.php.net to get a copy of this message | ||
if you have lots of links, then doing it this way, IMO, would be
easier/better - so:
<script>
function windowPopup(xx) { window.open("info.php?patch="+xx, "_new",
"windowattribs"); }
</script>
but if there's only a few links, then placing the window.open code in the
link would be easiest, i think.
-----Original Message-----
From: Martin Hughes [mailto:mth100@orange.net]
Sent: Wednesday, December 19, 2001 9:54 AM
To: php-general@lists.php.net
Subject: [PHP] JavaScript & php question - mainly JS though so slightly
OT but hep needed!!! :o)
How could I write the function windowPopup(XX) where XX is a variable that
can change from link to link, for a popup info window to load a php file
with the variable XX in the url?
So the link would look like:
<a href="javascript:windowPopup(XX);">Link Text</a>
and I want that link to open the page info.php?patch=XX in a new popup
window
Do I do it something like this, or is there a faster/better way??
Cheers & Merry X-Mas!
Martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net