JQuery/Javascript not working on Firefox and Chrome

Hi guys, I've had this Jquery/Javascript on my page for a long time. This has stopped working. If the user clicks on buttons on the Apex page, nothing happens.
It works on IE but doesn't work on Firefox and Chrome. It used to work fine.
Is there anything I can change to make it work on all 3 browsers?
Firefox error console shows a syntax error at this point in the script:
$allButtons.click(function(){
itemChanged = false;
var toDo = $(this).attr('data-submitval');
eval(toDo);
Please can someone help?
This is the full script:
<script type="text/javascript">
//<![CDATA[
var itemChanged = false;
$(document).ready(function(){
var $items = $(':input');
var $htmlButtons = $(':button[id]');
var $templateButtons = $(':button[class]');
var $allButtons = $($htmlButtons).add($templateButtons);
$items.change(function() {
itemChanged = true;
$templateButtons.attr('data-submitval', function(){
return $(this).attr('onclick').toString().split('\n')[2];
$htmlButtons.attr('data-submitval', function(){
return this.id;
$allButtons.removeAttr('onclick');
$allButtons.click(function(){
itemChanged = false;
var toDo = $(this).attr('data-submitval');
eval(toDo);
$('a').click(function(event){
if ($(this).children('img[id="P&APP_PAGE_ID._DATE_PICKER_IMG"]').length > 0) {
event.preventDefault();
eval($(this).attr('href'));
window.onbeforeunload = function() {
if (itemChanged) {
return 'You have made changes to data on this page. If you navigate away from this page without first saving your data, the changes will be lost.';
//]]>
</script>
Thanks
Sam
Edited by: sam on 29-Jan-2013 03:50

JavaScript doesn't work on any site at all? If particular sites are the issue, or you get specific error messages, please let us know.
Usually the only two ways to disable JavaScript in Firefox are:
(1) Options dialog > Content tab<br>
(2) NoScript add-on (or other security-related add-ons)
Normally Safe Mode bypasses issues caused by add-on problems or non-default settings, so it's worth considering external issues.
Does JavaScript work normally in any other browsers you have installed?

Similar Messages

  • Richtextbox tools bar menu is not display for Firefox and chrome. Any idea why this is happening?

    Hello,
    I have added RichTextField in custom webpart. I have added tag like below
    <SharePoint:InputFormTextBox ID="RichTextField1" runat="server" TextMode="MultiLine" RichTextMode="FullHtml" Columns="20" Rows="10" RichText="true"  />
    We are able to see Richtextbox tools bar menu in IE browser but it's not working for other browser like chrome and Firefox.
    Can anyone suggest us why this is happening?
    Any help would be appreciable.
    Thanks,
    Lovkesh Patel

    Hi,
    According to your description, my understanding is that the richtextbox tool bar menu not display in non_IE browser.
    The richtext box not supported in Non-IE browser, it leads to the issue.
    Here are some similar thread for your reference:
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/c6482efb-72e1-4536-a3cb-153d838744a4/sharepoint-rich-text-editor-not-working-in-firefox-and-chrome
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/8133e762-d996-4672-a176-aa37f45c46c0/sharepoint-text-control-with-rich-text-edit-tools-on-ribbon
    Best Regards
    Jerry Guo
    TechNet Community Support

  • Flash buttons not working in IE7 and Chrome

    Here's my website where the problem is occuring www.bakercreative.co.uk
    As you can see the Flash buttons animate, but when clicked they should go to a new html page.
    I've tested it in IE8 and Firefox without any problems but it's not working in IE7 and Chrome.
    Does anyone know what the problem is? Could it be the html code or the flash file itself?
    Thanks

    Hi, Glad you were able to solve that issue with the buttons and Chrome. Any small thing can cause big problems!! LOL
    I'm sure IE7 will test out ok, IE6 did Your website is very nice and has a variety! I hope it all comes together for you.
    Thanks,
    eidnolb

  • Safari 5 Blank Page - Works in Firefox and Chrome

    Hi there,
    I have been creating a website in dreamweaver, and the preview in safari doesn't seem to work and it's getting rather irritating. I think it's something to do with javascript, as the main page i put the java above the css and it worked. But the second page only worked when i deleted the css.
    Take a look : http://www.dawoostuffs.com/HTML WEBSITE/test2.html
    It works in firefox and chrome but doesn't seem to load in safari.
    Thanks.

    Sure
    you've got two of these...
    <!--
    (start of a comment)
    but only one of these
    --> (end of a comment)
    so it seems Safari thinks the entire page is made of two comments, with a missing end tag - comments don't display - so we see nothing.
    Camino or Firefox, say - has the common sense to think that you (or Dreamweaver) probably made a mistake.

  • Flash not working in Safari (and Chrome and Firefox) - possible solution

    Yesterday my Mac crashed (actually when I was away from it) and when it rebooted, Adobe Flash would freeze any web browser it ran in (Safari, Firefox and Chrome - which surprised me as I thought it used a different version of Flash). Great with so many live-blogs happening in the world of news right now.
    I tried all the usual suspects:
    * Deleted browser caches;
    * Uninstalled Flash (Adobe have an uninstaller available) and reinstalled the same version;
    * Uninstalled Flash and reinstalled the newest version;
    * Made sure I had no duplicate fonts (I did) as I'd experienced problems with this with an iPhoto upgrade;
    * Checked recent upgrades (iWeb and Camera updates) to see what they installed (nothing dangerous);
    * Fixed permissions (they needed it);
    * Tried running Safari under 32-bit (didn't think that would work as I hadn't updated Flash itself);
    * Signed in as another user.
    None worked.
    As a last resort, I downloaded the latest version of the Onyx utility (freeware) and ran the Maintenance scripts, then, under Cleaning, deleted System cache, User cache, Internet stuff (left the cookies), and Font caches (you'll need to Close all the dialog boxes then Restart at the end). Expect a long reboot.
    That worked.
    It may not work for everyone but may for someone.
    Scott

    I was having the same issue. I logged into another account, a plain no add-ons account and found that I could view flash content with Safari OK. That mean that there was some preference file in my primary account that was the culprit.
    Here's how to cull out the bad apple (pun intended):
    Trouble Shooting Preferences
    Go to HD/Users/Your_name/Library. Move the Preferences folder (in its entirety) to the Desktop and make a second copy of it so you have Copy A and B. Now try the the process again and determine if problem is fixed.
    If the problem IS fixed, then go to the new Prefs folder that the OS will have created and open it up.
    Open Copy B on the Desktop and select all of the items inside. Drag them into the open new library folder. When the Copy window comes up check the Apply to All check box and then click on the Don't Replace button as seen here. That will keep the new files created and bring back all of the others.
    If the problem is NOT fixed, trash the new Prefs folder and move the intact Copy A folder back to the Library folder .
    This cleared it up. I ended up with 16 items that were not put back in the preference folder.
    Hope this will work for some of you.
    Do you Twango?

  • CpSetValue doesn't work in Firefox and Chrome?

    I've made changes in CaptivateMaintimeline.as as suggested by Jim Leichliter in his blog. And I use the following simple htm:
    <!-- Copyright [2008] Adobe Systems Incorporated.  All rights reserved -->
    <!-- saved from url=(0013)about:internet -->
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>test</title>
    <script src="standard.js" type="text/javascript"></script>
    </head>
    <body   bgcolor="#F1F4F5">
    <center>
    <div id="CaptivateContent"> 
    </div>
    <script type="text/javascript">
       var so = new SWFObject("test1.swf", "Captivate", "924", "557", "9", "#CCCCCC");
    so.addParam("quality", "high");
    so.addParam("name", "Captivate");
    so.addParam("id", "Captivate");
    so.addParam("wmode", "window");
    so.addParam("bgcolor","#F1F4F5");
    so.addParam("menu", "false");
    so.addVariable("variable1", "value1");
    so.setAttribute("redirectUrl", "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash");
    so.write("CaptivateContent");
    </script>
    <script type="text/javascript">
    //document.getElementById('Captivate').focus();
    //document.Captivate.focus();
    setCaptivateVariable("username", "Ahmet Cetin");
    setCaptivateVariable("useremail", "[email protected]");
    setCaptivateVariable("userid", "58345");
    document.getElementById('Captivate').focus();
    document.Captivate.focus();
    //document.reload;
    //JBL:  Custom Function to set Captivate Vars via Javascript
    function setCaptivateVariable(myVariable, myValue)
    //alert(myVariable + ": " + myValue);
    //alert("");
    document.getElementById('Captivate').jim_cpSetValue(myVariable, myValue);
    </script>
    </center>
    </body>
    </html>
    When I run this in IE8, it works almost! perfectly (when I show $$useremail$$ in label in CP4, it shows only [email protected] - one character missing, but anyway, it is not really important for now).
    The funny thing is this code doesn't work in Firefox or Chrome. But when I enable any of the alert inside the setCaptivateVariable function, it works also almost! perfectly. Any idea?

    Hi Ahmet and welcome to the forums!
    When you use a text caption to display variables in Cp, you also have  the option to choose how many characters get displayed.  The default is  15.  If you know your variable will be larger, set the value  accordingly.  Also, document.getElementById('Captivate') works only for  IE.  document.Captivate works for the rest.  Look at the default.htm publishing  template provided by your Captivate install to see how they detect the  browser.  You can do it their way, but I prefer using jQuery to do the  browser detection.  It's cleaner and easier to implement.

  • Site can't be viewed with IE, works with Firefox and Chrome

    I have a family site that works fine with Firefox and Chrome, but with when we created a new page and uploaded it, it can't be viewed with IE.
    http://www.thetravelintexans.com/states.htm was modified to add the very last picture in the last row, it was uploaded and works fine.
    If you click on the last picture Andrew at Disney, it takes you to this page http://www.thetravelintexans.com/AndrewsDisney.htm .  This page acts like it is loading in IE, but quickly says Done at the bottom of the screen, but it is blank.  The source code can be viewed, but no detail of page at all.  Again, it works fine with Firefox and Chrome.
    I am using Dreamweaver CS4.
    Thanks for any hints.
    Fred Blair

    IE does get a bit anxious when it does not have DOCTYPE to work to. It tends to fall back into a quirks mode and behave irrationally. Makes me think of myself when I do not have goalposts to aim for.
    Solution, merely give your pages a valid DOCTYPE and all is well. For more info see here http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.thetravelintexans.com%2FAndre wDisney.htm
    Gramps.

  • Embedded swf in pdf does autoplay in IE(9), does not play in Firefox and Chrome.

    I created a pdf with swf embedded. Set it to autoplay.
    Does play fine in IE9.
    In Firefox and Chrome video shows up (initial picture) with a play button.
    Will not play, not auto nor when I click the play button.
    Firefox and Chrome I just downloaded, so the newest versions.
    Windows 7 professional.

    Found the solution for Firefox.
    In firefox, goto tools/options.
    Look for Portable Document Format (PDF).
    Select it and in drop down choose Use Adobe Acrobat (in Firefox) instead of Use Firefox (Default)
    Thanks but no thanks, Acrobat team.

  • Javascript not working in Firefox on Mac OS 10.9.2

    I am trying to learn Javascript from a tutorial. I'm using Text edit to create a simple .html file that calls a .js file using the script command. The .html file opens normally in the default browser and can print a message to a simple page. It looks like a window tries to open the .js file but it vanishes before opening. I have checked that Javascript is enabled in Firefox. Opening Firefox in Safe mode does not fix the problem. It also fails to execute the .js file in Safari and Chrome.
    This problem happens on three Macs, all running Mavericks 10.9.2. When I try this on a Windows PC the .js file executes as expected.
    I've tried everything I can think of including turning off the Firewall in Security Settings. It seems like it has to be something system-wide since it happens in all three browsers. Has Apple implemented some type of blocking of Javascript in Mavericks? Any suggestions for why this is not working on my Macs and what I can do to fix it would be greatly appreciated!

    Cor-el: Thank you for noticing that! Turning off smart quotes in Textedit which I am using to create the scripts solved the problem. Everything working as expected now. I hope others using Mac OS 10.9.2 will benefit from this as well.

  • Javascript not woking in IE and Chrome

    Hi All,
    I have simple javascript function in my application that set focus in button. The code is below:
    <script type="text/javascript">
    function setfocs()
    $('#add_row_id').focus();
    </script>
    This function is working in Firefox only, but not working in Chrome and IE. Please tell me how to solve this?
    Thanks

    Hi,
    I have simple javascript function in my application that set focus in button. The code is below:
    <script type="text/javascript">
    function setfocs()
    $('#add_row_id').focus();
    </script>This function is working in Firefox only, but not working in Chrome and IE. Please tell me how to solve this?
    >
    Please use the &#123;code&#125; tags when posting code.
    See http://www.mkyong.com/javascript/focus-is-not-working-in-ie-solution/
    Cheers,

  • Image cache not working with Firefox and apex

    Hi,
    I'd like to cache all my images to save page rendering time and bandwidth because my images are all static and never change.
    I use the John Scott's caching technique Link: [http://jes.blogs.shellprompt.net/2007/05/18/apex-delivering-pages-in-3-seconds-or-less/], in a few words this technique consists of adding a header line "Expires: date in the future" in the http response.
    It works very well in IE, the images are cached and the same image can be accessed several times (within the same session or in different sessions) without issuing an http request to the server each time.
    with Firefox it does not work, the same image is asked again and again to the server (i'm using FF 3.5 and APEX 3.2).
    - Is it a date format problem? no, because when i type about:cache in FF, i can find my image in the cache with an expire date in the future.
    The weird thing here is that the counter is incremented each time u request the image, so FF knows it is in the cache and even if the expire date is in the future, FF asks it again to the server.
    - Is it a FF bug? If u read the http specs or if u google a little, u can come to the conclusion that FF does not follow the standards,
    but... images.google.com for example manages to get its images cached with FF.
    They use an http response header "cache-control: public, max-age=604800".
    I tried the same and all kinds of combinations but without success.
    When i compare my image with the one from google in the FF cache, they both have the same attributes.
    - It's not an apex issue neither because it works with IE, most probably an incompatibility between apex and FF?
    Maybe the use of cookie? or the http request (not the response) containing "cache-control: max-age=0"?
    I've found so far 2 half solutions:
    1) use ETag and modified date, see the Tyler Muth's note Link: [http://tylermuth.wordpress.com/2008/02/04/image-caching-in-plsql-applications/].
    with this technique FF continues to send request each time but the answer is shorter because it's just a "304 not modified" instead of "200 OK" (200 response is bigger as it contains the image).
    it's better than nothing but you still have 1 request + 1 response for nothing.
    Another problem is that you need SYS access to implement this, which is not possible on an hosted server. (note that for images from the file system it is already foreseen by apex 3.1, Tyler's note is for images from the db)
    2) if you preload the image (using myimage=new Image();myimage.src='...';), then there is max 1 request per browser session.
    There are 2 minor issues here:
    - no caching across sessions
    - if u don't want to preload all the images (example a page with lots of thumbnails, when user clicks it show a bigger image, in that case the thumbnails can be preloaded but overkill for the big images), then you need to load the image, wait until the image has loaded before displaying it, it does not slow down the execution, but requires some extra JS.
    I'm not asking anyone to investigate it, i can live with the 2 workarounds,
    but just in case someone encountered the same problem and already fixed it.
    Let me know if u managed to use the John Scott's technique with Firefox. (U can use Firebug to see the http traffic)
    Thx
    Tim

    Hi Anshul, hope these help. Let me know if you need to see anything else.
    Best,
    Menu Settings:
    Tab Hyperlink:
    Label Text with with hyper link option not available (works as a hyperlink in chrome and IE though):
    Thanks for the help in advance!

  • Adobe Connect Enterprise Server 6 doesn't work on Firefox and Chrome

    Hi everyone,  we are using adobe connect enterprise server 6 recently the layout on Chrome and Firefox looks horrible but it works fine on IE, i have attach a photo of how it look on Firefox, any suggestion what the problem might be, thanks in advance.
    When we get this when we login:
    function showContentWithNav(url, pres, session, cw, ch, noScale, scrollbar, toolbar, status, location, target) {
            if (target == undefined)
                target = "";
    no need for adding session in URL. could be misused or mistakenly sent by user to others.
    and then used to access to webapp by someone.
    -- REMOVING IT   --
    var w, h, l, t;
    if (pres) {
    w = 0.96 * screen.width;
    h = 0.76 * screen.height;
    l = (screen.width - w) / 2;
    t = (screen.height - h) / 2;
    } else if (noScale) {
    w = cw;
    h = ch;
    l = (screen.width - w) / 2;
    t = (screen.height - h) / 2;
    } else {
    if (cw > 0 && ch > 0) {
    if (cw <= screen.width) {
    w = cw;
    h = w * ch /cw;
    if (h > screen.height) {
    h = screen.height;
    w = h * cw / ch;
    } else {
    w = 0.4 * screen.width;
    h = 0.3 * screen.height;
    l = (screen.width - w) / 2;
    t = (screen.height - h) / 2;
    var options = "toolbar=" + toolbar + ",status=" + status + ",location=" + location + ",resizable=1,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h;
    if (scrollbar==false)
    options += ",scrollbars=no";
    else
    options += ",scrollbars=yes";
    var win = open(url, target, options);
         * Default showContent window, which displays popup w/ no navigation.
        function showContent(url, pres, session, cw, ch, noScale, scrollbar, target) {
          var toolbar = 0;
    var status = 0;
    var location = 0;
    showContentWithNav(url, pres, session, cw, ch, noScale, scrollbar, toolbar, status, location, target);

    I opened a new Flex project and then tried again. I finally found that it's not a problem of flash but div rendering.
    It seems Firefox and Chorme don't pass mouse wheel event automatically if div layout is set to "absolute".
    Although this is not a Flex issue, any idea of passing that event to flash will be appriciated. I haven't find a way to do it so far :-(
    What I'm doing is editing the "index.tamplate.html" to test. I added a div to contain the div of "flashContent" and set it's style to:
        position: absolute;
        top: 150px; left: 150px;
        height: 250px; width: 250px;
        z-index: 10;
    Another div's z-index is set to 1 to test the overlay effect.
    The reason why I added a div to contain the original div of flash, is I cannot figure out a way to effectively edit the CSS of the "flashContent" div.
    Any help will be thankful!!

  • SVG displaying issue when textpath is refering to an id - working in Firefox and Chrome

    So I found a bug in the latest Internet Explorer. You can see it in this fiddle:
    http://jsfiddle.net/5uc17jwr/21/
    Works great in Chrome and Firefox
    but does not show all text elements in Internet Explorer. So the question is why are
    just 2-3 words displayed?
    There is no reason for that. The lines are no where negative and also the 3. oder 4. works is like all the others.
    I found something that said the size needs to be 100% or so, but that did not work.
    So how can I get it working on the IE11?
    Thanks

    Hi,
    re: http://fiddle.jshell.net/5uc17jwr/21/show/
    at a guess, I would suspect that you have one too many commas(,) in your jsen variable...
    eg.
    var foo={'name':'river1','name':'river2','name':'river3',,'name':'river5','name':'DeNial',};
    Using your browsers developer tool console compare the string of currentmap (type currentmap in the console tab)
    this (ignoring exogenous commas) is a known 'feature' of the JSON parser.
    Regards.
    Rob^_^

  • Bug? Mouse wheel doesn't work on Firefox and Chrome when added an application skin

    I added a customized skin to make the background of Flex to transparent. The skin is created by the "new file wizard" and only changed the "backgroundRect" 's alpha to "0".
    It works with no problem in IE8.0.6001 and Opera11.6 but doesn't respond to any mouse wheel event in FireFox 11.0 and Google Chrome 17.0.963.79.
    Is it a BUG?
    The flash player's versions are: IE:11.1.102.55; FireFox:11.1.102.55; Chrome:11.1.102.63; Opera:11.1.102.55

    I opened a new Flex project and then tried again. I finally found that it's not a problem of flash but div rendering.
    It seems Firefox and Chorme don't pass mouse wheel event automatically if div layout is set to "absolute".
    Although this is not a Flex issue, any idea of passing that event to flash will be appriciated. I haven't find a way to do it so far :-(
    What I'm doing is editing the "index.tamplate.html" to test. I added a div to contain the div of "flashContent" and set it's style to:
        position: absolute;
        top: 150px; left: 150px;
        height: 250px; width: 250px;
        z-index: 10;
    Another div's z-index is set to 1 to test the overlay effect.
    The reason why I added a div to contain the original div of flash, is I cannot figure out a way to effectively edit the CSS of the "flashContent" div.
    Any help will be thankful!!

  • External Javascript not working with C# and XAML windows phone app

    I've added a WebView into my project. If I navigate to the html file that contains external javascript files they don't work. Bit if I write the javascript code hardcoded into the html file it works properly.
    Here is the html portion:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta charset="utf-8" />
    <title></title>
    <script type="text/javascript" src="testjs.js"></script>
    </head>
    <body>
    <div id="abcd"></div>
    <br/>
    hello! this is a simple html block.
    </body>
    </html>
    Here is the javascript portion:
    document.getElementById("abcd").innerHTML = "New text!";
    When I open the webview it shows
    hello!
    this is a simple html block.,
    but if the javascript code worked it would show
    New
    Test! hello! this is a simple html block.
    And in the C# code the uri is called this way:
    url = onlineTestWebView.BuildLocalStreamUri("myUrl", "problem_page/test.html");
    StreamUriWinRTResolver myResolver = new StreamUriWinRTResolver();
    onlineTestWebView.NavigateToLocalStreamUri(url, myResolver);

    I assume this is because you are using NavigateToString. Please see
    http://blogs.msdn.com/b/wsdevsol/archive/2014/06/20/a-primer-on-webview-navigatetolocalstreamuri.aspx
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

Maybe you are looking for

  • UCMA 4 and back to backing a file transfer request

    OK, I know that file transfer isn't technically supported on UCMA 4.0, but I wanted to take another look at it and see whether there was a way to b2b a file transfer request. After all, there's no reason that it shouldn't work if the messaging is cor

  • Password for oc4jadmin is not being set for silent install.

    Application Server 10.1.3 for Windows I have recorded a silent install response file. I have added the following line in order to set the password of the oc4jadmin account, but it does not appear to work because I get an invalid username/password whe

  • Iphoto won't open in pse 11

    I have to drag my picture from iphoto to pse 11 even though I have it set to edit in pse 11 when I double click. it does bring up pse 11 but then I have to choose between editor and organizer...then I have to drag picture from iphoto into pse 11...an

  • ALV buttons - Changed size

    Has anyone encountered that after upgrading to SAP Enterprise 6.2 and/or to SAP Gui (level 49), that user toolbar buttons in ALV grid have enlarged dramatically in size ? We have had this problem after our upgrade, but haven't found any information o

  • Serious Privacy Issue On Vdo Calling

    Posts Outbox Privacy Issues On Encryption in Pakistan From: Burraq To: privacy Sent: 8:45 PM Read: Not Yet Read Me And My Wife Use To Talk On Video Callings On Skype And Imo.im But I Have Some Serious Concerns About My Privacy. (1) I lives In Pakista