Skip to main content
Jush1
Known Participant
August 13, 2010
Question

Cfmenuitem to open a popup window

  • August 13, 2010
  • 1 reply
  • 682 views

I am trying to open a popup window with cfmenuitem, it works but give me a javascirpt error that I am not sure how to fix. Here is what I am doing:

<cfmenu name="myMenu" type="horizontal"  childstyle="position:relative; z-index: 3000000; "
                             fontsize="10"  font="Verdana, Arial, Helvetica, sans-serif"  bgcolor="#f#f9f40;"
                            selecteditemcolor="##dd6b04" selectedfontcolor="##FFFFFF" menustyle="border: 1;">

                        <cfmenuitem
                            href="http://yahoo.com" display="Yahoo" target="New"/>
                        <cfmenuitem
                            href="http://google.com" display="google" target="New"/>

                        <cfmenuitem name="popup" href="javascript:window.open('pop.cfm','mywin','width=300,height=200,left=400,top=400,screenX=0,screenY=100'); index.cfm;" display="Popup"/>

</cfmenu>

The current file name is index.cfm. I want the page stay in index.cfm while displaying pop.cfm on the top. It is working fine with everything except a javascript error indicating "index" is undefiined. But if I remove "index.cfm" from the tag, I will get a blank page. Is there anything to fix this?

All I want to stay in the same page when clicking the menu item with the pop window on top focused.

Please help.

Thanks

This topic has been closed for replies.

1 reply

Jush1
Jush1Author
Known Participant
August 13, 2010

This is worked around by create an ID name with whatever is missing or not identified, ie "index" in the example code.

Jush1
Jush1Author
Known Participant
August 13, 2010

Yes, it has to be in the footer page, so it will work when user click the link no matter which page it is on.