Your Ad Here Your Ad Here
Results 1 to 6 of 6

Thread: Help With A Java Script

  1. #1
    I am wanting to control the font size of the following, what and where do i need to add the code as i have tried but nuthing has worked.

    <script language=JavaScript>
    var txt = "Add To Favorites";
    var url = "mysite.com";
    var who = "-sitename-";
    var ver = navigator.appName;
    var num = parseInt(navigator.appVersion);
    if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
    document.write(''+ txt + ''
    }else{
    txt += " (Ctrl+D)";
    document.write(txt);
    }
    </script>

    Thanks

  2. Internet, Programming and Graphics   -   #2
    h1
    Guest
    Put this in the <head> section...
    Code:
    &#60;script type=&#34;text/javascript&#34;&#62;
     &nbsp; function bookmark&#40;&#41;
     &nbsp; &nbsp; &nbsp;{
     &nbsp; &nbsp; &nbsp;if&#40;&#40;navigator.userAgent.toLowerCase&#40;&#41;&#41;.indexOf&#40;&#34;msie&#34;&#41;&#33;=-1&#41;
     &nbsp; &nbsp; &nbsp;{
     &nbsp; &nbsp; &nbsp; &nbsp; window.external.AddFavorite&#40;&#34;http&#58;//www.yoursite.com&#34;,&#34;Your Site&#34;&#41;;
     &nbsp; &nbsp; &nbsp;}
     &nbsp; &nbsp; &nbsp;else
     &nbsp; &nbsp; &nbsp;{
     &nbsp; &nbsp; &nbsp; &nbsp; alert&#40;&#34;This link will work only in Internet Explorer.&#34;&#41;;
     &nbsp; &nbsp; &nbsp;}
     &nbsp; }
     &nbsp; function over&#40;&#41;
     &nbsp; {
     &nbsp; &nbsp; &nbsp;window.status=&#34;The text you want to see in the status bar&#34;;
     &nbsp; &nbsp; &nbsp;return true;
     &nbsp; }
     &nbsp; function out&#40;&#41;
     &nbsp; {
     &nbsp; &nbsp; &nbsp;window.status=&#34; &#34;;
     &nbsp; &nbsp; &nbsp;return true;
     &nbsp; }
    &#60;/script&#62;
    Then, use this as the link...
    Code:
    &#60;a href=&#34;javascript&#58;void&#40;0&#41;;&#34; onmouseover=&#34;over&#40;&#41;;&#34; onmouseout=&#34;out&#40;&#41;;&#34; onclick=&#34;bookmark&#40;&#41;;&#34;&#62;Click here to bookmark this page.&#60;/a&#62;
    Hope this helps.

  3. Internet, Programming and Graphics   -   #3
    Thanks I will go and try it now

  4. Internet, Programming and Graphics   -   #4
    h1
    Guest
    Fuck, I just noticed an error. Went back and edited the original post.

  5. Internet, Programming and Graphics   -   #5
    Thanks for your help the edited one works now

    Thanks again,

    -=Cyrus=-

  6. Internet, Programming and Graphics   -   #6
    h1
    Guest
    NP.

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
  •