views:

25

answers:

2

Hello guys,

I am making an Ajax call within my page to a DB and pulling products that have images included.

Here is the ajax call that i'm making:

    $.ajax({
    type : "GET",
    url : "**https**://www.mydomain.org/getRow.php",
    dataType: 'html',
    success: function (msg) {
        $(".drag-desired").html(msg);
        $.event.trigger('init-draggable-products');
    },
    error: function (xhr) {
        $('#errorDisplay').html('Error: '+ xhr.status + '' + xhr.statusText);
    }
});

Problem that I am having is with IE it gives a prompt asking if the visitor would like to view the unauthenticated content. If the person was to click no or yes they would like the browser to block that content I'm not getting the products to display.

Here is my php file that is grabbing the products:

<?php

define('INCLUDE_CHECK',1);
require "connect.php";

?>

<?php

$result = mysql_query("SELECT * FROM internet_shop WHERE price = 5");
while($row=mysql_fetch_assoc($result))
{
  echo '<div class="product"><img src="https://www.mydomain.org/img/products/'.$row['img'].'" alt="'.htmlspecialchars($row['name']).'" width="128" height="128" class="pngfix" /></div>';
 }

?>
A: 

If the php script resides on the same domain as the current website, try "/getRow.php" instead of "https://www.mydomain.org/getRow.php" for the url, this might fix it.

Steffen Müller
You know I had it that way before and it was still giving me that prompt.
Matthew
I think it has to do with the action of grabbing the products.You can view the test page here:https://www.passovermeal.org/CartTest.html
Matthew
A: 

You are seeing this error because you are loading only some of your contents over HTTPS the rest if being loaded over HTTP (without SSL). Some browsers just don't like it.

Using Live HTTP headers on your link. I can see that you are loading Jquery and Jquery UI over HTTP. (eg http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js )

Change these links to HTTPS and you will be fine.

e4c5
Thats a big Duh!! thanks. I guess having a second pair of eyes on this helps.
Matthew