Jump to content
xisto Community
Sign in to follow this  
apollo

Html And Javascript Not php as first indicated...

Recommended Posts

Edit your ScrollBar colors

Change "Your color", to color code, that u need.

 

<STYLE type="text/css"><!--BODY {scrollbar-face-color: Your color;scrollbar-highlight-color: Your color;scrollbar-3dlight-color: Your color;scrollbar-darkshadow-color: Your color;scrollbar-shadow-color: Your color;scrollbar-arrow-color: Your color;scrollbar-track-color: Your color;}--></STYLE>

Posted Image

 

 

Insert Date

 

Place this code between <HEAD>, </HEAD> tags

<script language=Javascript><!--var today_date= new Date()var month=today_date.getMonth()var today=today_date.getDate()var year=today_date.getYear()"var months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");// --></SCRIPT> 

Place this code where you'd like the date to appear.

<script language=Javascript><!-- document.write(months[month]+" "+today+", "+year)// --></SCRIPT>

Status bar text

Change TExt no. 1.,2.,..6., to your text.

 

<script language=JavaScript>var speed = 100 var pause = 3000var timerID = nullvar bannerRunning = falsevar ar = new Array()ar[0] = "Text No. 1"ar[1] = " Text No. 2"ar[2] = "Text No. 3"ar[3] = " Text No. 4"  ar[4] = "Text No. 5"ar[5] = " Text No. 6"var currentMessage = 0var offset = 0function stopBanner() {if (bannerRunning)clearTimeout(timerID)bannerRunning = false}function startBanner() {stopBanner()showBanner()}function showBanner() {var text = ar[currentMessage]if (offset < text.length) {if (text.charAt(offset) == " ")offset++ var partialMessage = text.substring(0, offset + 1) window.status = partialMessageoffset++ // IE sometimes has trouble with "++offset"timerID = setTimeout("showBanner()", speed)bannerRunning = true} else {offset = 0currentMessage++if (currentMessage == ar.length)currentMessage = 0timerID = setTimeout("showBanner()", pause)bannerRunning = true}}startBanner();// --></SCRIPT>

Protect Your Web Page Content

 

 

<script language="JavaScript"><!--var message=" YOUR TEXT GOES HERE";function click(e) {if (document.all) {if (event.button==2||event.button==3) {alert(message);return false;}}if (document.layers) {if (e.which == 3) {alert(message);return false;}}}if (document.layers) {document.captureEvents(Event.MOUSEDOWN);}document.onmousedown=click;// --></SCRIPT>

Edited by jlhaslip (see edit history)

Share this post


Link to post
Share on other sites

Oh really? Ok, didn`t know, cus i`m using IE for all the time, not Firefoz or sth liek that... Thnx

Share this post


Link to post
Share on other sites

nnope the script does not work in firefox, they have their own preset scrollbar that keeps it the same color no matter what

Share this post


Link to post
Share on other sites

I found that out the hard way that it only works in Interneet Explorer by messing with it while using Firefox. Anyway, if JavaScript is diabled in the browser, those scripts won't work. I don't recommend relying on JavaScript to do those things. You can print the date in PHP if you really wanted the date on a page, and not rely on JavaScript..

Share this post


Link to post
Share on other sites

Keep in mind that this is MS proprietry (read non-standard) code and doesn't work in other browsers.

223306[/snapback]

Yes, it does work in Opera too :(

 

By the way, those scripts are only CSS and Javascript, not HTML or PHP :(

 

(merged)

Share this post


Link to post
Share on other sites

Anyway, if JavaScript is diabled in the browser, those scripts won't work.? I don't recommend relying on JavaScript to do those things.

223838[/snapback]

There was a while when I was worried about javascript, that most users would have it off. But I started to rely more on it because some times its the only way to do things. I know you just said that "don't recommend relying on JS todo THOSE things", But I would like to make my point here, from this perspective, that there are things that can't ve done any other way, and that there is not THAT much people having js turned out, I would recommend every body to trust javascript in everything you need.

 

I have these stats from google analytics, since the 19th of november until yesterday, 382,418 visits have come to a site i mantain, and only .95 % of the visits have javascript disabled.

 

Besides i think that at least half of those .95 % (well that's just what i think) actually KNOW that they have turned it off, and that they might not see every aspect of some sites, so they could turn it on sometimes to check out what they missed... And as for the rest of them, I think depending on the site, it is a percentage which we can afford to 'lose'...

 

Notice from jlhaslip:
edit as per report
Edited by jlhaslip (see edit history)

Share this post


Link to post
Share on other sites

And my very powerfully favourite javascripts:
First javascipt is "Add bookmark to favorite" and "Set as start page"

<script><!--function setHomepage(f) { f.style.behavior='url(#default#homepage)'; f.setHomePage('http://yourdomain.com') }function addBookmark() { window.external.addFavorite('http://yourdomain.com', 'Powerful blog.') }function isValidBrowser() { var result = 'ns';        if ( navigator.appVersion.indexOf('MSIE 6.') != -1 ) { result = 'ie5' }        if ( navigator.appVersion.indexOf('MSIE 5.') != -1 ) { result = 'ie5' }        if ( navigator.appVersion.indexOf('MSIE 4.') != -1 ) { result = 'ie4' } return result }//--></script><script><!--if ( isValidBrowser() == 'ie5' ) {document.write('<center><a href=# onClick="setHomepage(this);return false"><img border=0 width=27 height=26 src="../home1.gif" alt="Set as start page"></a> <a href=\"\" onClick="addBookmark();return false"><img border=0 width=27 height=26 src="../fav1.gif" alt="Add to favorits"></a>');}if ( isValidBrowser() == 'ie4' ) {document.write('<center><a href=free.reg><img border=0 width=27 height=26 src="../home1.gif" alt="Set as start page"></a> <a href=\"\" onClick="addBookmark();return false"><img border=0 width=27 height=26 src="../fav1.gif" alt="Add to favorits"></a>');}if ( isValidBrowser() == 'ns' ) {document.write('<center><a href=/add.html target=_blank><img border=0 width=27 height=26 src="../home1.gif" alt="Set as start page"></a> <img border=0 width=27 height=26 src="../fav1.gif" alt="Press Ctrl + D">');}//--></script>

Second script is "Last update date"

<script LANGUAGE="JavaScript">var dateMod = "";dateMod = document.lastModified;document.write("Last Updated:  ");document.write(dateMod);document.write();// --></SCRIPT>

Share this post


Link to post
Share on other sites

Besides i think that at least half of those .95 % (well that's just what i think) actually KNOW that they have turned it off, and that they might not see every aspect of some sites, so they could turn it on sometimes to check out what they missed... And as for the rest of them, I think depending on the site, it is a percentage which we can afford to 'lose'...


Right... Many browsers now inhibit scripts by defaults due to the fact that advertisers use this scripts to make their own way to the person's view or interest.

But not bad that you are able to help those who are new to javascript and css. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.