SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Zealot pozmu's Avatar
    Join Date
    Jul 2001
    Location
    Poland/ Warsaw
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with document.write in HEAD section...

    I have something like this:
    <html><head>
    <title>::: js step one ::/title>
    <script language="javascript">function myfunc(xxx)
    {
    document.write(xxx)
    };
    </SCRIPT>
    </head><body>
    <a HREF onclick="myfunc('HAHA')">Click here</A>
    </body></html>

    When I click on the "Click here" the "HAHA" is showing but the html code disapears... What's wrong???

  2. #2
    SitePoint Addict
    Join Date
    Sep 2000
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    document.write
    ---If invoked while the page loads it can add to the current content.
    ---If invoked after the page loads how you want it to, it clears the current document and writes the content into the window.

  3. #3
    SitePoint Zealot pozmu's Avatar
    Join Date
    Jul 2001
    Location
    Poland/ Warsaw
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm, so what should I do? I would like to change the css link (<LINK REL="stylesheet" HREF="file.css" TYPE="text/css">) with one click and without page reloading...

  4. #4
    SitePoint Zealot pozmu's Avatar
    Join Date
    Jul 2001
    Location
    Poland/ Warsaw
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, i found http://www.jsr.communitech.net/changecss.htm
    but is there any simplest method to do this (without adding id to css href)???


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •