473,471 Members | 1,898 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

calling external files from ajax pages

67 New Member
Hi

I'm having a few issues and was wondering if I could get some help from here.

Well, we call ajax from a page with an event handler, like onclick. Then, we have a second page where we have our code that gets executed and shows in the first page.

How can we have an external js or css file associated with the second page? I mean, if the second page is only about echoing date like echo date("Y-m-d"); it's simpler, but what about if that second page holds a form, and needs some external javascript and css file to work.

Where and how should we have those files? In a traditional page, we will include the files inside the <head> of the page, but here since we don't have a head for the second page, how to do this?

Any help / tips?
Thanks.
Aug 11 '08 #1
1 1455
rnd me
427 Recognized Expert Contributor
typically, the inner content of a tag is injected into the container usinng .innerHTML or document.write

you need to match up the target with the response, and format the response in a format appropriate to the type of data expected in the target container be it json, html, css, or whatever.
Aug 11 '08 #2

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

Similar topics

9
by: Charley Kyd | last post by:
I'm a newbie who needs advice about how to use external files of JavaScript code. I spent an hour this afternoon browsing through JavaScript books at the local book store. In about 15 different...
11
by: j23 | last post by:
I have library (static) testlib.cpp: #include <stdarg.h> void xxx(...) { char buf; va_list args; va_start(args, buf); va_end(args); }
1
by: carllucas | last post by:
I'm struggling to understand how to use external css files with external jscript scripts? plus, does anyone know how to access function between jscripts? for example how would I call function...
2
by: Jeff Allan | last post by:
Hello, I am trying to load an external HTML page into a DIV tag with .NET 05 and I can't figure it out. Any suggestions? My Scenario: - Gridview populated with list of available files - I...
1
by: Danny | last post by:
Hey everybody, I am a complete newbie with Javascript but was wondering if anybody could tell me how to load pages dynamicly within a div? Here is the site: http://regiesrule.info, i would like...
13
by: newlearner | last post by:
hi, Im new into Ajax and Javascript, I have a doubt... I have a External javascript. and a couple of html files and I load These through ajax request and response. The html pages contain a...
5
by: Phantom | last post by:
I am re-designing a website which currently makes use of Frames. (I want to replace them with something more convenient.) It has a layout page, a menus frame and content frame for various content...
47
by: mukeshrasm | last post by:
Hi I am calling two pages using Ajax Get_Pages.php and Get_Content.php from combo box. Both pages are displayed based on selection from combo box. Main problem is that it is not showing the...
0
by: msch.prv | last post by:
Hi, I have a series of external js files (tiny mce, ..) and plan on adding some Ajax (Ajax tool kit) to parts of the site. Question: Must these js files be embedded in the script manager or can...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.