Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How Can I Fill a Page To a Div In Google Chrome

Google Chrome Dose Not Work With this Code !!!
JavaScript
$('#id').load('page.html');


IE8 + Support This J-query Code But Google Chrome Can't Run IT.

Please Help !!! I Need Resolve This Problem In Google Chrome
Posted
Updated 9-Sep-14 21:11pm
v2
Comments
Kornfeld Eliyahu Peter 1-Sep-14 9:41am    
Please check with debugger if there is any error on Chrome...
Ali Javani 24-Sep-14 13:36pm    
I try That Two . and i wanna Check That next Time .
if i get answer Tell that to all .
Ali Javani 10-Sep-14 3:20am    
Dear Kornfeld Eliyahu Peter Thanks For Your Solution BUT Chrome Dose Note Support This Code Now How I Can Debug a Code Chrome Can Not Support ? ;)

Hi Ali Javani,

Looks like Javascript is disabled in our Chrome. Its not the code that's causing the issue, but the browser itself and the code is looking fine. Check in the Chrome settings regarding the JS enable/disable checkbox.

Follow this link here[^] and let me know if has solved your problem.

Cheers
RelicV
 
Share this answer
 
Comments
Ali Javani 15-Sep-14 4:39am    
Thanks For Comment.
This Option Is Enable in My Chrome And Your Google Chrome .

but If You Try IT In Your Chrome
$('#id').load('Page.htm || html');
Then You See All Browsers Even IE8 Support This Code But Chrome Dose Not Support This Code .
Try with:

$.ajax({
  url: "page.html",
  dataType: "html",
  success: function(data) {
    $("#id").html(data);
  }
});


instead of the load() snippet.

If this fails, then you have an issue with your Chrome. Otherwise, you have an isse with the load function.
 
Share this answer
 
Comments
Ali Javani 10-Sep-14 3:24am    
Dear Thanks For Your Comment.
But

$.ajax({
url: "page.html",
dataType: "html",
success: function(data) {
$("#id").html(data);
}
});

Dose Not Work On Chrome And IE Too . See My
$('#id').load('page.html');

Worked On Fire Fox And IE8+
but Your Code Dose not Work
Please Give me a Solution That Working On All Browsers . ;) .

Best Regards Ali Javani .
Ali Javani 10-Sep-14 5:00am    
I Developed Your Code And Add Some Thing On Your Method Like This :

$.ajax({
type: "POST",
url: "page.html",
dataType: "html",
beforeSend: function () {
alert('Befor Send');
},
complete: function () {
alert('Complete');
},
success: function (data) {
var div = document.getElementById("result");
alert('Success');
div.innerHTML = data;
},
error: function () { alert('Error Begin :( '); }
});

in Other Browsers That Worked Correctly But In 'Google Chrome' This Code
alert('Error Begin :( ');

Best Regards

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900