Menu

new window with fixed size

Help 2.02
Razvan Pop
2003-06-30
2003-07-09
  • Razvan Pop

    Razvan Pop - 2003-06-30

    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 "&nbsp;&nbsp;&nbsp;&nbsp;<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?

     
    • Andreas Kansok

      Andreas Kansok - 2003-07-01

      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.

       
    • Razvan Pop

      Razvan Pop - 2003-07-07

      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

       
    • Razvan Pop

      Razvan Pop - 2003-07-07

      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 "&nbsp<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)?

       
    • Andreas Kansok

      Andreas Kansok - 2003-07-09

      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 ... ;-)

       
      • Razvan Pop

        Razvan Pop - 2003-07-09

        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

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.