Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by duncanb7
at 2024-11-17 08:39:04
Point:500 Replies:13 POST_ID:828428USER_ID:11059
Topic:
JavaScript;;Hypertext Markup Language (HTML)
Do you know where I can find the function or javascript library of responseHTML in other webiste ?
so I can access it through DOM to extract data in other HTML file like
document.getElementById('test').innerHTML =xmlhttp.responseHTML.getElementByID("......)
that is similar to extract xml data from xmlhttp.responseXML
I got one but not complete at http://www.ohjelmointirengas.fi/Ohjelmointi/responseHTML.txt
Please help and advise
Duncan
so I can access it through DOM to extract data in other HTML file like
document.getElementById('test').innerHTML =xmlhttp.responseHTML.getElementByID("......)
that is similar to extract xml data from xmlhttp.responseXML
I got one but not complete at http://www.ohjelmointirengas.fi/Ohjelmointi/responseHTML.txt
Please help and advise
Duncan
Expert: Rob Jurd replied at 2024-11-18 13:21:34
I believe it is because IE caches ajax requests
Author: duncanb7 replied at 2024-11-18 13:14:26
Author: duncanb7 replied at 2024-11-18 13:13:14
thanks for all of you to reply
Please switch to new thread,
I get big problem before using
anything mootools
Author: duncanb7 replied at 2024-11-18 13:09:19
Dear taqit,
Okay thanks, I will remember you, now the big question is at following link , please help to review
http://www.experts-exchange.com/Programming/Languages/Scripting/AJAX/Q_26625196.html.
I don't know why I click may time of the button of the ajax code from wc3 is always
displaying the past data. SO the code is only worked for first time when I open my IE windows
I will credit all the thread to you .
DUncan
Okay thanks, I will remember you, now the big question is at following link , please help to review
http://www.experts-exchange.com/Programming/Languages/Scripting/AJAX/Q_26625196.html.
I don't know why I click may time of the button of the ajax code from wc3 is always
displaying the past data. SO the code is only worked for first time when I open my IE windows
I will credit all the thread to you .
DUncan
Expert: Rob Jurd replied at 2024-11-18 13:05:58
the "Request" is part of mootools. without mootools you would have to determine which ajax object to use... see here:
http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_first
the onSuccess is an Event that happens when the Request is completed and receives data back
AJAX = Asynchronous JavaScript and XML.
AJAX is not a new programming language, but a new way to use existing standards.
AJAX is the art of exchanging data with a server, and update parts of a web page - without reloading the whole page.
Of course it will work with D: but as long as you are running it through a local webserver like http://localhost
http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_first
the onSuccess is an Event that happens when the Request is completed and receives data back
AJAX = Asynchronous JavaScript and XML.
AJAX is not a new programming language, but a new way to use existing standards.
AJAX is the art of exchanging data with a server, and update parts of a web page - without reloading the whole page.
Of course it will work with D: but as long as you are running it through a local webserver like http://localhost
Accepted Solution
Expert: Rob Jurd replied at 2024-11-18 13:01:57
500 points EXCELLENT
all you are doing above is creating a mootools Request object everytime you run "main()". nothing happens because you're not asking it to do anything. you need to tell the request to send()
function main() {myRequest = new Request({ url: "http://www.e-hftrade.com/mootools/screen_update/sales1.htm", noCache: true, link: 'ignore', method: 'get', async: false, onSuccess: function(responseText, responseXML) { $('my_content').innerHTML = responseText; alert($('my_content').getElementsById('Book1_25322').getElementsBYTagName('img').src); } }).send();} 1:2:3:4:5:6:7:8:9:10:11:12:13:
Author: duncanb7 replied at 2024-11-18 07:18:39
alert($('my_content').getElementsById('Book1_25322').getElementsBYTagName('img').src);
It shoud be working but not work, why ? even I also put back <div id="my_content">loading</div>
It shoud be working but not work, why ? even I also put back <div id="my_content">loading</div>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.0/mootools-yui-compressed.js"></script><script type='text/javascript'>function main() {myRequest = new Request({ url: "http://www.e-hftrade.com/mootools/screen_update/sales1.htm", noCache: true, link: 'ignore', method: 'get', async: false, onSuccess: function(responseText, responseXML) { $('my_content').innerHTML = responseText; alert($('my_content').getElementsById('Book1_25322').getElementsBYTagName('img').src); } });}</script><input type='button' onclick="main();" value='click me' /><div id="my_content">loading</div></head></html> 1:2:3:4:5:6:7:8:9:10:11:12:13:14:15:16:17:18:19:20:21:22:23:24:25:26:27:28:29:
Author: duncanb7 replied at 2024-11-18 07:03:36
alert($('my_content').getElement('#Book1_25322').getElement('img').src);
has javascript error
has javascript error
Author: duncanb7 replied at 2024-11-18 06:43:55
Dear Taqit,
it is not wokring and no response for my following try , and your index.html
in other thread is working for sales1.htm so I put this following code file in the same directory
under screen_update
And I want to know which word in your is code calling mootools libray , OnSucess, Right ?
And I found some ajax example is working if I put the code file at D: drive
and some is not like yours. Actually, xmlhttp is internet stuff, so it cannot access file system
on PC, RIght? But I don't know why some ajax example is also working on D: drive.
Duncan
Please advise
Duncan
it is not wokring and no response for my following try , and your index.html
in other thread is working for sales1.htm so I put this following code file in the same directory
under screen_update
And I want to know which word in your is code calling mootools libray , OnSucess, Right ?
And I found some ajax example is working if I put the code file at D: drive
and some is not like yours. Actually, xmlhttp is internet stuff, so it cannot access file system
on PC, RIght? But I don't know why some ajax example is also working on D: drive.
Duncan
Please advise
Duncan
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.0/mootools-yui-compressed.js"></script><script type='text/javascript'>function main() {myRequest = new Request({ url: 'sales1.htm', noCache: true, link: 'ignore', method: 'get', async: false, onSuccess: function(responseText, responseXML) { $('my_content').innerHTML = responseText; alert($('my_content').getElement('#Book1_25322').getElement('img').src); } });}</script><input type='button' onclick="main();" value='click me' /></head></html> 1:2:3:4:5:6:7:8:9:10:11:12:13:14:15:16:17:18:19:20:21:22:23:24:25:26:27:28:
Expert: Rob Jurd replied at 2024-11-18 03:05:50
That's right, the html file has to reside in the same domain unless you want to use the additional Request.JSONP package from mootools
see: http://www.clientcide.com/wiki/cnet-libraries/06-request/00-jsonp
Btw You've answered this question in your other question you have open: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_26622228.html?cid=1749
that is the right code. I would focus on using the Request.HTML and the onSuccess function() to obtain the responseHTML content
see: http://www.clientcide.com/wiki/cnet-libraries/06-request/00-jsonp
Btw You've answered this question in your other question you have open: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_26622228.html?cid=1749
that is the right code. I would focus on using the Request.HTML and the onSuccess function() to obtain the responseHTML content
Expert: Michel Plungjan replied at 2024-11-18 01:07:52
However you will not be able to ajax to another website unless for IE it is in trusted sites and for Fx it implements Cross Origin Resource Sharing
Expert: Rob Jurd replied at 2024-11-17 21:35:19
is the part i'm talking about
Expert: Rob Jurd replied at 2024-11-17 21:34:55
I've used mootools but JQuery will do the same for you. the following is the ajax request object using the mootools library. When the data has been received you can see I load an htm page and then access elements within it using simple css selectors.
myRequest = new Request({ url: "sales1.htm", noCache: true, link: 'ignore', method: 'get', async: false, onSuccess: function(responseText, responseXML) { $('my_content').innerHTML = responseText; alert($('my_content').getElement('#Book1_25322').getElement('img').src); } }); 1:2:3:4:5:6:7:8:9:10:11: