473,394 Members | 1,810 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,394 software developers and data experts.

ajax to html

Is it possible to send an XHR to a HTML page to be "processed" by
javascript in that page and to then get a response back?

Andrew Poulos
Nov 11 '08 #1
5 1390

"Andrew Poulos" <ap*****@hotmail.comwrote in message
news:49**********************@per-qv1-newsreader-01.iinet.net.au...
Is it possible to send an XHR to a HTML page to be "processed" by
javascript in that page and to then get a response back?
I think that the name ...Request Object makes it obvious that it makes a
reuest to a server-side script. I don't think that what you are asking is
possible.

--
http://easy-translate.com
Nov 11 '08 #2
Andrew Poulos wrote:
Is it possible to send an XHR to a HTML page to be "processed" by
javascript in that page and to then get a response back?
Not with client-side javascript. XHR always returns the full response.
But tnder controlled conditions you could 'eval' the javascript code
inside the caller file.

--
Bart
Nov 11 '08 #3
Andrew Poulos wrote:
Is it possible to send an XHR to a HTML page to be "processed" by
javascript in that page and to then get a response back?
No. There are no "HTML pages" to begin with; there are HTML *documents*
that are not programs (<prayer_wheel><acronym title="HyperText Markup
Language">HTML</acronymis not a programming language. There are no HTML
commands. </>; [psf 7.9]), but they may *contain* (ECMAScript-compatible)
programs (through the [X]HTML `script' element) that are run *when parsed*.
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Nov 11 '08 #4
Bart Van der Donck wrote:
Andrew Poulos wrote:
>Is it possible to send an XHR to a HTML page to be "processed" by
javascript in that page and to then get a response back?

Not with client-side javascript. XHR always returns the full response.
But tnder controlled conditions you could 'eval' the javascript code
inside the caller file.
I would presume "that page" means the HTML document requested, not the HTML
document from where the request originates. And the code in "that page" is
_not_ executed on such a request in its original context, and also not with
"external" eval().
PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Nov 11 '08 #5
Thomas 'PointedEars' Lahn wrote:
Bart Van der Donck wrote:
>Andrew Poulos wrote:
>>Is it possible to send an XHR to a HTML page to be "processed" by
javascript in that page and to then get a response back?
>Not with client-side javascript. XHR always returns the full response.
But tnder controlled conditions you could 'eval' the javascript code
inside the caller file.

I would presume "that page" means the HTML document requested, not the HTML
document from where the request originates. And the code in "that page" is
_not_ executed on such a request in its original context, and also not with
"external" eval().
True. But the original poster might (or might not) be interested to
'eval' the returned code, or a part of it. That is the only client-
side possibility here.
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Microsoft Frontpage doesn't exist anymore since 2006. Its successor
Microsoft Expression Web attempted to overcome the weaknesses of
Frontpage, and is (IMHO) reasonably succesful in that.

--
Bart
Nov 11 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: bobzimuta | last post by:
I'm creating a simple AJAX library. It's an object that will return an array containing the response text or xml. I'm trying to find a way to assign the response as a property of the object, but...
5
by: darrel | last post by:
I've been playing with prototype.js and scriptaculous to create some nice drag-and-drop interaction on my applications GUI. That's working well. Now I want to take the next step and start passing...
4
by: Frances | last post by:
I literally started learning AJAX just last weekend.. I have this page, http://www.francesdelrio.com/ajax/db2.html, where I'm essentially doing what's here,...
1
by: www.web20developers.com | last post by:
http://www.web20developers.com http://www.web20developers.com/index.php?option=com_content&task=view... Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novell AJAX -...
9
by: RBM007 | last post by:
Hello, I have created some pages in the (old) Atlas pages and migrated to AJAX version. After the update I noticed that any page containing ASP.NET AJAX won't compile anymore. Even if the same...
2
by: shivendravikramsingh | last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if...
10
by: paulie | last post by:
Hi, I have been experiencing an issue when trying to use AJAX to reload a DIV area using a timer of 2000ms, which contains a html page with another DIV and javascript. Scenario -------------...
2
by: majidtou | last post by:
Hi , We have an HTML page which is using AJAX. We make an AJAX call which retrieves a table with mutiple rows. We need to extend this functionality. In the table, we want to put a button on each...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...

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.