trying to apply CSS to DOM/OPML

Discussion in 'XML' started by Kate, Feb 11, 2004.

  1. Kate

    Kate Guest

    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??
    Kate, Feb 11, 2004
    #1
    1. Advertising

  2. Kate wrote:

    > 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);
    }
    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Feb 11, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Desi
    Replies:
    1
    Views:
    643
    Klaus Johannes Rusch
    Feb 2, 2004
  2. Tom Denford
    Replies:
    0
    Views:
    635
    Tom Denford
    Apr 22, 2005
  3. OPML help required

    , Feb 22, 2007, in forum: XML
    Replies:
    0
    Views:
    420
  4. Muness Alrubaie

    RubyConf Coverage by OPML

    Muness Alrubaie, Oct 15, 2005, in forum: Ruby
    Replies:
    2
    Views:
    102
    James Britt
    Oct 15, 2005
  5. Chris

    parsing OPML

    Chris, Apr 6, 2004, in forum: Perl Misc
    Replies:
    1
    Views:
    152
    Richard Morse
    Apr 7, 2004
Loading...

Share This Page