Hi All,
I have what I believe is a complex problem, but hopefully you'll be able to provide me with a simple answer.
I'm using XMLHttpRequest() to call a PHP script (which I have no control over), the script returns perfectly formed XHTML, unfortunately I only know how to read it as plaintext, so I can't insert it into my XHTML DOM tree using createnode.
I can display it using innerHTML, but as It doesn't belong to the DOM as such I can't do anything with it after that.
I hope this makes sense, I'm a backend programmer, so my clientside explanations may be lacking.
Thanks in advance
5 1454 acoder 16,027
Recognized Expert Moderator MVP
If it's valid XHTML/XML, it should be available in responseXML. If not, when you insert it into the page using innerHTML, it should be available in the DOM.
If it's valid XHTML/XML, it should be available in responseXML. If not, when you insert it into the page using innerHTML, it should be available in the DOM.
Ok, it may be my lack of understanding then, I was under the impression that innerHTML jsut kind of dumped the output and it wasn't seen by the DOM...
in which case a further question, how can I style the content inserted by innerHTML after the page has loaded?
EDIT: I see what the confusion was, I didn't know about responseXML, I was using responsetext.
thanks for the assist so far.
acoder 16,027
Recognized Expert Moderator MVP
Access the element(s) and use the style property ( Style object).
Access the element(s) and use the style property (Style object).
Is there no way to use my existing stylesheet?
EDIT: Forget this, I've worked out my problem.
Thanks Loads
Dormilich 8,658
Recognized Expert Moderator Expert
Is there no way to use my existing stylesheet?
your stylesheet applies to the xhtml document, no matter if you change it by ajax or not. as long as your rules apply to it I see no problem.
regards
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: LRW |
last post by:
Because I've had recipients of our newsletter tell us they can't (or
won't) receive HTML e-mail, I found out how to make an e-mail that
sends both HTML and a plaintext version in a multipart...
|
by: news |
last post by:
Before I begin, I realise there's a big war regarding HTML in e-mails.
Personally, I don't like it. Unfortunately, I'm being paid by my
company to create an automated newsletter for our customers....
|
by: Ajay Brar |
last post by:
hi!
I am getting an error - Crypto.PublicKey.RSA.error: Plaintext too large
- when verifying the signature of a document.
What i am doing is - the document and the signature are downloaded off...
|
by: gf gf |
last post by:
Hans,
Thanks for the tip. I took a look at Beatiful Soup,
and it looked like it was a framework to parse HTML.
I'm not really interetsed in going through it tag by
tag - just to get it...
|
by: simon |
last post by:
I have an unbound RTF2 control in an Access 2003 form which I set to
show either unformatted text or else text with words and sentences
highlighted. I do this by setting the PlainText property,...
| |
by: Terry |
last post by:
I am converting (attempting) some vb6 code that makes vast use of interfaces.
One of the major uses is to be able to split out Read-only access to an
obect. Let me give you a simple (contrived)...
|
by: Luca Villa |
last post by:
I have many html files named like these:
c:\dir\femo-black.html
c:\dir\loren-white.html
c:\dir\spark-white.html
c:\dir\kim-black.html
c:\dir\paul-white.html
How can I convert only the files...
|
by: cablepuff |
last post by:
template <typename ContainerType>
ContainerType rsa_encrypt_list(const std::string&, const typename
ContainerType::reference, const typename ContainerType::reference);
const BigInteger...
|
by: --CELKO-- |
last post by:
I need to convert a bunch of DB2 triggers to Oracle. Is there any
kind of tools for this?
|
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,...
|
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...
| |
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,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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: 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,...
|
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: 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...
| |