SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Client wants Amber Alert on homepage, uses javascript

    Hi, my client wants to put a amber alert on her homepage, near the bottom (with my convincing). Well, the homepage is at least XHTML 1.0 validated, and this contains javascript. Now, I know most javascript needs to go in the <head> but it appears this has to be placed on the page where you want it to go.

    What is my best option at this.

    Thanks
    Bryan

    Here is the code btw

    Code:
    <!-- Begin Code Amber Ticker code. -->
    <P ALIGN=CENTER>
    <SCRIPT LANGUAGE="JavaScript1.2" src="http://www.codeamber.org/js/codea.js">
    </script>
    </P>
    <!-- end of Code Amber Ticker code (c)Copyright codeamber.org 2002, 2003-->

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    If you're just trying to validate to XHTML 1.0 Transitional, then just lowercase the tags, remove the "align" attribute from the paragraph, and add the "type" attribute to the <script> tag. If you're trying to validate to Strict, this may help:
    HTML Code:
    <p><script type="text/javascript" src="http://codeamber.org/js/codea.js"></script></p>
    Although I'm not sure what HTML the code inside the JS file is generating; your page will appear valid to any automated service at least.

  3. #3
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I got it to work. I put it on the basket site.

  4. #4
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    arghh, nevermind. It looks like crap in any browser other then IE

  5. #5
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got another question

    Well, that javascript file that you saw earlier is actually a browser sniffer. Well, if I decide to run the javascript file from my host versus the absolute path, such as http://www.somethingspecialgiftbaskets.com/iecodea.js versus
    http://www.codeamber.org/js/codea.js

    would that affect the message that is displayed. Maybe someone could take a look at http://www.codeamber.org/js/iecodea.js

    I would only alter how it looks, like the font face, width, ect.. Not the actual message. I just didn't know if there was code in there that will get pulled out whenever an actual Amber Alert goes active.

    Thanks
    Bryan


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
  •