[PHP] spot the mistake

2006-11-12 Thread Ross

echo ('a  href=#
onclick=window.open(\'news/old_news_list.php?month=$jamp;year='.$i.'\',\'\',\'width=700,height=500\');
return false \ $thisMonth/a');


 I am trying to get this to open in a popup however it doess not open and I
cannot work out why. Must be a syntax arror as the page displays ok.


Ross

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] spot the mistake

2006-11-12 Thread Jochem Maas
Ross wrote:
 echo ('a  href=#
 onclick=window.open(\'news/old_news_list.php?month=$jamp;year='.$i.'\',\'\',\'width=700,height=500\');
 return false \ $thisMonth/a');
 

t my first guess is that you've back-slashed something you
shouldn't have - try breaking it down (and/or looking at the html source) ...

$url = news/old_news_list.php?month=$jamp;year=$i;
$js  = window.open('%s','','width=700,height=500'); return false;;
$lnk = 'a  href=# onclick=.$js. %s/a

printf($lnk, $url, $thisMonth);

 
  I am trying to get this to open in a popup however it doess not open and I
 cannot work out why. Must be a syntax arror as the page displays ok.
 
 
 Ross
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] spot the mistake

2006-11-12 Thread Robert Cummings
On Sun, 2006-11-12 at 15:21 +, Ross wrote:
 echo ('a  href=#
 onclick=window.open(\'news/old_news_list.php?month=$jamp;year='.$i.'\',\'\',\'width=700,height=500\');
 return false \ $thisMonth/a');
 
 
  I am trying to get this to open in a popup however it doess not open and I
 cannot work out why. Must be a syntax arror as the page displays ok.

$j and $thisMonth need to be moved outside of the string so that PHP
will expand their values.

Not sure if that will fix the popup not opening at all issue.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] spot the mistake

2006-11-12 Thread Curt Zirzow

On 11/12/06, Ross [EMAIL PROTECTED] wrote:


echo ('a  href=#
onclick=window.open(\'news/old_news_list.php?month=$jamp;year='.$i.'\',\'\',\'width=700,height=500\');
return false \ $thisMonth/a');


Just remove any question on what is wrong:

$thisUrl = news/old_news_list.php?month=$jamp;year=$i;
?
a href=?php echo $thisUrl;?
  onClick=window.open('?php echo
$thisUrl;','','width=700,height=500'); return false;
 $thisMonth/a
?php


- No wierd escaping stuff. (.\',\'\',\''.'\',')
- Clear on what you are doing.
- javascript broke? it will still work



 I am trying to get this to open in a popup however it doess not open and I
cannot work out why. Must be a syntax arror as the page displays ok.


if it was a syntax error, the page would not display.

curt.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] spot the mistake

2006-11-12 Thread Robert Cummings
On Sun, 2006-11-12 at 11:36 -0800, Curt Zirzow wrote:
 On 11/12/06, Ross [EMAIL PROTECTED] wrote:
 
  echo ('a  href=#
  onclick=window.open(\'news/old_news_list.php?month=$jamp;year='.$i.'\',\'\',\'width=700,height=500\');
  return false \ $thisMonth/a');
 
 Just remove any question on what is wrong:
 
 $thisUrl = news/old_news_list.php?month=$jamp;year=$i;
 ?
 a href=?php echo $thisUrl;?
onClick=window.open('?php echo
 $thisUrl;','','width=700,height=500'); return false;
$thisMonth/a
 ?php

Switching in and out of PHP mode... YUCK :B

Yeah, yeah I know... cue the PHP was originally designed as a template
language... *barf* ;)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] spot the mistake??

2005-03-22 Thread Chris Ramsay
[snip]
 if (isset($submitted)){
[/snip]
s...what sets $submitted then?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] spot the mistake??

2005-03-22 Thread AndreaD
there is a hidden field called submitte
Chris Ramsay [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 [snip]
 if (isset($submitted)){
 [/snip]
 s...what sets $submitted then? 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php