SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    ********* Streaker Lister14's Avatar
    Join Date
    Jun 2002
    Location
    C:\Documents and Settings\Desktop\Recycle Bin
    Posts
    677
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question How to call in a javascript?

    Just the way one can call in a CSS:
    Code:
    <link rel=stylesheet type="text/css" href="style.css" title="style">
    is there a way to call in a Javascript into a page?
    roy.lu
    C:\DOS... C:\DOS\RUN... RUN\DOS\RUN...!

  2. #2
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes,
    <SCRIPT SRC="myfile.js"></SCRIPT>

    Alos, you example for calling in an external CSS, can be shortend to just:

    <link rel=stylesheet href="style.css">

    Kind Regards,
    Mark Harrington,
    The WebWizard - A 'Fully-Featured' HTML Editor for your WebBrowser!
    Check us out at: http://www.the-webwizard.co.uk/

  3. #3
    morphine for a wooden leg randem's Avatar
    Join Date
    Jun 2002
    Location
    .chicago.il.us
    Posts
    957
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Web_Wizard_2k
    <SCRIPT SRC="myfile.js"></SCRIPT>
    ...
    Alos, you example for calling in an external CSS, can be shortend to just: <link rel=stylesheet href="style.css">
    That's bad advice.

    You should have a content type in BOTH of those. And how about using lowercase letters in your html? And why no quotes in the <link> tag?

    <script src="myfile.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="style.css" />
    ----Adopt-a-Sig----
    Your message here!

  4. #4
    ********* Streaker Lister14's Avatar
    Join Date
    Jun 2002
    Location
    C:\Documents and Settings\Desktop\Recycle Bin
    Posts
    677
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cheers guys...

    ...and i can just define a '.js' file from a notepad...?


    Edit:


    PS: how's it going in Tampa randem? -was seeing a girl from there quite a time ago...
    roy.lu
    C:\DOS... C:\DOS\RUN... RUN\DOS\RUN...!

  5. #5
    ********* Streaker Lister14's Avatar
    Join Date
    Jun 2002
    Location
    C:\Documents and Settings\Desktop\Recycle Bin
    Posts
    677
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    actually, is there a way to integrate the javascript into the CSS?
    roy.lu
    C:\DOS... C:\DOS\RUN... RUN\DOS\RUN...!

  6. #6
    morphine for a wooden leg randem's Avatar
    Join Date
    Jun 2002
    Location
    .chicago.il.us
    Posts
    957
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Lister14
    PS: how's it going in Tampa randem? -was seeing a girl from there quite a time ago...
    Um, it's going good I guess.

    Originally posted by Lister14
    actually, is there a way to integrate the javascript into the CSS?
    Technically, no. However, if you're creative, many things can be done. Why don't you tell us what you really want to do?
    ----Adopt-a-Sig----
    Your message here!

  7. #7
    ********* Streaker Lister14's Avatar
    Join Date
    Jun 2002
    Location
    C:\Documents and Settings\Desktop\Recycle Bin
    Posts
    677
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have got this wicked floating navigation bar (which i obviously stole somewhere, but altered it quite a bit...).

    This navigation bar should be present on all my pages...
    ...nevertheless, if i put it on, the CSS is overwriting its font values and so on...

    well, have a look at the attachments

    ...hope it becomes clearer...
    Attached Files Attached Files
    roy.lu
    C:\DOS... C:\DOS\RUN... RUN\DOS\RUN...!

  8. #8
    morphine for a wooden leg randem's Avatar
    Join Date
    Jun 2002
    Location
    .chicago.il.us
    Posts
    957
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, I opened your ZIP file and had a look at what's inside.

    I've got to say you write some really ugly code. Nothing is indented... comments are irrelevant and few-and-far-between... and formatting is out the window.

    I know it was me who asked you to show code, but I guess we always expect to see good code.

    Here's my take on programming...
    It's just like English: If you speak in well-constructed sentences, your verb tenses all match up, etc., people will understand you. However if you misspell words, leave run on sentences, change verb tense, and so on, nobody is going to understand you.

    My suggestion is that you take some pride in your work. Clean it up, make it look better. You'll be surprised... the errors stop happening when you can see what's going on. And when you have problems, others will be able to help you. Honestly, after all, we're not getting paid to help. The least you can do is make it easy on us.
    ----Adopt-a-Sig----
    Your message here!

  9. #9
    ********* Streaker Lister14's Avatar
    Join Date
    Jun 2002
    Location
    C:\Documents and Settings\Desktop\Recycle Bin
    Posts
    677
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll try my best to clean it up...
    ...still a beginner though

    nevertheless, cheers for having had a look at it.

    Edit:


    it is the javascript that is messy..., of which all i know is that you can copy and paste it.

    my worry is rather how to integrate it into my template...
    Last edited by Lister14; Oct 25, 2002 at 07:13.
    roy.lu
    C:\DOS... C:\DOS\RUN... RUN\DOS\RUN...!


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
  •