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 3405260
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:29:02+00:00 2026-05-18T05:29:02+00:00

This code works in FF, Chrome, IE6/8 but not in Safari and Opera. Any

  • 0

This code works in FF, Chrome, IE6/8 but not in Safari and Opera.
Any ideas why?

Here is the code:

var name = $('#esm').val();
        var email = $('#nam').val();
        var message = $('#med').val();
        var ad_id = $('#i_d').val();

    var data_string = 'esm='+ name + '&nam=' + email + '&med=' + message + '&i_d=' + ad_id;

            $.ajax({
                type:       "POST",
                url:        "/my_php_file.php",
                data:       data_string,
                success:    function(data) {
                    $('#tip_loader').hide();
               if(data==1){alert('success'); }
               else {alert('error'); }
                       }//end success function
        }) //end ajax call

I have located the error to exactly the “Ajax” call, because when I put an alertbox just before the $.ajax the alert shows up correctly.
However, if I put the alertbox in the success function, nothing shows up, no alert.

This only happens in Opera and Safari…

EDIT:

FYI: I include this javascript file into a php file, and I also include the jquery.js file into the php file. So this is all in an external file.

EDIT:

/main.php
/bin/jquery.js
/bin/tip.js
/bin/tip.php

I include the above js files into main.php, and the form action in main.php is set to /bin/tip.php

And the path to the ajax url is /bin/tip.php instead of my_php_file.php

  • 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-05-18T05:29:03+00:00Added an answer on May 18, 2026 at 5:29 am

    Opera has a debugging tool built in called Dragonfly. Go to the Tools menu -> Advanced ->Opera Dragonfly
    If you don’t have the File menu bar, click Menu -> Page -> Developer Tools -> Open Opera Dragonfly

    Once you have it open (open it on the page that you’re working on), click the Scripts tab (it’ll probably ask you to refresh the page, do that) and drop down to your external js file.
    Once you’ve found your code, you can set a breakpoint on the $.ajax() line by clicking on the line number on the left side. Now, trigger your code and you’ll see that it will break on that JavaScript line. You can then use the inspection tab (bottom, middle) to ensure that all of your variables are set correctly. You can also step through and debug the JavaScript.

    The other thing you’ll want to do is add an error function like so:

    $.ajax({
        type: "POST",
        url: "/my_php_file.php",
        data: data_string,
        success: function(data) {
            $('#tip_loader').hide();
            if (data == 1) { alert('success'); }
            else { alert('error'); }
        }, //end success function
        error: function(xhr, textStatus, errorThrown) {
            alert(errorThrown);
        }
    });  //end ajax call
    

    See if that gives you any more information.

    Also, check the error console as @Mufasa suggested. It can be found under the Error Console tab in Dragonfly.

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

Sidebar

Related Questions

Here is my code, this does not work in Chrome, Safari, FF or Opera.
This code : http://jsfiddle.net/bYtTG/1/ Works as I want in FF, chrome and opera, but
This code works fine, but I'll want to handle exception if any thing goes
This code works fine in Chrome. However, in Firefox, when it hits the GMxhr
This code works well for displaying separate xml items in my main.xml. But is
This code works well: UIDatePicker *pickerView = [[UIDatePicker alloc] initWithFrame:pickerFrame]; [pickerView addTarget:self action:@selector(pickerChanged:) forControlEvents:UIControlEventValueChanged];
This code works for me except it only checks for a duplicate once, and
This code works: monkey.h @interface monkey : NSObject { NSNumber *monkeyRanch; } @property (nonatomic,
This code works (when ControlType=dropDown then the background yellow ): <Window x:Class=TestCollapsed.Views.MainView xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
this code works fine until I start scrolling: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

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.