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

javascript in ajax opened url

I am a ajax newbie so be kind please!
I'm not sure if my title made sense, but I'll try to be clear about my question.

Why does the javascript that is in the page that I have requested from xmlHTTPRequest.open not get interpreted/read?

When I bring back the page, nothing that is in
<script language="javascript"></script> gets printed to the screen.

Does that make sense?

Esscher
Feb 24 '08 #1
5 1154
ronverdonk
4,258 Expert 4TB
Looks like a puzzle to me. Why don't you show some code and we all know what you are talking about.

And show any code within the appropriate code tags!

Ronald
Feb 24 '08 #2
gits
5,390 Expert Mod 4TB
hi ...

that seems like the old problem with simply using ajax to reload entire pages ... that is not the best way to use ajax ... you just should retrieve content to replace it in an existing page. when you load a html-page and set the innerHTML or whatever the page isn't really 'loaded' and so the js-code contained there is not evaluated so you have to evaluate the code explicitly in such a case ...

kind regards
Feb 25 '08 #3
Gits,
Thats the answer I was looking for, but unfortunatly, not what I wanted to hear. Do you know if there is any way to accomplish reloading of entire pages using ajax? Once I heard about what ajax was capable of, I became very excited because since the day I began using the internet I have disliked the reloading process. I am also looking at Flex to solve this problem, but would rather stick to ajax if its possible. Thanks

Esscher
Feb 26 '08 #4
gits
5,390 Expert Mod 4TB
as i said ... when you 'ajax-load' javascript code you just have to eval() the code explicitly so the best way would be to load it seperatly from the html ... first load the html and process/set it where you want to have it ... now you could load the script and eval it ... with that steps you also avoid the onload-problem when it could occur, since you don't have an onload when you just replace nodes ...

kind regards
Feb 26 '08 #5
I'm going to try that out.. seeing as how I am still learning ajax, it will take some time, but glad to see that it is possible.

also, I did find some other links on the internet in case anyone else is trying to do the same..

http://saloon.javaranch.com/cgi-bin/...&f=20&t=006435

http://saloon.javaranch.com/cgi-bin/...&f=20&t=007305
Feb 26 '08 #6

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

Similar topics

4
by: Matt Jensen | last post by:
Howdy all Hopefully I can explain my problem straightforwardly. In it's simplest explanation, what I want to do is have a hyperlink that, when clicked, executes some client side JavaScript and...
2
by: sgmaat | last post by:
I have create a AJAX webpage where if you press a link content is loaded into a div. NOw when this content is loaded no javascript is processed (i.e <Script>alert(..);</script>), but if the...
0
by: Free Ebooks | last post by:
81 AJAX and 24 JavaScript Ebooks Here are some of the AJAX topics and areas covered by these ebooks: Rails and AJAX Building Ajax Web Applications Creating Ajax Web Pages Ajax Patterns Ajax...
2
by: Nathan Sokalski | last post by:
I am moving my website from my machine to my webhost, and need some help with what extra files I need to include due to the fact that I used AJAX in my site. Everything on the site is obviously...
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 -------------...
4
by: ton | last post by:
Hi, I wander what to do. I'm developing a webapplication. One of the parts is to show records from a database. To modifiy a value, text of relational link or date I would like to use Ajax where...
3
by: pablosuk78 | last post by:
Dear coders, I'm facing a problem and after few research I found that many ppl were looking around for the same solution, hope someone more expert than me could give a good help. I created an...
5
by: aelred | last post by:
I have a web page where a member can open up a chat window (child window) with another member. - From there the member can also navigate to other web pages. - From other pages in the site, they...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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...

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.