Joker7 wrote:
You are right I'm not explaining my self properly
No you are not. Posting PHP code to a javascript group will not
encourage people to help you. Javascript (client-side javascript anyway)
is executed on the client and it's source code it the _output_ of your
PHP script. Attempting to debug javascript by looking at the PHP that
generates it is too indirect to be a worthwhile activity. Generally,
debugging dynamically generated javascript source code starts with
looking at the source code that arrives at the browser, to confirm that
the PHP is generating the code expected (complete, well formed and
valid//syntactically correct) and to determine what the client-side code
is actually being asked to do.
Indeed talking about opening a pop-up from a PHP script suggests a
fundamental misconception about the relationship between client-side and
server-side scripting.
Using this PHP code that come from a much larger
script :
$link =
"<ahref=\"news.php?renew=0&mid=".$message_info->tp
^
A space character would be expected in that location.
_message_id."&sign=".$sign."\">";
instead of calling a new page as it is now I wish
to open a frameless window.
How are you defining a "frameless window"?
I will show you what I
have been playing with but just can't get it to
work, it may give you an idea.
$link =
"<ahref='news.php?renew=0&mid=$message_info->tp_me
^
A space character would be expected in that location.
ssage_id&sign=$sign onClick=\"javascript:
^
An apparent opening single quote character before the URL is not matched
by a corresponding closing quote.
Writing the same URL as is being written into the HREF into the first
argument to the - window.open - call is wasteful as the onclick handler
can refer to whatever URL is specified in the link's HREF with -
this.href - (the same is true of - this.target - in the second argument
for the TARGET attribute, but they do not correspond in this instance).
info->tp_message_id&sign=$
sign','newwindow', 'width=250, height=285,
top=200, left=300, screenX=200, screenY=300,
^ ^ ^
The features list that is the optional third argument to - window.open -
is specified as a comma separated list, not a comma-space separated
list.
scrollbars=no, resizable=no'); return false;\"
target=_self>";
There should be no expectation of this code 'working', and looking at
the output form the PHP should have highlighted at least some of the
reasons for that.
Richard.