Right click context menu problems with IE

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
AndyM
Beginner
Beginner
Posts: 3
Joined: Thu Nov 03, 2005 2:11 pm

Right click context menu problems with IE

Post by AndyM »

Lately our context menu has decided to quit working correctly in IE.

After messing around with it I have figured out that it only fails if you are right-clicking in the iframe that holds the page's content. This is only true for one page's context menu. Another page that is set up exactly the same way will work fine.

It used to work fine no matter where you click, which is the confusing part.

Works 100% fine in FireFox :evil:

I cannot provide a link.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Right click context menu problems with IE

Post by John »

AndyM wrote:I cannot provide a link.
Then you'll need to provide code from the _data file, web page, and any CSS you're using. Also the exact version of the menu in use. You can post it all here.
John
AndyM
Beginner
Beginner
Posts: 3
Joined: Thu Nov 03, 2005 2:11 pm

Post by AndyM »

job.js

Code: Select all

contextDisabled=false;  // Set this parameter to disable or enable right click, context menu at runtime.
contextMenu="jobCM";    // Default name for the contextMenu
contextObject="";       // This is the object the right click occured on, could be an image, link whatever was under the mouse at the point of right click.
job.js.php

Code: Select all

with(milonic=new menuname("jobCM")){
    style = contextStyle;
    itemwidth=162;

    aI("image=/images/titlebars/appointments.gif;type=header;align=center;separatorsize=1;separatorwidth=162;");
    aI("text=New Appointment;url=/subpage.php?page=job&action=new;padding=3;target=iFrame;");
    aI("text=List Appointments;showmenu=jobCM_LIST;padding=3;separatorsize=0;separatorpadding=1;target=iFrame;"); 
    aI("text=Close Appointments;url=/subpage.php?page=job&src=<?=$_GET['src'];?>&action=close;target=iFrame;");
<?php
if (hexdec($_SESSION['user']['auth_level']) == hexdec('0xFF')) {
?>
    aI("text=Finalize Appointments;url=/subpage.php?page=job&src=<?=$_GET['src'];?>&action=finalize;target=iFrame;");
	aI("text=Print Invoices;url=/subpage.php?page=job&src=<?=$_GET['src'];?>&action=selectInvoices;target=iFrame;<?=(isset($_GET['id']) ? 'separatorsize=1;separatorpadding=1;' : '');?>");
	
<?php
}
if (isset($_GET['id']) && $_GET['id'] != null) {
?>
    aI("text=Post History;url=/subpage.php?page=job&src=<?=$_GET['src'];?>&action=post&id=<?=$_GET['id'];?>;target=iFrame;");
    aI("text=Review Appointment;url=/subpage.php?page=job&action=review&id=<?=$_GET['id'];?>;target=iFrame;");
	aI("text=Add Comment;url=/subpage.php?page=addComment&type=job&id=<?=$_GET['id'];?>;target=iFrame;");
<?php
	if(($_SESSION['user']['primary_id'] == $job->member->primary_id) || ($_SESSION['user']['auth_level'] > $job->member->auth_level)) {
?>
    aI("text=Update Appointment;url=/subpage.php?page=job&action=update&src=<?=$_GET['src'];?>&id=<?=$_GET['id'];?>;target=iFrame;");
<?php
	}
}
?>
	
}

    with(milonic=new menuname("jobCM_POST")){
        style = contextStyle;
        itemwidth=162;

        aI("text=History;url=/subpage.php?page=job&action=history&id=<?=$_GET['id'];?>;target=iFrame;");
        aI("text=Notes;url=/subpage.php?page=job&action=notes&id=<?=$_GET['id'];?>;target=iFrame;");
    }
drawMenus();

Now the menu for the job page is not working unless you right click out of the main content iframe. The menu for the customer page is below and works perfectly in IE and FF.



customer.js

Code: Select all

contextDisabled=false;      // Set this parameter to disable or enable right click, context menu at runtime.
contextMenu="customerCM";   // Default name for the contextMenu
contextObject="";           // This is the object the right click occured on, could be an image, link whatever was under the mouse at the point of right click.
customer.js.php

Code: Select all

<?php
@session_start();
//require_once('./bin/site.inc.php');
?>
with(milonic=new menuname("customerCM")){
    style = contextStyle;
    itemwidth=162;
    margin=1;

    aI("bgimage=/images/titlebars/customers.gif;type=header;separatorsize=1;separatorwidth=162;imageheight=20;");
    aI("text=New Customer;url=/subpage.php?page=customer&action=new;image=/images/icons/contact_new.gif;");
    aI("text=List Customers;showmenu=customerCM_LIST;padding=3;separatorsize=1;separatorpadding=1;");
	aI("text=Detail Center;url=/subpage.php?page=customer&action=detail;");
	<?=($_GET['action'] == 'list' ? 'aI("text=Print;clickfunction=window.print();image=/images/icons/printer.gif;");' : '');?>
}

    with(milonic=new menuname("customerCM_LIST")){
        style = subStyle;
        itemwidth=162;

        aI("text=Full name;url=/subpage.php?page=customer&action=list&p=0&sort=first_name;");
        aI("text=Company;url=/subpage.php?page=customer&action=list&p=0&sort=company_name;");
        aI("text=File as;url=/subpage.php?page=customer&action=list&p=0&sort=file_as;");
    }

drawMenus();


I'm not sure how to find out what version of the context menu I'm using.

I know the php stuff isn't the problem because I've gone down to just straight calls with no php in the file with the same results.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

AndyM wrote:I'm not sure how to find out what version of the context menu I'm using.
Look in any of the 3 menu code files. The version will be in the comments at the top. All 3 files must be the same version.
John
AndyM
Beginner
Beginner
Posts: 3
Joined: Thu Nov 03, 2005 2:11 pm

Post by AndyM »

What are the file names?

We are also using the standard DHTML menu and the files are in the same place.
Post Reply