Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8851883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:15:56+00:00 2026-06-14T13:15:56+00:00

I got the following javascript code. And Basically, it works on FF, and IE

  • 0

I got the following javascript code.
And Basically, it works on FF, and IE with developer Tools.

$(function(){
    console.log("it is ok");
    var mybutton="";

    alert("ready1");
    $('button[name="delorder"]').click(function(){

        console.log($(this).val()+"hay i got a click");
        mybutton=$(this).val();
        alert("a click1");
        $.ajax({
            type:'POST',
            url:'deleteorderitem.php',
            data:mybutton,
            success:function(result){

                if((result.indexOf("t") < 3) && (result.indexOf("t") >= 0)){                    

                    $('#orderresult').html(result);                 

                    console.log("i am 3 ");
                    console.log("index of t is "+result.indexOf("t"));
                }else{
                    console.log("i am 4");                      
                    console.log("index of t is "+result.indexOf("t"));
                    $('#divOrderButton').hide();
                    $('#orderresult').html("");
                    $('#divNoinfo').html("There is no record to display at the moment.");
                    $('#divNoinfo').show(); 
                    $('#divOrder').hide();
                }
            }
        });
    });
});
</script>

But , it does NOT WORK on IE (without developer tools).
so, any advice will be appreciated.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:15:58+00:00Added an answer on June 14, 2026 at 1:15 pm

    It is mostly because of

    console.log()
    

    Windows IE8 and below has no console object when the Developer tools is not open.

    Either comment out the lines that says console. Or create the console object beforehand.

    Try this … Not sure if this is the correct way around..

    var alertFallback = true;
       if (typeof console === "undefined" || typeof console.log === "undefined") {
         console = {};
         if (alertFallback) {
             console.log = function(msg) {
                  alert(msg);
             };
         } else {
             console.log = function() {};
         }
       }
    

    This will create the console object if it is not present.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got the following code : <script type=text/javascript> jQuery(document).ready(function(){ var Opened = false; jQuery('.expend-schedule').click(function(e){
I've got the following code: <code><html> <body><br> <script type=text/javascript src=http://code.jquery.com/jquery-1.4.2.min.js /> <script type=text/javascript> alert(debug);
I'm not a javascript guru. I've got the following code below: var aCookieValues =
All, I've got the following code: <script type=text/javascript> function Store( lat, long, text )
I've got the following code in a Javascript ERB file: $(document).ready(function() { $(#workout-week).append( <%=
I've got the following Javascript code: function RemoveRequest( requestToRemove ) { FB.api( requestToRemove, 'delete',
I've got the following javascript code, which enables a bunch of validators. ValidatorEnable(document.getElementById(<%=AddressValidator.ClientID %>),
I've got the following jsp page and I'm using struts2-jquery-plugin-3.1.1 <script type=text/javascript> function openDialog()
I have the following prototype JavaScript code Event.observe( window, 'load', function() { Event.observe( 'agreement',
In my .aspx I've got the following javascript variable defined: var action = <%=ProdView

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.