SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2001
    Location
    \|/
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    easy jscript question

    Total n00b.

    OK, so I have a call to a .js file in a webpage that calls up the .js stored in the root of my site:

    <script language="JavaScript1.1" src="http://www.domain.com/motivatequote.js"></script>

    It basically calls up quotes randomly out of an array.

    The make up of the .js is:

    var quotes=new Array()

    //change the quotes if desired. Add/ delete additional quotes as desired.

    quotes[0]='There are some people who live in a dream world, and there are some who face reality; and then there are those who turn one into the other. <i>-By Douglas Everett</i>'

    quotes[1]='Whether you think you can or whether you think you can\'t, you\'re right! <i>-Henry Ford</i>'

    quotes[2]='I know of no more encouraging fact than the unquestionable ability of man to elevate his life by conscious endeavor. <i>-Henry David Thoreau</i>'

    var whichquote=Math.floor(Math.random()*(quotes.length))
    document.write(quotes[whichquote])


    I can't quite figure out the javascript syntax, but right now these quotes come in as size 3 times new roman, but I would like it to be arial size 1. Where would I put the font info into this script?

    thx - mulls
    PeopleCards: The Official People Trading Card
    http://www.peoplecards.net

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2001
    Location
    \|/
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    figured it out, never mind.
    PeopleCards: The Official People Trading Card
    http://www.peoplecards.net

  3. #3
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mulls, I know it refers to a different forum, but please check out this, because much of it applies more generally to all forums, and will help everybody get the most out of SitePoint!
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!


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
  •