Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:27
Right click context menu problems with IE
Poster: AndyM
Dated: Thursday November 3 2005 - 13:18:21 GMT
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
I cannot provide a link.
Re: Right click context menu problems with IE
Poster: John
Dated: Thursday November 3 2005 - 14:05:25 GMT
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.
Poster: AndyM
Dated: Thursday November 3 2005 - 15:22:03 GMT
job.js
Code:
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.
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:
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();
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:
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.
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:
<?php
__at__ 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();
__at__ 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.