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. Advertisements

  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. Advertisements

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. Stefan Siegl
    Replies:
    1
    Views:
    1,197
    Marrow
    Jul 18, 2003
  2. Desi
    Replies:
    1
    Views:
    839
    Klaus Johannes Rusch
    Feb 2, 2004
  3. Tom Denford
    Replies:
    0
    Views:
    1,012
    Tom Denford
    Apr 22, 2005
  4. OPML help required

    , Feb 22, 2007, in forum: XML
    Replies:
    0
    Views:
    593
  5. Joseph Kesselman
    Replies:
    4
    Views:
    725
    C.W.Holeman II
    Apr 12, 2007
  6. Hendrik Schober

    Trying to apply SFINAE

    Hendrik Schober, Sep 29, 2008, in forum: C++
    Replies:
    10
    Views:
    736
    Hendrik Schober
    Oct 6, 2008
  7. Muness Alrubaie

    RubyConf Coverage by OPML

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

    parsing OPML

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