47 3302 acoder 16,027
Recognized Expert Moderator MVP
In addition to that, if it's a simple HTML file, you could just use JavaScript to add that content dynamically without the need for Ajax.
I can see where your problem is, though. You've defined GetXmlHttpObjec t twice. You only need it once. Secondly, you've already declared the global variable xmlhttp in file.js. Thirdly, you've redefined stateChanged(). Change that to something else in fileabc.js and change line 13 to reflect that.
@acoder
Thanks again! I fixed the errors now why I need to define GetXmlHttpObjec t once only and what problem stateChanged() caused in fileabc.js. and finally cann't I define global variables twice.
I am not calling html file actually it is dynamic file. that's why I am using ajax.
Thanks again!
acoder 16,027
Recognized Expert Moderator MVP
Although it may not necessarily result in errors, it's bad practice to define the same function twice. In your case, stateChanged was different, so was the main cause of the problem. If you can, try to avoid global variables or keep to a minimum - see this.
@acoder
thanks! and useful link to learn if you have some more please refer me.
acoder 16,027
Recognized Expert Moderator MVP
See the Off-site links sticky for some useful JavaScript links if you haven't already done so.
@acoder
Hi I want to give reference to some thread of this posting to php forum of this site how could I do this
acoder 16,027
Recognized Expert Moderator MVP
You mean you want to refer/link to this thread? Just copy the URL in the address bar.
@acoder
ok thanks! actually I wanted to refer this thread to some of css and php topic of this site so for that I asked that how I will refer it to others.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Bruce W...1 |
last post by:
This is a best practices question.
For a website where PHP is used, does it make sense to have both .htm and .php
files? In other words, for pages that have no active content there's no point
in naming them with a .php extension.
Is there any advantage or disadvantage to making all files .php, or the same for
mixing them with .htm files?
What do you do, and why?
|
by: Rob Long |
last post by:
Hey,
I've written a custom HTML library using many PHP scripts as seperate
files (just like I'd do a java project) and I'm having some problems
where I'm including scripts in different directories from already
included scripts... basically where there'a an include chain spanning
multiple directories.
I've reduced the problem to its core:
|
by: Keith |
last post by:
I have a block of ASP code (enclosed in <% .. %>).
How can I call that piece of code from another piece of similar code?
And can the code be in any order on the page for it to work?
Thanks
|
by: Chad Richardson |
last post by:
As I'm writing this I think I am answering my own question, but I'd like to
get any other ideas on the subject as well.
I have a standard Header.asp that I want to include in every other page in
my site. Header.asp is located in the root folder, but the calling pages are
in various folders/levels. Since the relative paths specified in header are
subject to change and are based on the relative path of the calling page,
problems arise....
|
by: WisTex |
last post by:
I've come across a very weird problem. Virtual includes work on all my ASP pages on the entire website, including those in subdirectories, yet they won't work on a particular page I created, even though the virtual include statement is copy & pasted exactly as it appears on the working pages.
What would cause virtual includes to work in one page on a website, but not on another?
Error Message:
Microsoft VBScript runtime error...
| |
by: Josiah Manson |
last post by:
I found that I was repeating the same couple of lines over and over in
a function and decided to split those lines into a nested function
after copying one too many minor changes all over. The only problem is
that my little helper function doesn't work! It claims that a variable
doesn't exist. If I move the variable declaration, it finds the
variable, but can't change it. Declaring the variable global in the
nested function doesn't work...
|
by: supasnail |
last post by:
I have a happily working set of asp pages which read from the database
via include file "./_private/include/database.mdb".
However, when I try to gain access to this database on pages one
folder removed using "../_private/include/database.mdb", the pages
won't display. This whole system works fine on my home test server
(iis.5.0), but 'breaks' when uploaded to the public server. I know the
path to database is correct because the upper...
|
by: Atlas |
last post by:
I'm working on a multilanguage ASP/HTML site using a IIS6 web server.
It perfectly works with two languages (english and italian) in this way:
- basically the same ASP code for every language
- language-specific content is stored in text files, every language has it's
own directory contents.
- to enhance usability and formatting the language-specific contents are
stored with html syntax; basically the code that normally stands between...
|
by: henry |
last post by:
Folks
Here's a skeleton, generic HTML page, call it "index.php". You'll see a bit
of php code in the middle:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |