trying to apply CSS to DOM/OPML

K

Kate

I am using DOM in a .js file to write information from an OPML(XML)
file to a php page. I wasnt to add a CSS to this to formatte it but
cant as the information is not in the HTML of the php page. Does
anyone know how this is done??
 
M

Martin Honnen

Kate said:
I am using DOM in a .js file to write information from an OPML(XML)
file to a php page. I wasnt to add a CSS to this to formatte it but
cant as the information is not in the HTML of the php page. Does
anyone know how this is done??

DOM in a .js file sounds like client side JavaScript, however I fail to
see how client side Javascript can write information to a PHP page.
Probably you are just using client side JavaScript in a HTML page
generated by PHP.
As for applying CSS, if you have a CSS file with the style rules you can
add a link element to the HTML page
var link;
if (document.createElement &&
(link = document.createElement('link'))) {
link.rel = 'stylesheet';
link.href = 'file.css';
link.type = 'text/css';
document.getElementsByTagName('head')[0].appendChild(link);
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top