---
title: "using get method fetching html data, getting wrong response result"  
description: "using get method fetching html data, getting wrong response result"  
author: "Anonymous User"  
published: 2013-05-11  
updated: 2013-05-11  
canonical: https://www.mindstick.com/forum/870/using-get-method-fetching-html-data-getting-wrong-response-result  
category: "jquery"  
tags: ["jquery"]  
reading_time: 1 minute  

---

# using get method fetching html data, getting wrong response result

Hi [Expert](https://www.mindstick.com/articles/13120/an-expert-financial-advice-will-improve-your-finances)!\
I am using jQuery get [method](https://www.mindstick.com/forum/166/webservice-method) to load html's data to [store](https://www.mindstick.com/articles/13125/tips-to-increase-sales-of-your-woocommerce-store) in to my array, for that i use this method:\
line of code are given\
var temps = [function](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server)(views){ var tempts = []; $.each(views, function(i,view){ if(view){ tempts.push($.get("[templates](https://www.mindstick.com/articles/12874/crucial-benefits-of-using-powerpoint-templates-in-your-business-presentations)/" + view + ".html"), function(data){ [console](https://www.mindstick.com/blog/210/the-console-class).log(data);//i am not getting [response](https://www.mindstick.com/forum/12719/how-to-make-response-write-display-special-character-like-lt-gt) text.. getting array object. })}})\
while I console the data i [am getting](https://www.mindstick.com/forum/34179/i-am-getting-error-while-assigning-the-data-to-the-array-list) a array object as like this:\
[Object { readyState= 4, responseText="<div id="login">\n <form...eldset>\n </form>\n</div>", [status](https://www.mindstick.com/articles/157184/check-lic-policy-status-online-by-policy-number)=200, more...}, function()]\
please help me!Thanks in [advance](https://www.mindstick.com/blog/33258/jee-mains-and-jee-advance-exams)!\

## Replies

### Reply by AVADHESH PATEL

Hi Samuel!\
Try as following:\
tempts.push($.get("templates/" + view + ".html", function(data){console.log(data);}));


---

Original Source: https://www.mindstick.com/forum/870/using-get-method-fetching-html-data-getting-wrong-response-result

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
