This topic is locked

Custom Menu Javascript

3/18/2010 5:43:16 PM
PHPRunner General questions
G
gluckett author

Hi All,

I am using the new PHPRunner 5.2 (Build 4905)
I have removed all the tables from my menu. I want the menu to launch a javascript widget for the tables:
For example:



<a href="javascript:top.myWindow=top.top.dhtmlwindow.open('myWindow','iframe', '/FRASER/fish_contract_LIST.php', 'Fish Sample Data', 'width=800px,height=500px,resize=1,scrolling=1,center=1,top=100px')"> OPEN LIST</A>
<a href="javascript:top.myWindow=top.top.dhtmlwindow.open('myWindow','iframe', '/FRASER/admin_LIST.php', 'Admin Data', 'width=800px,height=500px,resize=1,scrolling=1,center=1,top=100px')"> OPEN Admin</A>


This usually works great but I get the window replaces with "HTML OBJECT" and I lose the MENU.PHP.
Also, by removing the list of tables from the MENU.PHP, the MENU doesn't know there are items so the line:



if($menuInfo['menuTablesCount']<2)

{

header("Location: ".$menuInfo['urlForRedirect']);

exit();

}


Automatically shows the list in the MENU.PHP window...I have fixed this by chaning the menuTablesCount to <0 but this resets every time I compile my project....
Is there a fix for:

  1. JavaScript Hyperlinks in the Menu
  2. menuTablesCount for the menu.php
    thanks

    gordon

G
gluckett author 3/22/2010

Ok, how about this one.
If I check "Open In New Window" when I customize menu, why does the security not persist?
thanks

J
Jane 3/25/2010

Hi,
as workaround you can create hard-coded links in the menu and then edit it in the generated files manually.