Custom context menu to work in FireFox

, I've run into a brick wall with this problem. I've been given a huge webapp that was designed for IE6, and I need to make it work(and look good) in Firefox 3.0 and IE7. So far, it's just been a bunch of CSS, JSF, and HTML changes, with some extra javascript to cover the behaviors they used for IE. However, the page I'm working on now is a tough one.
It's a giant grid, with up to 400 or so rows(which can be set to however many rows you want per page) and when you rightclick, a custom context menu comes up with 15 or so options in IE. They used behaviors to do all the attaching. I can rewrite the behaviors using javascript, but i'm still getting the Firefox default context menu. The code for this part of the app is very convoluted, so I'd rather not post any, but is there something specific about context menus I'm missing Or if someone knows a good site to look at, I'd appreciate it.
Thank you,
Jmasta, Thank you! That's exactly what I was looking for.

Posted On: Monday 26th of November 2012 11:59:40 PM Total Views:  238
View Complete with Replies

Related Messages:

SoundManager2 customization   (73 Views)
Hi all, would some one be able to give me a piece of advise with regard to SoundManager2, please I am trying to figure out how to make SoundManager2 to play a sound for a certain length of time. I know that it is possible to make it start playing form certain position, but how to set it to play a sample track (sound) for certain length of time. Any advise would be greatly appreciated.
Making a custom input type handler?   (92 Views)
Hi all, I am trying to create a custom input type and add a specific handler for processing and validating input for that type. For example, say I want to make the following: I want that input type to be validated in a specific way, similar to how the password type replaces all characters with the black dot. Also, I would prefer to not use jQuery for this task if at all possible. Anyone have any ideas
Creating a custom popup window with out min, max and close in title ba   (80 Views)
I don't have code for this..
Kinetic.js and ball in custom path   (171 Views)
, could you explain me why in my code it does not work when I put the ball with the mouse inside red road path. I think it 'thinks' that the space inside red is not empty and pushes the ball out. What could I do I was making this from example: You can copy the code from here to run the example: and shorter version: var curve = new Kinetic.Line({ //578*400 (x * y) points: [153, 200, 340, 250, //down 340, 270, //short to bottom 153, 290, //back to left 153, 320, //short to bottom 390, 290, //to the right long 390, 220, //up short 153, 140, //long to the left 153, 200 //short to bottom ], stroke: "red", strokeWidth: 5, lineCap: "round", lineJoin: "round" }); So this ball has to ride inside the red area. How do I make this
jQuery ajax JSON custom error handling   (150 Views)
I want to working with login system jQuery ajax and json. I'm facing no problem with success function. I dn't know how to through custom errors like "incorrect login". Here is my code, Please help me. $(document).ready(function(){ $("#login").click(function(){ if($("#defaultEmail").val() == ""){ $("#defaultEmail").addClass("field-err"); $("#defaultEmail").focus(); }else if($("#defaultPassword").val() == ""){ $("#defaultEmail").removeClass("field-err"); $("#defaultPassword").addClass("field-err"); $("#defaultPassword").focus(); }else{ $("#defaultPassword").removeClass("field-err"); $('#loading').css('display', 'block'); var email = $('#defaultEmail').val(); var password = $('#defaultPassword').val(); var queryString = "email=" + email + "&password=" + password + ""; $.ajax({ url: 'secureLogin.php', contentType: "application/json; charset=utf-8", dataType:'json', async: false, type:'GET', data: queryString, success: function(data){ $('#loading').css('display', 'none'); var url = "c_profile.php"; $(location).attr('href',url); }, error: function(request,error){ $('#loading').css('display', 'block'); $("#log-ajax-error").append("ERROR: " + error); } }); } }); }); Here is my sucureLogin.php code $email = $_GET['email']; $password = $_GET['password']; $encrypted_pass = md5($password); $sel = @mysql_query("SELECT `name`, `company`, `cid` FROM `company` WHERE `email` = '$email' AND `password` = '$encrypted_pass'"); $count = @mysql_num_rows($sel); if($count > 0){ while($data = @mysql_fetch_array($sel)){ // Succes here } }else{ $arr = array('a' => 'Unable to login'); echo json_encode($arr); } i'm throwing json_encode for the error. Please help me with this.
Submiting form with custom prompt   (69 Views)
Hi all. I'm trying to create custom prompt. When I click on the button, appears custom prompt and ask "Do you realy want to submit". When I click "Yes", the form isn't submited. Here's html code: css code: input.prompt{ border:1px solid blue; background-color:#ebebeb; font-family:Libersina; font-size:15px; color:#003510; } td.titlebar{ background-color:#aabbcc; color:#000066; font-family:Libersina; font-size:15px; } table.promptbox{ border:1 solid #ccccff; background-color:rgb(182,220,233); color:#000066; font-family:Libersina; font-size:15px; padding-bottom:5px; padding-right:5px; padding-left:5px; padding-top:5px; } input.promptbox{ border:1px solid blue; background-color:#ebebeb; font-family:Libersina; font-size:16px; color:#003510; } Javascript code: var response = null function prompt2(prompttitle, message, f_yes, f_no,button_1,button_2){ promptbox = document.createElement('div'); promptbox.setAttribute ('id' , 'prompt') document.getElementsByTagName('body')[0].appendChild(promptbox) promptbox = eval("document.getElementById('prompt').style") promptbox.position = 'absolute' = 100 promptbox.left = 200 promptbox.width = 300 promptbox.border = 'outset 1 #bbbbbb' document.getElementById('prompt').innerHTML = "" + prompttitle + "" document.getElementById('prompt').innerHTML = document.getElementById('prompt').innerHTML + ""+message+" " document.getElementById("promptbox").focus() } function yes(){ document.form.submit(); } function no(){ window.location="dok.php"; } function openPrompt(){ prompt2('Confirm','Do you realy want to submit form', 'yes()','no()','Yes','No'); }, OK. But I want that this popup looks better.
jQuery ScrollShow customization to include description?   (104 Views)
I am customizing jquery scrollshow, it can be found originally here As you can see in the original script there are only images which scroll, now I have the description to show below each image which should also scroll as the images scroll. This description will include - 1. 'Name of the person in Image' 2.Article Title 3.Article short paragraph (Also this content will come from the db with PHP !) (Initially it can be implemented for some small dynamic text for images) To achieve that i tried to add the 'p tag' inside the image's li tag but they doesn't scroll.So I am trying to do some changes in the jquery functions they wrote. I tried this much, in the case link of wrap function - function wrap( $els, type, size, name ){//wrap the photos with several different wrappers. switch( type ){ case 'crop': $els = $els.wrap('').parent().css('overflow','hidden'); case 'resize': return $els.css( size ); case 'simple': return $els.wrap('').parent(); case 'link': if( $'img') ) return $els.wrap('').parent().each(function(){ //Comented for changing the anchor on image #pritam -3Feb,2010 //this.href = this.firstChild.src; //Add the desc text #pritam - 4Feb,2010 //$(this).append("some text"); //alert(this.child); //alert($('#image > li > a > span').value);//append(name); //$(".main_anchor02").append = name; $('this.div:first').html('This is a test.'); //alert($('this').text()); }); default: return $els; } };
how to customize alert box in Javascript   (90 Views)
Hi , Can anybody describe me how to customize alertbox with its properties/attributes like width,height etc..
Implementing custom labor rate into order form script   (95 Views)
there, first time poster. I am trying to create an order with the ability to dynamically self total the sum of the selected items but also be able to add a 25% labor fee having it be at least $90. So if someone buys $300 worth of items the labor charge would be $75 but it would be automatically bumped to $90. heres the existing code: /** * Calculates the payment total with quantites * @param {Object} prices */ countTotal: function(prices){ var total = 0; $H(prices).each(function(pair){ total = parseFloat(total); var price = parseFloat(pair.value.price); if ($(pair.key).checked) { if ($(pair.value.quantityField)) { price = price * parseInt($(pair.value.quantityField).getSelected().text, 10); } total += price; } }); if (total === 0) { total = "0.00"; } else if (total > 90){ total += (total * .25); } if ($("payment_total")) { $("payment_total").update(parseFloat(total).toFixed(2)); } }, /** * Sets the events for dynamic total calculation * @param {Object} prices */ totalCounter: function(prices){ $H(prices).each(function(pair){ $(pair.key).observe('click', function(){ JotForm.countTotal(prices); }); if ($(pair.value.quantityField)) { $(pair.value.quantityField).observe('change', function(){ $(pair.key).checked = true; JotForm.countTotal(prices); }); } }); },
replacing scroll bar with customizaed div   (77 Views)
I would like to replace the vertical scroll bar with a div of my own. I would have just cancelled the scroll bar, and created a div, but I want it not to override what is in the containing div. How can I do that
customized right-click menu based on id   (95 Views)
, I'm trying to customize the popup menu based on which table I right-click on. I have disabled the right-click function on the page except for the tables. I did this on purpose. This web page will be called from a python software, using the IE activeX, so no worries here about the browser compatibility. I just don't know how to get the variable from showmenuie5(getid) and transfer it to the menu Thank you very much for your help. - Dan // no right-click function clickIE() { if (document.all) { }} function clickNS(e) { if (document.layers||(document.getElementById&&!document.all)) { if (e.which==2||e.which==3) {}}} if (document.layers) { document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS; } else { document.onmouseup=clickNS;document.oncontextmenu=clickIE; } document.oncontextmenu=new Function("return false") // popup menu var menuskin = "skin1"; var display_url = 0; function showmenuie5(getid) { var rowid = getid var rightedge = document.body.clientWidth-event.clientX; var bottomedge = document.body.clientHeight-event.clientY; if (rightedge < ie5menu.offsetWidth) = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth; else = document.body.scrollLeft + event.clientX; if (bottomedge < ie5menu.offsetHeight) = document.body.scrollTop + event.clientY - ie5menu.offsetHeight; else = document.body.scrollTop + event.clientY; = "visible"; return false; } function hidemenuie5() { = "hidden"; } function highlightie5() { if (event.srcElement.className == "menuitems") { = "highlight"; = "white"; if (display_url) window.status = event.srcElement.url; } } function lowlightie5() { if (event.srcElement.className == "menuitems") { = ""; = "black"; window.status = ""; } } function jumptoie5() { if (event.srcElement.className == "menuitems") { if (event.srcElement.getAttribute("target") != null), event.srcElement.getAttribute("target")); else window.location = event.srcElement.url; } } Country page Add to favorite if (document.all && window.print) { ie5menu.className = menuskin; document.body.onclick = hidemenuie5; } Row 1 - Canada Row 2 - USA Row 3 - New Zealand
customising groupwise login (via iframes?)   (92 Views)
, Hope someone can help... I'm developing a "Startpage" for a client's customers. He wants all information relevant to his clients to be displayed on 1 web page. We have come up with is well until we tried logging in to Novell Groupwise. It seems it won't accept logins from any location other than the login page they have created. The original (and working) login page is here: My question is... how can I include the original working login into our custom page at via an iframe that will automatically scroll away form all the junk on the original login page and just display the username and password box If that doesn't make sense let me know and I'll try re-clarify it but it looks understandable to me.
custom Errors?   (73 Views)
I'm pretty new to JavaScript. I'm trying to define my custom errors, but it doesn't seems to be working function MyError(msg){ this.message = msg = "My Error" } window.onload = function(){ try{ throw new MyError("Test Message"); } catch(e) { alert( + ": " + e.message); } } Getting TypeError, claiming that it's not a function.
Problem during custom scroll   (89 Views)
TotalrecordCount = 300 Page size = 10 Pagecount = TotalrecordCount / Pagesize /* 30*/ One row size = 20px Body size = 20px * pagesize ScrollTrackSize = Body size /*200*/ ScrollPointerSize = Body size /Page count /*15*/ One row track size = 15 / 10; /*ScrollPointerSize / Page size = 1.5*/ My Problem is that if one row track size is floating number than i can't move the element with this value. Is there any logic to create this custom bar or Can i set position of element to this float value . Please help me. I use this logic to create custom scroll bar and retrieves records from server side as user scrolls. If the One row track size is an integer number than there is no problem bcz i can move the ScrollPointer to this value. Can any conversion can be done between px and pt or % Is there any other simple logic to create custom scroll bar I am begineer in javascript and css. So please help me to find out this.
customize eperformance page   (94 Views)
is there anyone whose familiar with ePerformance page in PeopleSoft I need to make the left navigation and header fixed when scrolling up or down. Is there a javascript or some sort of a code that is applicable in PeopleSoft to make this functionality possible
Adding custom tags to innerHTML   (63 Views)
I need help figuring this out. I have a "contenteditable" div. I have a menu that does the basics, bold, italic, etc. I need to add custom tags that will be represented in the source, not visually. In other words, when I use the code below: function myCustomTag(v) { var str = document.selection.createRange().text; document.getElementById("editor").focus(); var sel = document.selection.createRange(); sel.text = "" + str + ""; return; } Which is triggered by: onClick="myCustomTag('myTag');" It surrounds the selected text as it should, but in the source it looks like: surrounded text Instead of: surrounded text Visually, in the editable div, it looks like the above, but I need it to be tags in the source, not visible on the surface. Am I making any sense
Need to build a custom function like this, what is?   (94 Views)
I want to build a site like, I can make a shopping cart by using any popular platform like magento, opencart or cs-cart, but the site which i mentioned has couple of unique feature, you can see them here Once you go there, please click on "mats tab" and see how they have "how many mats would you like" and have 0,1,2,3 on it. I want to do this, user should also be able to change width of the mat down to 1" or increase as they prefer like shown here. Also please check the "mat details" link, and then click on "change", here user can change the width of border. How can I achieve all this, is there any Jquery plugin for it Can I do this thing with Jquery and AJAX When user has done all the changes how can I submit changed look and feel of the art into database, so that user can add it to cart to order further Please guide me from where should I start or learn and what are the best available platforms
JQuery custom theme does not work in JSP   (78 Views)
Hi! I have a problem with jquery not working in JSP. I have downloaded a theme in jquery but it does not seem to work. And I do not know what is the problem why it does not seem to work. I am very new to jquery and JEE. I am actually rushing this project as the deadline is very near. I would very much appreciate your help. this is my jsp code: (the markup is from the demo of the theme I downloaded in jquery theme roller since I meant to see how it would look first before implementing) jQuery(function(){ // Accordion jQuery('#accordion').accordion({ header: 'a' }); // Tabs $('#tabs').tabs(); // Dialog $('#dialog').dialog({ autoOpen: false, width: 600, buttons: { "Ok": function() { $(this).dialog("close"); }, "Cancel": function() { $(this).dialog("close"); } } }); // Dialog Link $('#dialog_link').click(function(){ $('#dialog').dialog('open'); return false; }); // Datepicker $('#datepicker').datepicker({ inline: true }); // Slider $('#slider').slider({ range: true, values: [17, 67] }); // Progressbar $("#progressbar").progressbar({ value: 20 }); //hover states on the static widgets $('#dialog_link, ul#icons li').hover( function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-state-hover'); } ); }); body{ font: 62.5% "Trebuchet MS", sans-serif; margin: 50px;} .demoHeaders { margin-top: 2em; } #dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;} #dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;} ul#icons {margin: 0; padding: 0;} ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left; list-style: none;} ul#icons span.ui-icon {float: left; margin: 0 4px;} Accordion First Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Second Phasellus mattis tincidunt nibh. Third Nam dui erat, auctor a, dignissim quis. Tabs First Second Third Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum. Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue. It would be very nice if someone would be willing to help me out.
Facebook custom FBML tab. help needed.   (189 Views)
i am working on a facebook page with custom fbml page. Here is the link: SNIP I want to make a jquery slideshow in the page. Is it possible to use jquery there. I write a script which work on other website but not working there. I am importing the jquery and the script by
custom Errors?   (65 Views)
I'm pretty new to JavaScript. I'm trying to define my custom errors, but it doesn't seems to be working function MyError(msg){ this.message = msg = "My Error" } body.onload = function(){ try{ er = new MyError("Test Message") throw er(); } catch(e) { alert( + ": " + e.message); } } Getting TypeError, claiming that it's not a function.