Why are you 'unable' to use JS?
No idea how to program and use javascript:window.open() ? In this case you find a possibility in view_cart.php or in SelfHTML (http://selfhtml.teamone.de)
Greetings,
Andreas.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem is not window.open(). I use this even in Flash.
But I must admit that I opened PHP only 2 weeks ago. :(
I can use the function in other php pages I played with, but not in this specific location.
Razvan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
sad for me, but you understand my problem.
I think is just a problem with syntax.
I tried:
echo "<tr bgcolor=\"$bgcolor3\"><td>\n";
echo " <a href=javascript:NewWindow=window.open('indexd.htm','newWin','width=750,height=480,toolbar=No,scrollbars=yes,status=yes,resizable=No') target=new>;
<font color=\"#FFFFFF\"><b>$nav_1</b></font></a></td></tr>\n";
in nav.php.
I have two issues:
1. With "target=new" it works fine but it shows 2 windows: one with the correct link and properties and one with javascript:window.open..... in the address.
2. If I remove "target=new" all is ok except that in place of the menu (nav.php) I have just "[object]".
Should I break my computer (or my head)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would like to insert a new link in the navigation bar. I used nav.php where I inserted the following:
echo "<tr bgcolor=\"$bgcolor3\"><td>\n";
echo " <a href=\"indexd.htm\" target='new'><font color=\"#FFFFFF\"><b>$nav_1</b></font></a></td></tr>\n";
My problem is that I was unable to use javascript in order to obtain a new window with fixed width/height, no toolbars....
Can anyone help me?
Why are you 'unable' to use JS?
No idea how to program and use javascript:window.open() ? In this case you find a possibility in view_cart.php or in SelfHTML (http://selfhtml.teamone.de)
Greetings,
Andreas.
Thanks for your time Andreas,
The problem is not window.open(). I use this even in Flash.
But I must admit that I opened PHP only 2 weeks ago. :(
I can use the function in other php pages I played with, but not in this specific location.
Razvan
Perhaps, there is a problem with " and ' , when you generate JS-code with PHP?
Try 'heredoc' syntax of PHP ( http://de3.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc ).
Otherwise I didn't understand the problem ...
Greetings,
Andreas.
sad for me, but you understand my problem.
I think is just a problem with syntax.
I tried:
echo "<tr bgcolor=\"$bgcolor3\"><td>\n";
echo " <a href=javascript:NewWindow=window.open('indexd.htm','newWin','width=750,height=480,toolbar=No,scrollbars=yes,status=yes,resizable=No') target=new>;
<font color=\"#FFFFFF\"><b>$nav_1</b></font></a></td></tr>\n";
in nav.php.
I have two issues:
1. With "target=new" it works fine but it shows 2 windows: one with the correct link and properties and one with javascript:window.open..... in the address.
2. If I remove "target=new" all is ok except that in place of the menu (nav.php) I have just "[object]".
Should I break my computer (or my head)?
Remove 'NewWindow='
This is completly useless, and [object] instead of nav.php is value of 'NewWindow', return value of method window.open().
Second is: window.open creates a new window. Of course you dont new a target ... ;-) But you found out yourself.
Greetings,
Andreas.
PS: Your computer does only, what you say him ... Human error. If nothing works, read manual ... ;-)
Thanks Andreas,
It was (or should I say "I was") totally stupid.
I just add /script after the closing bracket of the function! Like that:
<a href=JAVASCRIPT:window.open('indexd.htm','newWin','width=750,height=480,toolbar=No,scrollbars=yes,status=yes,resizable=No')/script>
Now it works fine.
BTW... I MUST RTFM :)
Razvan