• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Cfmenuitem to open a popup window

New Here ,
Aug 13, 2010 Aug 13, 2010

Copy link to clipboard

Copied

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

TOPICS
Advanced techniques

Views

633

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 13, 2010 Aug 13, 2010

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 13, 2010 Aug 13, 2010

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation