RE: Build Url based on screen width
| From: | YC Nyon | Date: | Sun, 20 Jun 2004 04:48:41 +0000 |
| Subject: | RE: Build Url based on screen width | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-188681@lists.php.net to get a copy of this message | ||
I need to build a url based on screen width.
The code is below
if (screen.width > 800) {
document.write('<a
href="frameview.php?winwidth=880&winheight=540">');
}
else if (screen.width <= 800) {
document.write('<a href="frameview.php?winwidth=680&winheight=440">');
}
However, I need to add some parameters to the url dynamically. For example,
<a href="frameview.php?winwidth=680&winheight=440&street=durbon">
<a href="frameview.php?winwidth=680&winheight=440&street=secker">
...
Not getting success in try to combine Javascript and PHP scripting.
Nyon
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.690 / Virus Database: 451 - Release Date: 22/05/2004