473,414 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

How to get text content from another website by javascript in asp.net?

hello...
i'm creating a web application in asp.net in which i would like to give user a one JavaScript code, through which the user can get content from my website to his/her own website.

i've used one generic handler to process user request in my website.

so, now How can i do this, i've tried using jQuery..
jQuery can only process requests from current server, not from other server (if i'm not wrong)

code on www.otherwebsite.com
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" src="jquery.x.x.js">
  2. </script>
  3. <script type="text/javascript">
  4. $('#result').load('www.myWebSite.com/getData.ashx');
  5. </script>
  6. <body>
  7. <div id="result">
  8.  
  9. </div>
  10.  
  11. </body>
  12.  
Above code isn't working.. :(

is there any other way to send content from my website to other website??

any help would b greatly appreciated.
-thanx
Mar 23 '11 #1
4 4568
NitinSawant
270 100+
you need to build a server side web method[using screen scraping in asp.net] which fetches data from external site and sends it to browser

http://weblogs.asp.net/grantbarringt...ping-in-c.aspx
Mar 23 '11 #2
but... actually i want to give a javascript code to my users,
through which they can get content of a page from my website... to their website...
Mar 23 '11 #3
NitinSawant
270 100+
its not possible because same domain policy restrictions

http://en.wikipedia.org/wiki/Same_origin_policy
Mar 23 '11 #4
Its too late to inform you guys that I've achieved it using javascript to generate an <Iframe > on otherwebsite.com and in iframe src I kept mywebsite.com/getData.ashx.

Thanks to all of you who replied to my thread.
-Ravi Dhoriya
Apr 29 '14 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: malcolm | last post by:
How do I get a web-browser loaded with on-the-fly content and a JavaScript onclick popup function to work? I've embedded an axWebBrowser in my (vb.net) application. The browser starts with...
4
by: michael | last post by:
I have an html text string within a div, eg.: <div id="example">Text text text</div> I know its easy to change styles by using getElementById - for example: ...
3
by: tungchau81 | last post by:
Hi, A Modal Dialog does not allow us to highlight the text content inside <DIV> tag unless I use a <textarea> tag to display that text content. However, the situation of my software makes it...
7
by: Arancaytar | last post by:
(Note: I am a Javascript newbie. I can handle PHP and Java, but this is unfamiliar territory.) For a wordcount feature, I need to collect the complete text content of a 'div' element inside a...
4
by: rn5a | last post by:
Assume that there's a website named www.abc.com. There are 2 ASPX files & one MS-Access database file in this site. The 1st ASPX file is named "SearchForm.aspx" & the 2nd ASPX file is named...
2
by: hmchkus | last post by:
Hi, How can I integrate part of information from another website on my page? For example, a table of schedule, weather, stock info... I would like to know both way: 1. redirect the client...
2
by: zerodevice | last post by:
Hi, I'm trying to code my php that allows me to extract or fetch the html codes from another website, then i'll filter it myself to get only the specific text i want and display or echo it directly...
4
by: david.karr | last post by:
I have a simple test page with a "div" that just contains text content. I assigned a var to the "div" element, and I'm trying to get the "first child" of that element to get the text content. I'm...
11
by: sreekandan | last post by:
hi everyone.... i want the coding help in Javascript to "swap the content of two Textbox elements" ..Kindly reply me.....
18
by: wizdom | last post by:
Help - change text on click - text has another onclick inside with php variables ---------- I think what I'm trying to do is simple. I have a 2 buttons on a page. 1 button allows a thread of...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.