Professional Documents
Culture Documents
<form name="dynamiccombo">
<select name="stage2" size="1" onChange="displaysub()">
<option value="#">This is a place Holder text </option>
<option value="#">This is a Place Holder text </option>
<option value="#">This is a Place Holder text </option>
<option value="#">This is a Place Holder text </option>
</select>
<input type="button" name="test" value="Go!"
onClick="gothere()">
</form>
<script>
<!-//2-level combo box script- by javascriptkit.com
//Visit JavaScript Kit (http://www.agencija027.com) for script
//Credit must stay intact for use
//STEP 1 of 2: DEFINE the main category links below
//EXTEND array as needed following the laid out structure
//BE sure to preserve the first line, as it's used to display main title
var category=new Array()
category[0]=new Option("SELECT A CATEGORY ", "") //THIS LINE RESERVED TO
CONTAIN COMBO TITLE
category[1]=new Option("Webmaster sites", "combo1")
category[2]=new Option("News sites", "combo2")
category[3]=new Option("Entertainment", "combo3")
//STEP 2 of 2: DEFINE the sub category links below
//EXTEND array as needed following the laid out structure
//BE sure to preserve the LAST line, as it's used to display submain title
var combo1=new Array()
combo1[0]=new Option("JavaScript Kit","http://www.agencija027.com ")
combo1[1]=new Option("Dynamic Drive"," http://www.agencija027.com ")
combo1[2]=new Option("Freewarejava.com"," http://www.agencija027.com ")
combo1[3]=new Option("Free Web Templates"," http://www.agencija027.com ")
combo1[4]=new Option("Web Monkey"," http://www.agencija027.com ")
combo1[5]=new Option("BACK TO CATEGORIES","") //THIS LINE RESERVED TO
CONTAIN COMBO SUBTITLE
var combo2=new Array()
combo2[0]=new Option("CNN","http://www.cnn.com")
combo2[1]=new Option("MSNBC","http://www.msnbc.com")
combo2[2]=new Option("BBC News","http://news.bbc.co.uk")
combo2[3]=new Option("ABC News","http://www.abcnews.com")
Combodescrip1
<center>
<form name="combowithtext">
<select name="example" size="1" onChange="showtext()">
<option value="http://www.agencija027.com/o_nama.htm">Agencija 027</option>
<option value="http://www.agencija027.com/zanimljivo.htm">Zabava</option>
<option value="http://www.agencija027.com/kontakt.htm">Kontakt</option>
</select>
<input type="button" value="Go!"
onClick="gothere()"><br>
<textarea rows=5 cols=21 wrap="virtual" name="text"></textarea>
<script language="javascript">
<!-/*
Combo box with description creditBy JavaScript Kit (www.javascriptkit.com)
Over 200+ free script here!
*/
var shortcut=document.combowithtext
var descriptions=new Array()
//extend this list if neccessary to accomodate more selections
descriptions[0]="Vidite cime se bavi agencija!!"
descriptions[1]="Zabavite se malo (chat, forum, slike, sport, vesti )."
descriptions[2]="Pogledajte kontakt!."
shortcut.text.value=descriptions[shortcut.example.selectedIndex]
function gothere(){
location=shortcut.example.options[shortcut.example.selectedIndex].value
}
function showtext(){
shortcut.text.value=descriptions[shortcut.example.selectedIndex]
}
//-->
</script>
</form>
</center>
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
Kit</a></font></p>
Combodescript2
<form name="combowithtext">
<select name="example" size="1" onChange="showtext()">
<option value="http://www.agencija027.com/chat.htm">chat</option>
<option value="http://agencija027.20.forumer.com">forum</option>
<option value="http://www.agencija027.mojblog.com">blog</option>
<option value="http://www.agencija027.com/oglasi.htm">oglasi</option>
<option value="http://www.agencija027.com/slike.htm">slike</option>
<option value="http://www.agencija027.com/modeli.htm">modeli</option>
<option value="http://www.agencija027.com/sport.htm">sport</option>
<option value="http://www.agencija027.com/vesti.htm">vesti</option>
<option value="http://www.agencija027.com/igrice.htm">igrice</option>
</select>
<input type="button" value="Napred!"
onClick="gothere()">
<script language="javascript">
<!-/*
Combo box with description creditBy JavaScript Kit (www.javascriptkit.com)
Over 200+ free script here!
*/
var shortcut=document.combowithtext
var descriptions=new Array()
//extend this list if neccessary to accomodate more selections
descriptions[0]="CHAT"
descriptions[1]="FORUM"
descriptions[2]="BLOG"
descriptions[3]="OGLASI"
descriptions[4]="SLIKE"
descriptions[5]="MODELI"
descriptions[6]="SPORT"
descriptions[7]="VESTI"
descriptions[8]="IGRICE"
function gothere(){
location=shortcut.example.options[shortcut.example.selectedIndex].value
}
function showtext(){
window.status=descriptions[shortcut.example.selectedIndex]
}
//-->
</script>
</form>
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://www.agencija027.com">agencija
027</a></font></p>
Dhtml combo
Example:
Developer Sites
Technology Related Sites
Directions
Step 1: Add the following code to the <head> section of your page:
It references two external files and an image. Download them below (right click, and select
"save as"):
dhtmlcombo.css
dhtmlcombo.js
Single image used:
Step 2: Add the below sample HTML to your page, which illustrates two DHTML select
menus:
More Information
As mentioned, this script will transform your regular SELECT menus into a DHTML Menu
instead. If you look at the code of Step 2, you'll see how it works exactly:
<!-- 1st example -->
<select id="webmaster" title="Developer Sites">
<option value="http://www.javascriptkit.com">JavaScript Kit</option>
<option value="http://www.php.net">PHP.net</option>
<option value="http://www.codingforums.com">Coding Forums</option>
<option value="http://www.dynamicdrive.com">Dynamic Drive</option>
<option value="http://www.cssdrive.com">CSS Drive</option>
<option value="http://www.dynamicdrive.com/forums/">CSS Menus and codes</option>
</select>
<script type="text/javascript">
//dhtmlselect("id_of_select_menu", "optional_width_of_select_box_px",
"optional_width_of_drop_down_menu_px")
dhtmlselect("webmaster")
</script>
The first portion is just your regular SELECT menu HTML with various options and urls
defined (via the "value" attribute). To transform it into a DHTML menu, just call the
JavaScript function:
dhtmlselect("webmaster")
immediately following the SELECT menu to replace it, where the ID of the menu is passed in
as its parameter. You should call this function immediately following the HTML code, so the
DHTML menu position on the page is identical to the original SELECT menu's.
Styling the DHTML Select Menu
To customize the look of the DHTML select menu, just modify the values inside
dhtmlcombo.css. However, for each menu on your page, you can individually change the
menu's width from the default. This is done by using two optional parameters when calling
the dhtmlselect() function:
dhtmlselect("webmaster", "150px", "200px")
This causes the main box to be "150px", and the drop down menu that appears onMouseover
to be "200px" for this particular DHTML select menu.
Step 1
<link rel="stylesheet" type="text/css" href="dhtmlcombo.css" />
<script type="text/javascript" src="dhtmlcombo.js">
/***********************************************
* DHTML Select Menu- by JavaScript Kit (www.javascriptkit.com)
* Menu interface credits: http://www.dynamicdrive.com/style/csslibrary/item/glossy-verticalmenu/
* This notice must stay intact for usage
* Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and 100s more
***********************************************/
</script>
Step 2
<form>
<!-- 1st example -->
<select id="webmaster" title="Developer Sites">
<option value="http://www.javascriptkit.com">JavaScript Kit</option>
<option value="http://www.php.net">PHP.net</option>
<option value="http://www.codingforums.com">Coding Forums</option>
<option value="http://www.dynamicdrive.com">Dynamic Drive</option>
<option value="http://www.cssdrive.com">CSS Drive</option>
<option value="http://www.dynamicdrive.com/style/">CSS Menus/ codes</option>
</select>
<script type="text/javascript">
//dhtmlselect("id_of_select_menu", "optional_width_of_select_box_px",
"optional_width_of_drop_down_menu_px")
dhtmlselect("webmaster")
</script>
<!-- 2nd example -->
<select id="network" title="Technology Related Sites">
<option value="http://www.digg.com">Digg.com</option>
<option value="http://www.news.com">CNET Technology News</option>
<option value="http://www.slashdot.com">SlashDot</option>
<option value="http://www.theregister.co.uk/">The Register</option>
</select>
<script type="text/javascript">
//dhtmlselect("id_of_select_menu", "optional_width_of_select_box_px",
"optional_width_of_drop_down_menu_px")
dhtmlselect("network", "190px", "200px")
</script>
</form>
Double combo
<form name="doublecombo">
<p><select name="example" size="1" onChange="redirect(this.options.selectedIndex)">
<option>Technology Sites</option>
<option>News Sites</option>
<option>Search Engines</option>
</select>
<select name="stage2" size="1">
<option value="http://javascriptkit.com">JavaScript Kit</option>
<option value="http://www.news.com">News.com</option>
<option value="http://www.wired.com">Wired News</option>
</select>
<input type="button" name="test" value="Go!"
onClick="go()">
</p>
<script>
<!-/*
Double Combo Script Credit
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free JavaScripts here!
*/
var groups=document.doublecombo.example.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group[i]=new Array()
group[0][0]=new Option("JavaScript Kit","http://javascriptkit.com")
group[0][1]=new Option("News.com","http://www.news.com")
group[0][2]=new Option("Wired News","http://www.wired.com")
group[1][0]=new Option("CNN","http://www.cnn.com")
Double combo 2
<script language="JavaScript">
<!-//Double Combo Box with Description Code- by Randall Wald (http://www.rwald.com)
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use
var num_of_cats = 4; // This is the number of categories, including the first, blank, category.
var open_in_newwindow=1; //Set 1 to open links in new window, 0 for no.
var option_array = new Array(num_of_cats);
option_array[0] = new Array("Izaberite kategoriju"); // This is the first (blank) category. Don't
mess with it.
option_array[1] = new Array("-- Biraj --",
"Marketing",
"Modeli",
"Nekretnine");
option_array[2] = new Array("-- Biraj --",
"Chat",
"Forum");
option_array[3] = new Array("-- Biraj --",
"Slike",
"Oglasi");
var text_array = new Array(num_of_cats);
text_array[0] = new Array("Dobro dosli na sajt Agencije 027."); // These are general
instructions. Change them if you want, or keep them if you don't.
text_array[1] = new Array("Agencija se bavi marketingom, pormetom nekretnina,
promocijama ", // Note that the first entry here is a general description of this category.
After than, they're descriptions of each link. Make sure that you don't put the first link first;
the general description must be first.
"Izrada sajtova kvalitetno i jeftino!.",
"Postanite I Vi model! Ispunite sebi zelju!.",
"Ukoliko prodajete ili kupujete stan, kucu, lokal, plac, njivu, sumu .");
text_array[2] = new Array("Zabavite se na nasem forumu, chatu, blogu .",
"Preko 200 chat soba! Pogledajte i caskajte!?",
"Postanite saradnici na nasem forumu!.");
text_array[3] = new Array("Pogledajte slike, oglase, vesti ",
"Vidite slike Prokuplja, Nisa, Leskovca, Zitoradja, Merosine, Blaca, Kursumlije, Pirota ",
"Od igle do lokomotive! Licni, Poslovni, Besplatni ");
var url_array = new Array(num_of_cats);
url_array[0] = new Array("#"); // The first category. This should have no items other than "#".
url_array[1] = new Array("#", // The second category; the first "real" category. Note the initial
#. That is the category which says "Please select a link." It doesn't need a URL. Start putting
the other URL's in after that first line.
"http://www.agencija027.com/marketing.htm/",
"http://www.agencija027.com/modeli.htm/",
"http://www.agencija027.com/nekretnine.htm/");
url_array[2] = new Array("#",
"http://www.agencija027.com/chat.htm/",
"http://agencija027.20.forumer.com/");
url_array[3] = new Array("#",
"http://www.agencija027.com/slike.htm/",
"http://www.agencija027.com/oglasi.htm/");
function switch_select()
{
for (loop = window.document.form_1.select_2.options.length-1; loop > 0; loop--)
{
window.document.form_1.select_2.options[loop] = null;
}
for (loop = 0; loop < option_array[window.document.form_1.select_1.selectedIndex].length;
loop++)
{
window.document.form_1.select_2.options[loop] = new
Option(option_array[window.document.form_1.select_1.selectedIndex][loop]);
}
window.document.form_1.select_2.selectedIndex = 0;
}
function switch_text()
{
window.document.form_1.textarea_1.value =
text_array[window.document.form_1.select_1.selectedIndex]
[window.document.form_1.select_2.selectedIndex];
}
function box()
{
if (window.document.form_1.select_2.selectedIndex == 0)
{
alert("Where do you think you're going?");
} else {
if (open_in_newwindow==1)
window.open(url_array[window.document.form_1.select_1.selectedIndex]
[window.document.form_1.select_2.selectedIndex],"_blank");
else
window.location=url_array[window.document.form_1.select_1.selectedIndex]
[window.document.form_1.select_2.selectedIndex]
}
}
function set_orig()
{
window.document.form_1.select_1.selectedIndex = 0;
window.document.form_1.select_2.selectedIndex = 0;
}
window.onload=set_orig
// -->
</script>
<form name="form_1" onSubmit="return false;">
<textarea WRAP="virtual" name="textarea_1" rows=6 cols=60>www.agencija027.com
+381 63 427 577.</textarea><br> <!-- This should be the same as the general instructions in
the above code. -->
<select name="select_1" onChange="switch_select(); switch_text();">
<option>-- Kategorije --</option>
<option>Agencija 027</option>
<option>Zabava</option>
<option>Korisno</option>
</select>
<select name="select_2" onChange="switch_text();">
<option>Izaberite kategoriju</option>
<option> </option>
<option> </option>
</select>
<input type="submit" onClick="box();" value="Napred!">
</form>
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
Kit</a></font></p>
Dynamic combo
<form name="dynamiccombo">
<select name="stage2" size="1">
<option value="#">This is a Place Holder</option>
<option value="#">This is a Place Holder</option>
<option value="#">This is a Place Holder</option>
</select>
<input type="button" name="test" value="Go!"
onClick="gothere()">
</form>
<script>
<!-//Dynamic combo box script- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use
//DEFINE the group of links for display in the combo
//EXTEND each array and its elements as needed
//BE sure to follow the pattern revealed below
var combo1=new Array()
combo1[0]=new Option("JavaScript Kit","http://javascriptkit.com")
combo1[1]=new Option("Dynamic Drive","http://www.dynamicdrive.com")
combo1[2]=new Option("Freewarejava.com","http://www.freewarejava.com")
combo1[3]=new Option("Free Web Templates","http://www.freewebtemplates.com")
combo1[4]=new Option("Web Monkey","http://www.webmonkey.com")
var combo2=new Array()
combo2[0]=new Option("CNN","http://www.cnn.com")
combo2[1]=new Option("MSNBC","http://www.msnbc.com")
combo2[2]=new Option("BBC News","http://news.bbc.co.uk")
combo2[3]=new Option("ABC News","http://www.abcnews.com")
var combo3=new Array()
combo3[0]=new Option("Hollywood.com","http://www.hollywood.com")
combo3[1]=new Option("MTV","http://www.mtv.com")
combo3[2]=new Option("ETOnline","http://etonline.com")
var cacheobj=document.dynamiccombo.stage2
function populate(x){
for (m=cacheobj.options.length-1;m>0;m--)
cacheobj.options[m]=null
selectedarray=eval(x)
for (i=0;i<selectedarray.length;i++)
cacheobj.options[i]=new Option(selectedarray[i].text,selectedarray[i].value)
cacheobj.options[0].selected=true
}
function gothere(){
location=cacheobj.options[cacheobj.selectedIndex].value
}
//SHOW first combo by default
populate(combo1)
//-->
</script>
<!--SET up your links, and pass in the name of the group (ie: combo1) you wish to display for
the link in question-->
<a href="javascript:populate(combo1)">Webmaster sites</a> | <a
href="javascript:populate(combo2)">News sites</a> | <a
href="javascript:populate(combo3)">Entertainment</a>
Multiple dynamic
<script language="JavaScript" type="text/javascript">
<!-/*
*** Multiple dynamic combo boxes
*** by Mirko Elviro, 9 Mar 2005
*** Script featured and available on JavaScript Kit (http://www.javascriptkit.com)
***
***Please do not remove this comment
*/
// This script supports an unlimited number of linked combo boxed
// Their id must be "combo_0", "combo_1", "combo_2" etc.
// Here you have to put the data that will fill the combo boxes
// ie. data_2_1 will be the first option in the second combo box
// when the first combo box has the second option selected
// first combo box
data_1 = new Option("1", "$");
data_2 = new Option("2", "$$");
// second combo box
data_1_1 = new Option("11", "-");
data_1_2 = new Option("12", "-");
data_2_1 = new Option("21", "--");
data_2_2 = new Option("22", "--");
data_2_3 = new Option("23", "--");
data_2_4 = new Option("24", "--");
data_2_5 = new Option("25", "--");
// third combo box
data_1_1_1 = new Option("111", "*");
data_1_1_2 = new Option("112", "*");
data_1_1_3 = new Option("113", "*");
data_1_2_1 = new Option("121", "*");
data_1_2_2 = new Option("122", "*");
data_1_2_3 = new Option("123", "*");
data_1_2_4 = new Option("124", "*");
data_2_1_1 = new Option("211", "**");
data_2_1_2 = new Option("212", "**");
data_2_2_1 = new Option("221", "**");
data_2_2_2 = new Option("222", "**");
</select>
<BR><BR>
<select name="combo2" id="combo_2" onChange="change(this);" style="width:200px;">
<option value="value1"> </option>
</select>
<BR><BR>
<select name="combo3" id="combo_3" onChange="change(this);" style="width:200px;">
<option value="value1"> </option>
</select>
</form>
Triple combo
<FORM name="isc">
<table border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td nowrap height="11">
<select name="example" size="1" onChange="redirect(this.options.selectedIndex)">
<option selected>---Select1-------------</option>
<option>Webmaster Sites</option>
<option>News Sites</option>
</select>
<select name="stage2" size="1" onChange="redirect1(this.options.selectedIndex)">
<option value=" " selected> </option>
<option value=" " selected>---Select2--------------</option>
<option value=" " selected>---Select2--------------</option>
</select>
<select name="stage3" size="1" onChange="redirect2(this.options.selectedIndex)">
<option value=" " selected> </option>
<option value=" " selected>---Select3----------------</option>
<option value=" " selected>---Select3----------------</option>
</select>
<script>
<!-/*
Triple Combo Script Credit
By Hamid Cheheltani/ JavaScript Kit (http://www.javascriptkit.com)
Visit http://javascriptkit.com for this and over 400+ other scripts
*/
var groups=document.isc.example.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group[i]=new Array()
group[0][0]=new Option("---Select2---"," ");
group[1][0]=new Option("Now Select This One"," ");
group[1][1]=new Option("JavaScript","47");
group[1][2]=new Option("DHTML","46");
group[1][3]=new Option("CGI","45");
group[2][0]=new Option("Now Select This One"," ");
group[2][1]=new Option("General News","115");
group[2][2]=new Option("Technology News","116");
var temp=document.isc.stage2
function redirect(x){
for (m=temp.options.length-1;m>0;m--)
temp.options[m]=null
for (i=0;i<group[x].length;i++){
temp.options[i]=new Option(group[x][i].text,group[x][i].value)
}
temp.options[0].selected=true
redirect1(0)
}
var secondGroups=document.isc.stage2.options.length
var secondGroup=new Array(groups)
for (i=0; i<groups; i++) {
secondGroup[i]=new Array(group[i].length)
for (j=0; j<group[i].length; j++) {
secondGroup[i][j]=new Array() }}
secondGroup[0][0][0]=new Option("---Select 3---"," ");
secondGroup[1][0][0]=new Option("---Select 3---"," ");
secondGroup[1][1][0]=new Option("Now Select This One"," ");
secondGroup[1][1][1]=new Option("JavaScript Kit","http://javascriptkit.com");
secondGroup[1][1][2]=new Option("JavaScript for the non
programmer","http://webteacher.com/javascript/");
secondGroup[1][1][3]=new Option("Java-Scripts.net","http://java-scripts.net");
secondGroup[1][2][0]=new Option("Now Select This One"," ");
secondGroup[1][2][1]=new Option("Dynamic Drive","http://www.dynamicdrive.com");
secondGroup[1][2][2]=new Option("Beginner\'s Guide to
DHTML","http://www.geocities.com/ResearchTriangle/Facility/4490/");
secondGroup[1][2][3]=new Option("Web Coder","http://webcoder.com/");
secondGroup[1][3][0]=new Option("Now Select This One"," ");
secondGroup[1][3][1]=new Option("CGI Resources","http://www.cgi-resources.com");
secondGroup[1][3][2]=new Option("Ada\'s Intro to CGI","http://adashimar.hypermart.net/");
secondGroup[2][0][0]=new Option("---Select 3---"," ");
secondGroup[2][1][0]=new Option("Now Select This One"," ");
secondGroup[2][1][1]=new Option("CNN","http://www.cnn.com");
secondGroup[2][1][2]=new Option("MSNBC","http://www.msnbc.com");
secondGroup[2][1][3]=new Option("ABC News","http://www.abcnews.com");
secondGroup[2][2][0]=new Option("Now Select A Page"," ");
secondGroup[2][2][1]=new Option("News.com","http://www.news.com");
secondGroup[2][2][2]=new Option("Wired","http://www.wired.com");
var temp1=document.isc.stage3
function redirect1(y){
for (m=temp1.options.length-1;m>0;m--)
temp1.options[m]=null
for (i=0;i<secondGroup[document.isc.example.options.selectedIndex][y].length;i++){
temp1.options[i]=new Option(secondGroup[document.isc.example.options.selectedIndex][y]
[i].text,secondGroup[document.isc.example.options.selectedIndex][y][i].value)
}
temp1.options[0].selected=true
}
function redirect2(z){
window.location=temp1[z].value
}
//-->
</script>
</td>
</tr>
</table>
</FORM>
<style type="text/css">
#coolmenu{
border: 1px solid black;
width: 170px;
background-color: #E6E6E6;
}
#coolmenu a{
font: bold 13px Verdana;
padding: 2px;
padding-left: 4px;
display: block;
width: 100%;
color: black;
text-decoration: none;
border-bottom: 1px solid black;
}
html>body #coolmenu a{
width: auto;
}
#coolmenu a:hover{
background-color: black;
color: white;
}
#tabledescription{
width: 100%;
height: 3em;
padding: 2px;
filter:alpha(opacity=0);
-moz-opacity:0;
}
</style>
<script type="text/javascript">
// Cool CSS Menu- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// Fading routine based on Dynamic Drive script:
http://www.dynamicdrive.com/dynamicindex4/highlightgrad.htm
// This notice must stay intact for use
var baseopacity=0
function showtext(thetext){
if (!document.getElementById)
return
textcontainerobj=document.getElementById("tabledescription")
browserdetect=textcontainerobj.filters? "ie" : typeof
textcontainerobj.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
document.getElementById("tabledescription").innerHTML=thetext
highlighting=setInterval("gradualfade(textcontainerobj)",50)
}
function hidetext(){
cleartimer()
instantset(baseopacity)
}
function instantset(degree){
if (browserdetect=="mozilla")
textcontainerobj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
textcontainerobj.filters.alpha.opacity=degree
else if (document.getElementById && baseopacity==0)
document.getElementById("tabledescription").innerHTML=""
}
function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}
function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.2, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=20
else if (window.highlighting)
clearInterval(highlighting)
}
</script>
<div id="coolmenu">
<a href="http://www.javascriptkit.com" onMouseover="showtext('JavaScript tutorials and
scripts!')" onMouseout="hidetext()">JavaScript Kit</a>
<a href="http://www.javascriptkit.com/cutpastejava.shtml" onMouseover="showtext('300+
free JavaScripts')" onMouseout="hidetext()">Free JavaScripts</a>
<a href="http://www.javascriptkit.com/jsref/" onMouseover="showtext('Comprehensive
JavaScript Reference')" onMouseout="hidetext()">JavaScript Reference</a>
<a href="http://www.codingforums.com" onMouseover="showtext('Web coding and
development forums!')" onMouseout="hidetext()">Coding Forums</a>
<a href="http://www.dynamicdrive.com" onMouseover="showtext('Award winning DHTML
and JavaScripts')" onMouseout="hidetext()">Dynamic Drive</a>
<div id="tabledescription"></div>
</div>
Personal counter
<style>
.counter{
background-color:black;
color:yellow;
font-weight:bold;
}
</style>
<SCRIPT>
//Personal Counter- by Jaafar Bin Yusof, Singapore (jaafar66@yahoo.com)
//Modified by JavaScript Kit (http://javascriptkit.com)
//Visit http://javascriptkit.com for this script
expireDate = new Date
expireDate.setMonth(expireDate.getMonth()+6)
jcount = eval(cookieVal("jaafarCounter"))
jcount++
document.cookie = "jaafarCounter="+jcount+";expires=" + expireDate.toGMTString()
function cookieVal(cookieName) {
thisCookie = document.cookie.split("; ")
for (i=0; i<thisCookie.length; i++){
if (cookieName == thisCookie[i].split("=")[0]){
return thisCookie[i].split("=")[1]
}
}
return 0
}
function page_counter(){
for (i=0;i<(7-jcount.toString().length);i++)
document.write('<span class="counter">0</span>')
for (y=0;y<(jcount.toString().length);y++)
document.write('<span class="counter">'+jcount.toString().charAt(y)+'</span>')
}
</SCRIPT>
You have visited this page
<SCRIPT>
page_counter(jcount);
</SCRIPT>
times.
message="
I see you came back !";
if(visit == 3)
message="
Oh, it's you again!";
if(visit == 4)
message="
You must be curious!";
if(visit == 5)
message=" You're practically a regular!";
if(visit == 6)
message="
You need a hobby!";
if(visit == 7)
message="
Nothing better to do?";
if(visit == 8)
message="
Don't you ever sleep?";
if(visit == 9)
message="
Get a life!!!";
if(visit >= 10)
message=" Rent is due on the 1st of the month!";
alert("\n"+"Your browser has visited this page
\n"
+"
"+visit+"\n"
+"
time(s)."+"\n"+"\n"
+message);
}
function ResetCounts() {
var expdate = new Date();
expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365));
visit = 0;
SetCookie("visit", visit, expdate , "/", null, false);
history.go(0);
}
window.onload=DisplayInfo
</Script>
<FORM>
<CENTER>
<INPUT NAME="update" TYPE="BUTTON" VALUE="Revisit Page"
OnClick="history.go(0)">
<INPUT NAME="reset" TYPE="BUTTON" VALUE="Reset Counter"
OnClick="ResetCounts()">
</CENTER>
</FORM>
// [domain] - domain of the cookie (must be same as domain used to create cookie)
// * path and domain default if assigned null or omitted if no explicit argument proceeds
function deleteCookie(name, path, domain) {
if (getCookie(name)) {
document.cookie = name + "=" +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
"; expires=Thu, 01-Jan-70 00:00:01 GMT"
}
}
// date - any instance of the Date object
// * you should hand all instances of the Date object to this function for "repairs"
// * this function is taken from Chapter 14, "Time and Date in JavaScript", in "Learn
Advanced JavaScript Programming"
function fixDate(date) {
var base = new Date(0)
var skew = base.getTime()
if (skew > 0)
date.setTime(date.getTime() - skew)
}
var now = new Date()
fixDate(now)
now.setTime(now.getTime() + 31 * 24 * 60 * 60 * 1000)
var name = getCookie("name")
if (!name)
name = prompt("Please enter your name:", "Marko Markovic")
setCookie("name", name, now)
document.write("Hello " + name + "!")
//-->
</script>
Counter
<script>
/*
Counter script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
Above notice MUST stay entact for use
*/
function fakecounter(){
//decrease/increase counter value (depending on perceived popularity of your site!)
var decrease_increase=-50000
var counterdate=new Date()
var currenthits=counterdate.getTime().toString()
currenthits=parseInt(currenthits.substring(2,currenthits.length-4))+decrease_increase
document.write("You are visitor # <b>"+currenthits+"</b> to my site!")
}
fakecounter()
</script>
<script type="text/javascript">
// Google Internal Site Search script II- By JavaScriptKit.com (http://www.agencija027.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.agencija027.com/
// This notice must stay intact for use
function Gsitesearch(curobj){
var domainroot=curobj.domainroot[curobj.domainroot.selectedIndex].value
curobj.q.value="site:"+domainroot+" "+curobj.qfront.value
}
</script>
<form action="http://www.google.com/search" method="get" onSubmit="Gsitesearch(this)">
<p>
<input name="q" type="hidden" />
<input name="qfront" type="text" style="width: 180px" /> <input type="submit"
value="Search" /><br />
Search:
<select name="domainroot">
<option value="www.agencija027.com" selected="1">JavaScript Kit</option>
<option value="www.agencija027.com">Dynamic Drive</option>
<option value="www.agencija027.com">FreewareJava.com</option>
</select>
</p>
</form>
MNOGO DOBAR
<script language="JavaScript">
<!-//
// Script by Jari Aarniala [www.mbnet.fi/~foo -- foo@mbnet.fi]
//
// This script makes it easy to choose with which search engine
// you`d like to search the net. You may use this if you keep this
// text here...
//
function startSearch(){
searchString = document.searchForm.searchText.value;
if(searchString != ""){
searchEngine = document.searchForm.whichEngine.selectedIndex + 1;
finalSearchString = "";
if(searchEngine == 1){
finalSearchString = "http://www.altavista.digital.com/cgi-bin/query?
pg=q&what=web&fmt=.&q=" + searchString;
}
if(searchEngine == 2){
finalSearchString = "http://av.yahoo.com/bin/query?p=" + searchString + "&hc=0&hs=0";
}
if(searchEngine == 3){
finalSearchString = "http://www.excite.com/search.gw?trace=a&search=" + searchString;
}
if(searchEngine == 4){
finalSearchString = "http://www.hotbot.com/?SW=web&SM=MC&MT=" + searchString +
"&DC=10&DE=2&RG=NA&_v=2&act.search.x=89&act.search.y=7";
}
if(searchEngine == 5){
finalSearchString = "http://www.infoseek.com/Titles?qt=" + searchString +
"&col=WW&sv=IS&lk=noframes&nh=10";
}
if(searchEngine == 6){
finalSearchString = "http://www.lycos.com/cgi-bin/pursuit?adv=%26adv
%3B&cat=lycos&matchmode=and&query=" + searchString + "&x=45&y=11";
}
if(searchEngine == 7){
finalSearchString = "http://netfind.aol.com/search.gw?search=" + searchString +
"&c=web&lk=excite_netfind_us&src=1";
}
location.href = finalSearchString;
}
}
// -->
</script>
<basefont face="Verdana, Arial, sans-serif">
<form name="searchForm">
<table width=320 border cellpadding=3 cellspacing=2 bgcolor=444444>
<tr>
<td bgcolor=lightblue><font size=1 face="Verdana, Arial, sans-serif">Search for:<br>
<td bgcolor=lightblue><font size=1 face="Verdana, Arial, sans-serif">Search from:
<td bgcolor=lightblue>
<tr>
<td bgcolor=navajowhite><input style="background: dddddd" name="searchText"
type="text">
<td bgcolor=navajowhite>
<select style="background: dddddd" name="whichEngine">
<option selected>Altavista
<option>Yahoo!
<option>Excite
<option>Hotbot
<option>Infoseek
<option>Lycos
<option>AOL Netfind
</select>
<td bgcolor=navajowhite><input type="button" value="Send" onClick="startSearch()">
</select>
</table>
</form>
<script>
/*
Click banner enticer script
By JavaScript Kit (http://javascriptkit.com)
Over 200+ free scripts here!
*/
var entices=new Array()
entices[0]="Marketing!"
entices[1]="Nekretnine!"
entices[2]="Turizam"
entices[3]="Modeli!"
entices[4]="Hostess"
entices[5]="Knjigovodstvo!"
//extend this list as desired
function generate_entices(toggle){
if (toggle==1)
window.status=entices[Math.round(Math.random()*(entices.length-1))]
else
window.status=''
}
</script>
<a href="http://www.agencija027.com" onMouseover="generate_entices(1);return true"
onMouseout="generate_entices(0)"><img
src="../../sponsors/jpad4.gif" width="466" height="58" border="0"></a>
<script>
<!-/*
Background music script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/
//specify FULL path to midi
var musicsrc="http://www.agencija027.com/badams.mid"
if (navigator.appName=="Microsoft Internet Explorer")
document.write('<bgsound src='+'"'+musicsrc+'"'+' loop="infinite">')
else
document.write('<embed src=\"'+musicsrc+'\" hidden="true" border="0" width="20"
height="20" autostart="true" loop="true">')
//-->
</script>
<script language="JavaScript">
<!-- Hide From Old Browsers
/* 1996-98 JavaScript written by Steve Thompson @ http://www.w8r.com --- e-mail:
thompson@w8r.com or myclone@hotmail.com --- This simple script changes the background
image four times a day -- It can be altered to include other page attributes such as text colors
and individual page items such as on the example page - Use freely but keep this entire credit
line intact. */
day=new Date()
x=day.getHours()
STEP 1
<script language="javascript">
<!-- Image Selector
// Cameron Gregory - cameron@bloke.com
// http://www.bloke.com
// http://www.bloke.com/javascript/Selector/
//
// ChangeLog
//
// Wed Jul 10 11:29:51 EDT 1996
// Added -1 check on array
// Wed Jul 10 06:25:30 EDT 1996
// merged pulldown and selector into one.
//
// Wed Jul 10 06:03:05 EDT 1996
// 3.0b5a hosed something! Stopped using Image objects
// and just stored in array.
//
// Usage:
// Selector(width,height,images)
// SelectorLong(width,height,boxHeight,images)
// SelectorLongNames(width,height,boxHeight,images,names)
// PullDownSelector(width,height,images)
// PullDownSelectorNames(width,height,images,names)
//
// width, height
is image size (-1,-1) if you don't want to specify
// boxHeight
is the height of the select box
// images
is space or comma separated file list
// names
is corresponding name array (comma separated)
function selectImage(f)
{
if (document.flipForm.which.selectedIndex >= 0)
document.flipForm.flip.src = imageSet[document.flipForm.which.selectedIndex];
}
function SelectorLongNames(width,height,listHeight,images,names)
{
/* si: start index
** i: current index
** ei: end index
** cc: current count
*/
si = 0;
ci=0;
cc=0;
imageSet = new Array();
ei = images.length;
for (i=1;i<ei;i++) {
function SelectorLong(width,height,listHeight,images)
{
SelectorLongNames(width,height,listHeight,images,",");
}
function PullDownSelector(width,height,images)
{
SelectorLongNames(width,height,-1,images,",")
}
function PullDownSelectorNames(width,height,images,names)
{
SelectorLongNames(width,height,-1,images,names)
}
// use -1 -1 if you don't know the width and height for the image
function Selector(width,height,images)
{
listHeight=5;
SelectorLong(width,height,listHeight,images);
}
// End Script -->
</script>
Step 2: Insert the below into the <body> section where you want the selector to appear:
<script language="javascript">
Selector(152,136,"dog2-small.gif condo-view-small.gif hiking1-small.gif hiking2-small.gif
malanda-small.gif snowball-small.gif snowcamping-small.gif spider1-small.gif spider3small.gif ");
</script>
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
Kit</a></font></p>
//-->
</script>
Step 1: Simply paste the below code into the <body> section of your page:
<SCRIPT language="JavaScript">
/*
Script posted and featured on JavaScript Kit
http://javascriptkit.com
*/
function display_image(form) {
selectionname = form.imagename.options[form.imagename.selectedIndex].text;
selection = form.imagename.options[form.imagename.selectedIndex].value;
PreView = window.open("", "Preview",
"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistor
y=0,width=200,height=255");
PreView.document.open();
PreView.document.write("<HTML><HEAD>");
PreView.document.write("<TITLE>Preview</TITLE>");
PreView.document.write("</HEAD><BODY BGCOLOR=FFFFFF TEXT=000000>");
PreView.document.write("<FORM><CENTER><B><FONT SIZE=+1>" +
selectionname + "</FONT></B><HR>");
PreView.document.write("<IMG HSPACE=0 VSPACE=0 " +
"SRC='" + selection + "'>");
PreView.document.write("<HR><FORM><INPUT TYPE='button' VALUE='Close' " +
"onClick='window.close()'></FORM>");
PreView.document.write("</CENTER>");
PreView.document.write("</BODY></HTML>");
PreView.document.close();
}
</SCRIPT>
<FORM>
<select NAME="imagename" onChange="display_image(this.form)">
<option value="http://www.javascriptkit.com/abstract.gif" SELECTED>Image 1
<option value="http://www.javascriptkit.com/day.gif">Image 2
<option value="http://www.javascriptkit.com/night.gif">Image 3
</select>
</FORM>
<SCRIPT>
<!-- written by The Omega
// http://members.xoom.com/the_omega/
// the_omega@geocities.com
// You must leave these comments in to use the script
// (hey, I wrote it. Let me have a little credit!)
today=new Date();
today=today.getTime()/10;
rnd=today%len;
<script language="JavaScript">
<!-/*
Random Image Script- By JavaScript Kit (http://www.javascriptkit.com)
Over 400+ free JavaScripts here!
Keep this notice intact please
*/
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="image1.gif"
myimages[2]="image2.gif"
myimages[3]="image3.gif"
myimages[4]="image4.gif"
myimages[5]="image5.gif"
myimages[6]="image6.gif"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<img src="'+myimages[ry]+'" border=0>')
}
random_imglink()
//-->
</script>
<script language="JavaScript">
<!-/*
Random Image Link Script- By JavaScript Kit(http://www.javascriptkit.com)
Over 200+ free JavaScripts here!
Updated: 00/04/25
*/
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="image1.gif"
myimages[2]="image2.gif"
myimages[3]="image3.gif"
myimages[4]="image4.gif"
myimages[5]="image5.gif"
myimages[6]="image6.gif"
//specify corresponding links below
var imagelinks=new Array()
imagelinks[1]="http://www.javascriptkit.com"
imagelinks[2]="http://www.netscape.com"
imagelinks[3]="http://www.microsoft.com"
imagelinks[4]="http://www.dynamicdrive.com"
imagelinks[5]="http://www.freewarejava.com"
imagelinks[6]="http://www.cnn.com"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'"
border=0></a>')
}
random_imglink()
//-->
</script>
if (document.Oneslideform.Oneslidebutton.value == "Stop") {
Onecurrent = (Onecurrent == document.Oneslideform.Oneslide.length-1) ? 0 : Onecurrent+1;
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;
document.Oneslideform.Oneslide.selectedIndex = Onecurrent;
window.setTimeout("Onerotate()", Onerotate_delay);
}
}
function Onetransport(){
window.location=OneLinks[Onecurrent]
}
// End -->
</SCRIPT>
Step 2: Where you wish the slideshow to appear inside the BODY, add the following:
<TABLE border="0" cellspacing="0" cellpadding="0">
<TR>
<TD>
<form name="Oneslideform" >
<DIV align="center">
<TABLE width="150" border="1" cellspacing="0" cellpadding="4"
bordercolor="#330099">
<TR>
<TD bgcolor="#330099">
<DIV align="center"><B><FONT color="#FFFFFF">Image
Slideshow</FONT></B></DIV>
</TD>
</TR>
<TR>
<TD bgcolor="#FFFFFF">
<DIV align="center"><A href="javascript:Onetransport()"><IMG
src="slideimage1.gif" width="90" height="90" name="Oneshow" border="0"></A></DIV>
</TD>
</TR>
<TR>
<TD bgcolor="#330099">
<DIV align="center">
<SELECT name="Oneslide" onChange="Onechange();">
<OPTION value="slideimage1.gif" selected>Image 1</OPTION>
<OPTION value="slideimage2.gif">Image 2</OPTION>
<OPTION value="slideimage3.gif">Image 3</OPTION>
</SELECT>
</DIV>
</TD>
</TR>
<TR>
<TD bgcolor="#330099">
<DIV align="center">
<INPUT type=button onClick="Oneprevious();" value="<<" title="Previous">
<script type="text/javascript">
// Flexible Image Slideshow- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use
var ultimateshow=new Array()
//ultimateshow[x]=["path to image", "OPTIONAL link for image", "OPTIONAL link target"]
ultimateshow[0]=['dinosour.gif', '', '']
ultimateshow[1]=['crow.gif', 'http://www.dynamicdrive.com', '_new']
ultimateshow[2]=['pig.gif', 'http://www.codingforums.com', '']
//configure the below 3 variables to set the dimension/background color of the slideshow
var slidewidth="300px" //set to width of LARGEST image in your slideshow
var slideheight="261px" //set to height of LARGEST iamge in your slideshow
var slidecycles="3" //number of cycles before slideshow stops (ie: "2" or "continous")
var randomorder="no" //randomize the order in which images are displayed? "yes" or "no"
var preloadimages="yes" //preload images? "yes" or "no"
var slidebgcolor='white'
//configure the below variable to determine the delay between image rotations (in
miliseconds)
var slidedelay=3000
////Do not edit pass this line////////////////
var ie=document.all
var dom=document.getElementById
var curcycle=0
if (preloadimages=="yes"){
for (i=0;i<ultimateshow.length;i++){
var cacheimage=new Image()
cacheimage.src=ultimateshow[i][0]
}
}
var currentslide=0
function randomize(targetarray){
ultimateshowCopy=new Array()
var the_one
var z=0
while (z<targetarray.length){
the_one=Math.floor(Math.random()*targetarray.length)
if (targetarray[the_one]!="_selected!"){
ultimateshowCopy[z]=targetarray[the_one]
targetarray[the_one]="_selected!"
z++
}
}
}
if (randomorder=="yes")
randomize(ultimateshow)
else
ultimateshowCopy=ultimateshow
function rotateimages(){
curcycle=(currentslide==0)? curcycle+1 : curcycle
ultcontainer='<center>'
if (ultimateshowCopy[currentslide][1]!="")
ultcontainer+='<a href="'+ultimateshowCopy[currentslide][1]+'"
target="'+ultimateshowCopy[currentslide][2]+'">'
ultcontainer+='<img src="'+ultimateshowCopy[currentslide][0]+'" border="0">'
if (ultimateshowCopy[currentslide][1]!="")
ultcontainer+='</a>'
ultcontainer+='</center>'
if (ie||dom)
crossrotateobj.innerHTML=ultcontainer
if (currentslide==ultimateshow.length-1) currentslide=0
else currentslide++
if (curcycle==parseInt(slidecycles) && currentslide==0)
return
setTimeout("rotateimages()",slidedelay)
}
if (ie||dom)
document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+';
background-color:'+slidebgcolor+'"></div>')
function start_slider(){
crossrotateobj=dom? document.getElementById("slidedom") : document.all.slidedom
rotateimages()
}
if (ie||dom)
window.onload=start_slider
</script>
OnMouseover Slideshow
Step 1: Add the below to the <head> section of your page:
<script>
/*Rollover effect on different image scriptBy JavaScript Kit (http://javascriptkit.com)
Over 200+ free scripts here!
*/
function changeimage(towhat,url){
if (document.images){
document.images.targetimage.src=towhat.src
gotolink=url
}
}
function warp(){
window.location=gotolink
}
</script>
<script language="JavaScript1.1">
var myimages=new Array()
var gotolink="#"
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}
preloadimages("plane1.gif","plane2.gif","plane3.gif","plane4.gif","plane5.gif")
</script>
In the last line of the above code, input the names of all of the images you wish be used in the
rollover effect:
preloadimages("plane1.gif","plane2.gif","plane3.gif","plane4.gif","plane5.gif")
Step 2: Insert the below HTML code to your web page where you wish the initial rollover
image to be positioned:
<a href="javascript:warp()"><img src="plane0.gif" name="targetimage" border=0></a>
Step 3: Finally, you now need associate the rollover effect script with certain text or image
links that will trigger the rollover effect when the mouse is moved over them (in the above
demo, "Plane 1", "Plane 2" etc). Insert the below onMouseover event handler inside the <a>
tag of these links, like below:
<a href="b2.htm" onMouseover="changeimage(myimages[0],this.href)">Plane 1</a>
where "0" inside the variable myimages[0] indicates that when the mouse moves over this
link, the rollover image should be substituted with the first image defined in the function
preloadimages() of Step 1. For each link, you'll need to change "0" to another integer, with the
integer representing the position of the image you wish the rollover image to change to, again,
as defined in function preloadimages(). If you'll totally confused at this point (I'll admit, even
I am now!), the below are the HTML codes I used to construct the above demo. Examine it to
see what I mean:
<script>
"
//myimages[0] would refer to "plane1.gif", myimages[1] would refer to "plane2.gif" etc
preloadimages("plane1.gif","plane2.gif","plane3.gif","plane4.gif","plane5.gif")
</script>
<a href="b2.htm" onMouseover="changeimage(myimages[0],this.href)">Plane 1</a>
<a href="f15.htm" onMouseover="changeimage(myimages[1],this.href)">Plane 2</a>
<a href="su27.htm" onMouseover="changeimage(myimages[2],this.href)">Plane 3</a>
<a href="jet.htm" onMouseover="changeimage(myimages[3],this.href)">Plane 4</a>
<a href="boeing.htm" onMouseover="changeimage(myimages[4],this.href)">Plane 5</a>
There you have it!
PHOTO SLIDER
<script>
<!-/*
Form Box Tool Tip script: By JavaScript Kit (www.javascriptkit.com) More free scripts here
*/
function showtip(tip){
document.tool.tip.value=tip
}
//-->
</script>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><p align="center"><strong><font face="Arial" size="3"><a
href="../javaindex.htm" onMouseover="showtip('Click here to learn JavaScript!')"
onMouseout="showtip('')">JavaScript Tutorials</a> | </font><font
face="Arial"><a href="../howto/webbuild.htm" onMouseover="showtip('Wanna learn
general web building!')" onMouseout="showtip('')">Web building tutorials</a> | </font><font
face="Arial" size="3"><a href="../cutpastejava.htm" onMouseover="showtip('Get free
JavaScripts here!')" onMouseout="showtip('')">Free JavaScripts</a> </font></strong></td>
</tr>
<tr>
<td width="100%"><form name="tool">
<div align="center"><center><p><input type="text" name="tip"
size="69"></p>
</center></div>
</form>
</td>
</tr>
</table>
<form name="rolloverbox">
<p><input type="checkbox" name="boxes" value="ON"><a href="http://javascriptkit.com"
onMouseover="rollovercheck(0)" onMouseout="rolloutcheck(0)">Home</a><br>
<input type="checkbox" name="boxes" value="ON"><a
href="http://javascriptkit.com/javaindex.htm" onMouseover="rollovercheck(1)"
onMouseout="rolloutcheck(1)">JavaScript Tutorials</a><br>
<input type="checkbox" name="boxes" value="ON"><a
href="http://javascriptkit.com/cutpastejava.htm" onMouseover="rollovercheck(2)"
onMouseout="rolloutcheck(2)">Free JavaScripts</a><br>
<input type="checkbox" name="boxes" value="ON"><a
href="http://javascriptkit.com/java/javafront.htm" onMouseover="rollovercheck(3)"
onMouseout="rolloutcheck(3)">Free Java Applets</a><br>
<input type="checkbox" name="boxes" value="ON"><a
href="http://javascriptkit.com/howto/webbuild.htm" onMouseover="rollovercheck(4)"
onMouseout="rolloutcheck(4)">Web Tutorials</a><br>
<input type="checkbox" name="boxes" value="ON"><a
href="http://javascriptkit.com/frontpage.htm" onMouseover="rollovercheck(5)"
onMouseout="rolloutcheck(5)">FrontPage tutorials</a></p>
</form>
<script>
/*Rollover check box link credit
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free scripts here!
*/
var thebox=document.rolloverbox
function rollovercheck(whichbox){
thebox.boxes[whichbox].checked=true
}
function rolloutcheck(whichbox){
thebox.boxes[whichbox].checked=false
}
</script>
<SCRIPT LANGUAGE="JavaScript">
<!-- begin
// please help yourself to this code.
var startTime =null;
var timerID =null;
var initial =new Date();
var pos
=0;
var menuItem =null;
function initArray() {
this.length = initArray.arguments.length
for (var i = 0; i < this.length; i++)
{
this[i+1] = initArray.arguments[i]
}
}
function parsemenuItem(data,num) {
for(var i=0;i<data.length;i++) {
if(data.substring(i,i+1)=="|") break;
}
if (num==0) return(data.substring(0,i));
else return(data.substring(i+1,data.length));
}
function startTimer() {
initial = new Date();
startTime=initial.getTime();
stopTimer();
menuItem = new initArray("Netscape|http://www.netscape.com",
"Microsoft|http://www.microsoft.com",
"IBM|http://www.ibm.com",
"Yahoo|http://www.yahoo.com",
"Excite|http://www.excite.com",
"Hotbot|http://www.hotbot.com",
"GrapeJam|http://www.grapejam.com",
"Email|mailto:rzeitel@mars.superlink.net"
);
showTimer();
}
function stopTimer() {
timerID=null;
menuItem=null;
//clearTimeout(timerID);
}
function showTimer() {
pos= (pos == menuItem.length) ? 1 : pos + 1;
document.forms[0].elements[0].value=parsemenuItem(menuItem[pos],0);
timerID=window.setTimeout('showTimer()',1000);
}
function goToUrl() {
//parent.welcome.location=parsemenuItem(menuItem[pos],1);
this.location=parsemenuItem(menuItem[pos],1);
return (false);
}
// end -->
</SCRIPT>
Step 2: Paste the below into the <body> section of your page:
<CENTER><FORM>
<INPUT TYPE="button" VALUE=" WHERE TO? " NAME="goTo"
onClick="window.goToUrl()">
</FORM></CENTER>
Step 3: Add the following to the <body> tag itself, like this:
<BODY onLoad="window.startTimer()">
<script language="javascript">
<!--//
/*This Script allows people to enter by using a form that asks for a
UserID and Password*/
function pasuser(form) {
if (form.id.value=="JavaScript") {
if (form.pass.value=="Kit") {
location="page2.html"
} else {
alert("Invalid Password")
}
} else { alert("Invalid UserID")
}
}
//-->
</script>
<center>
<table bgcolor="white" cellpadding="12" border="1">
<tr><td colspan="2"><center><h1><i><b>Login
Area</b></i></h1></center></td></tr>
<tr><td><h1><i><b>UserID:</b></i></h1></td><td><form name="login"><input
name="id" type="text"></td></tr>
<tr><td><h1><i><b>Password:</b></i></h1></td><td><input name="pass"
type="password"></td></tr>
<tr><td><center><input type="button" value="Login"
onClick="pasuser(this.form)"></center></td><td><center><br><input
type="Reset"></form></td></tr></table></center>
Message Encrypter
<SCRIPT LANGUAGE="JavaScript">
Cursor Trail
Step 1: Insert the below into the <HEAD> section of your page:
<style type="text/css">
BODY {overflow: scroll; overflow-x: hidden;}
</style>
Step 2: Insert the below into the <BODY> section of your page:
<script language="JavaScript1.2">
<!-/*
Submitted by Marcin Wojtowicz [one_spook@hotmail.com]
Featured on JavaScript Kit (http://javascriptkit.com)
For this and over 400+ free scripts, visit http://javascriptkit.com
*/
var trailLength = 8 // The length of trail (8 by default; put more for longer "tail")
var path = "cursor.gif" // URL of your image
// do NOT modify anything beyond this point
var isIE = false,isNav = false,range = "all.",style = ".style",i,d = 0
var topPix = ".pixelTop",leftPix = ".pixelLeft",images,storage
if (document.layers) { // browser sniffer
isNav = true,range = "layers.",style = "",topPix = ".top",leftPix = ".left"
} else if (document.all) {
isIE = true
}
function initTrail() { // prepares the script
images = new Array() // prepare the image array
for (i = 0; i < parseInt(trailLength); i++) {
images[i] = new Image()
images[i].src = path
}
storage = new Array() // prepare the storage for the coordinates
for (i = 0; i < images.length*3; i++) {
storage[i] = 0
}
for (i = 0; i < images.length; i++) { // make divs for IE and layers for Navigator
(isIE) ? document.write('<div id="obj' + i + '" style="position: absolute; zIndex: 100; height: 0; width: 0"><img src="' + images[i].src + '"></div>') :
document.write('<layer name="obj' + i + '" width="0" height="0" z-index="100"><img src="'
+ images[i].src + '"></layer>')
}
trail()
}
function trail() { // trailing function
for (i = 0; i < images.length; i++) { // for every div/layer
eval("document." + range + "obj" + i + style + topPix + "=" + storage[d]) // the
Y-coordinate
eval("document." + range + "obj" + i + style + leftPix + "=" + storage[d+1]) //
the X-coordinate
d = d+2
}
for (i = storage.length; i >= 2; i--) { // save the coordinate for the div/layer that's
behind
storage[i] = storage[i-2]
}
d = 0 // reset for future use
var timer = setTimeout("trail()",10) // call recursively
}
function processEvent(e) { // catches and processes the mousemove event
if (isIE) { // for IE
storage[0] = window.event.y+document.body.scrollTop+10
storage[1] = window.event.x+document.body.scrollLeft+10
} else { // for Navigator
storage[0] = e.pageY+12
storage[1] = e.pageX+12
}
}
if (isNav) {
document.captureEvents(Event.MOUSEMOVE) // Defines what events to capture for
Navigator
}
if (isIE || isNav) { // initiates the script
initTrail()
document.onmousemove = processEvent // start capturing
}
//-->
</script>
<script type="text/javascript">
/*
Simple Image Trail script- By JavaScriptKit.com
Visit http://www.javascriptkit.com for this script and more
This notice must stay intact
*/
var trailimage=["test.gif", 100, 99] //image path, plus width and height
var offsetfrommouse=[10,-20] //image x,y offsets from cursor position in pixels. Enter 0,0 for
no offset
var displayduration=0 //duration in seconds image should remain visible. 0 for always.
if (document.getElementById || document.all)
document.write('<div id="trailimageid"
style="position:absolute;visibility:visible;left:0px;top:0px;width:1px;height:1px"><img
src="'+trailimage[0]+'" border="0" width="'+trailimage[1]+'px"
height="'+trailimage[2]+'px"></div>')
function gettrailobj(){
if (document.getElementById)
return document.getElementById("trailimageid").style
else if (document.all)
return document.all.trailimagid.style
}
function truebody(){
return (!window.opera && document.compatMode && document.compatMode!
="BackCompat")? document.documentElement : document.body
}
function hidetrail(){
gettrailobj().visibility="hidden"
document.onmousemove=""
}
function followmouse(e){
var xcoord=offsetfrommouse[0]
var ycoord=offsetfrommouse[1]
if (typeof e != "undefined"){
xcoord+=e.pageX
ycoord+=e.pageY
}
else if (typeof window.event !="undefined"){
xcoord+=truebody().scrollLeft+event.clientX
ycoord+=truebody().scrollTop+event.clientY
}
Sparkler COURSOR
Step 1: Insert the below into the <HEAD> section of your page:
<STYLE TYPE="text/css">
<!-BODY{
overflow:scroll;
overflow-x:hidden;
}
.s1
{
position : absolute;
font-size : 10pt;
color : blue;
visibility: hidden;
}
.s2
{
position : absolute;
font-size : 18pt;
color : red;
visibility : hidden;
}
.s3
{
position : absolute;
font-size : 14pt;
color : gold;
visibility : hidden;
}
.s4
{
position : absolute;
font-size : 12pt;
color : lime;
visibility : hidden;
}
//-->
</STYLE>
Step 2: Insert the below into the <BODY> section of your page:
eval("div"+n+".style.top="+y);
eval("div"+n+".style.left="+x);
eval("div"+n+".style.visibility='visible'");
}
n++;
tmr=setTimeout("beam("+n+")",spd);
}
else
{
clearTimeout(tmr);
fade(4);
}
}
function fade(n)
{
if(n>0)
{
if(nav)eval("document.div"+n+".visibility='hidden'");
else eval("div"+n+".style.visibility='hidden'");
n--;
tmr=setTimeout("fade("+n+")",spd);
}
else clearTimeout(tmr);
}
// -->
</SCRIPT>
Step 1: Insert the below into the <BODY> section of your page, immediately following the
<body> tag itself:
<script LANGUAGE="JavaScript">
/*
Swirling cursor trail (By Ozone, http://ozone.com)
Featured on JavaScript Kit free JavaScripts with bug fix for IE (http://javascriptkit.com)
For full source code to this script, visit http://javascriptkit.com
*/
window.onerror=null;
netscape = (document.layers) ? 1:0;
goodIE = (document.all) ? 1:0;
document.onmousemove=MoveHandler;
var gotthere = 0;
var count = 0;
var ietopcorner=''
var ieleftcorner=''
toplocation = new Array( 0,30,57,80,101,125,80,80,101,125,80,0 );
temptoplocation = new Array( 50,100,100,150,150,200,200,100,150,150,200,200,0 );
leftlocation = new Array( 0,292,318,181,181,217,263,318,181,181,217,263,-96 );
templeftlocation = new Array( 0,0,260,390,420,550,680,390,420,550,680,0 );
difftop = new Array( 0,0,0,0,0,0,0,0,0,0,0,0 );
diffleft = new Array( 0,0,0,0,0,0,0,0,0,0,0,0 );
questtop = -13;
questleft2 = -96;
if (netscape) {
document.body=new Object()
document.body.scrollTop=''
document.body.scrollLeft=''
window.captureEvents(Event.MOUSEMOVE);
window.onMouseMove = MoveHandler;
var layerstart = "document.";
var layerleft = ".left";
var layertop = ".top";
var layerstyle = "";
var windowWidth = window.innerWidth;
var windowHeight = window.innerHeight; }
else if (goodIE) {
ietopcorner=document.body.scrollTop
ieleftcorner=document.body.scrollLeft
layerstart = "document.all.";
layerleft = ".left";
layertop = ".top";
layerstyle = ".style";
windowWidth=600;
windowHeight=400; }
eval(layerstart+"a"+j+layerstyle+layertop+" =
document.body.scrollTop+temptoplocation["+j+"]"); }
setTimeout('run()', 25) }
badIE = 0;
browserName = navigator.appName.substring(0,8);
browserVer = parseFloat(navigator.appVersion);
macintosh = navigator.userAgent.indexOf("Mac");
if (browserName == "Microsof") {
if (macintosh != -1) { badIE = 1; }
if (browserVer < 4) { badIE = 1; }
}
</script>
<style TYPE="text/css">
<!-#a0 {position:absolute; left:-24; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a1 {position:absolute; left:96; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a2 {position:absolute; left:216; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a3 {position:absolute; left:338; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a4 {position:absolute; left:460; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a5 {position:absolute; left:640; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a6 {position:absolute; left:-24; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a7 {position:absolute; left:200; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a8 {position:absolute; left:300; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a9 {position:absolute; left:600; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
// -->
</style>
Step 2: Add the following BODY onload event handler into the BODY tag, like this:
<body onLoad="startthedots()">
Disco pozadina
<script language="JavaScript">
break;
case 14:
o[a]='E';
break;
case 15:
o[a]='F';
break;
default:
break;
}
}
function ran(a,c)
{
if ((Math.random()>2/3||c==0)&&c<255)
{
c++
d[a]=2;
}
else
{
if ((Math.random()<=1/2||c==255)&&c>0)
{
c-d[a]=1;
}
else d[a]=0;
}
return c
}
function do_it(a,c)
{
if ((d[a]==2&&c<255)||c==0)
{
c++
d[a]=2
}
else
if ((d[a]==1&&c>0)||c==255)
{
c--;
d[a]=1;
}
if (a==3)
{
if (d[1]==0&&d[2]==0&&d[3]==0)
flag=1
}
return c
}
function disco()
{
if (flag==0)
{
r=ran(1, r);
g=ran(2, g);
b=ran(3, b);
hex(1,r)
hex(2,g)
hex(3,b)
document.bgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3]
flag=50
}
else
{
r=do_it(1, r)
g=do_it(2,g)
b=do_it(3,b)
hex(1,r)
hex(2,g)
hex(3,b)
document.bgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3]
flag-}
if (document.all)
setTimeout('disco()',50)
}
//-->
</script>
<body onload="disco()">
Sat digital
<span id=tick2>
</span>
<script>
<!-/*By JavaScript Kit
http://javascriptkit.com
Credit MUST stay intact for use
*/
function show2(){
if (!document.all&&!document.getElementById)
return
thelement=document.getElementById? document.getElementById("tick2"):
document.all.tick2
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
var dn="PM"
if (hours<12)
dn="AM"
if (hours>12)
hours=hours-12
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
var ctime=hours+":"+minutes+":"+seconds+" "+dn
thelement.innerHTML="<b style='font-size:14;color:blue;'>"+ctime+"</b>"
setTimeout("show2()",1000)
}
window.onload=show2
//-->
</script>
Form mailimg
<?php
/* (c) copyright 2004, HIOX INDIA
/* This is a free tool provided by hioxidia.com */
*/
/* visit us at http://www.hscripts.com
?>
*/
<html>
<head>
</head>
<?php
include 'color.php';
$sname = "http://".$_SERVER['SERVER_NAME'];
?>
<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 bgcolor=<?
echo($BODYCOLOR); ?>
style="font-family: arial,verdana,san-serif; margin:0px;">
<table border=0 width=80% height=100% align=center border=0 cellspacing=0
cellpadding=0
STYLE="color: <? echo($fontcol); ?>;" bgcolor=<? echo($BOXCOLOR); ?>>
<tr width=100% background="./images/bg.jpg">
<td width=100% background="./images/bg.jpg" align="center">
<div style="border: 2px groove #888888; border-left: 0px; border-right: 0px;"><br>
<font style="font-size: 18px; color: <? echo($HEADCOLOR); ?>; font-weight: bold;">
<a href="<? echo($sname);?>" style="color: <? echo($HEADCOLOR); ?>; textdecoration:none;"><? echo($sitename); ?></a> MAIL Page</font>
<br><br></div>
</td></tr>
<script language=javascript>
function check()
{
var feed = document.sds.feedback.value;
var nname = document.sds.name.value;
if(feed == "" || nname == "")
{
alert("Please fill required fields marked * ");
return false;
}
return true;
}
</script>
<tr width=100% >
<td width=100% align="center">
<br><br>
<div align="center">
<form name=sds action="mailer.php" METHOD="POST" onsubmit="return check()">
<table cellpadding=4 cellspacing=0 border=0>
<tr><td><font color=<? echo($FONTCOLOR); ?>><i>To: </i></font></td><td><input
type="text" name="to" size=27
readonly value="<? echo($email); ?>"></td></tr>
<tr><td><font color=<? echo($FONTCOLOR); ?>><i>Name: *
</i></font></td><td><input type="text" name="name" size=27></td></tr>
<tr><td><font color=<? echo($FONTCOLOR); ?>><i>Email:</i></font></td><td><input
type="text" name="from" size=27></td></tr>
<tr><td><font color=<? echo($FONTCOLOR); ?
>><i>Website:</i></font><br><br></td><td><input type="text" name="website"
size=29><br><br></td></tr>
<tr><td colspan=2><font color=<? echo($FONTCOLOR);?> ><b>Message: *
</b></font><br>
<textarea name="feedback" rows=13 cols=55 wrap=physical></textarea>
</td></tr>
<tr><td colspan=2 align=right><input type="submit" value="Send"></td></tr>
</table>
</form>
</div>
</td>
</tr>
<tr width=100% background="./images/bg.jpg">
<td background="./images/bg.jpg">
<div align=center STYLE="font-family: sans-serif; margin-left: 1.5cm; margin-right: 1cm;
font-size: 18px; color: <?php echo($FONTCOLOR);?>" >
Please use this form to mail us.<br>
<br>
<div align=right STYLE="font-size: 12px; color: #dadada;">
<a href="http://www.hscripts.com" style="text-decoration:none; color: #dadada;">provided
by <b>© hscripts.com</b></a>
</div>
</td>
</tr>
</table>
</body>
</html>
counter383876.asp
<%
Set fs = CreateObject("Scripting.FileSystemObject")
Wfile=server.mappath("\") & "\cgi-bin\counter383876.txt"
form.html
Example code
saveinfo.asp
<%
Set fs = CreateObject("Scripting.FileSystemObject")
Folderpath=server.mappath("\") & "/cgi-bin/messages235302"
Wcounter=Folderpath &"/counter.txt"
Set fs = CreateObject("Scripting.FileSystemObject")
if fs.FolderExists(Folderpath) then
Set a = fs.OpenTextFile(Wcounter)
hits = Clng(a.ReadLine)
hits = hits + 1
a.close
else
Set a = fs.CreateFolder(Folderpath)
hits=1
end if
Set a = fs.CreateTextFile(Wcounter,True)
a.WriteLine(hits)
a.Close
Set fs=nothing
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(Folderpath & "\" & hits & ".txt")
For Each x In Request.Form
a.WriteLine(x &": " & Request.Form(x))
Next
a.Close
Set a=nothing
Set fs=nothing
%>
Thanks for providing the requested information<BR>
I will contact you very soon.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Lines 2-18. In case the folder where information will be saved does not exits, it will
be create. The counter file will be also create. If they already exits, the counter will be
open, the content read to a variable named "hits", and increased by one.
Lines 20-23. the value for variable h"hits" will be save in "counter.txt" file in our
folder.
Lines 25-32, information provided per input field will be saved to a file. The name of
the file will be composed by the variable hits (a number) and ".txt"
Lines 34-35. Write here your response.
o The response may be a text, as in this example,
o
o
You may redirect the visitor to a different page. The code will be this one:
<% response.redirect("http://www.mysite.com") %>
You may include as a response page the content in a page within your site
<!--#include virtual="/myresponse.html" -->
I
In order to access the information saved to files we may use the script bellow. That way we
will be able to access the information from all visitors in an unique page. Access to
information is password protected (Name and password to access the information are shown
in line two. If the name and password are not correct the form will be send (Subroutine
"Sendform ()"), and in case they are correct the info is send (Subroutine "Sendinfo ()").
getinfo.asp Try !
<%
if request.form("name")="Peter" and request.form("password")="yes" then
Sendinfo ()
else
Sendform ()
end if
%>
<%
Sub Sendform() %>
<FORM ACTION="getinfo.asp" METHOD=post>
Name: <input type=text name=name><br>
Password: <input type=password name=password><br>
<INPUT TYPE=submit value="Submit">
</FORM>
<% End Sub %>
<%
Sub Sendinfo()
FolderToCheck = server.mappath("\") & "/cgi-bin/messages235302"
Dim fs, f, f1, fc, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(FolderToCheck)
Set fc = f.Files
For Each f1 in fc
Wfile=f1.name
Response.write("<hr><b>" & Wfile & "/" & "</b><p>")
FiletoCheck=FolderToCheck & Wfile
Set a=fs.OpenTextFile(FiletoCheck)
theinfo=a.ReadAll
Response.write("<pre>" & Theinfo & "</pre>")
Next
On request we have create a new script which allows to delete messages after reading
them
To get the script, choose a name and a password, and you will get the new version of the
script in the response page. The name of the resulting script and location in your site is not
limited.
Choose name
Choose password
Submit
Example poll
Question:
Do you like copy and paste scripts?
Response 1:
Response 2:
Yes
No
Response 3:
No
Submit
Response 4:
Response 5:
Response 6:
Response 7:
Response page
Response 8:
Response 9:
Response 10:
Responses in one line
lines
Center
No center
Submit
GetremoteURL.asp
<%
We may also request for specific parts of the information included in the headers (check a
regular :
To request for Server:
ResponsePage = GetConnection.getResponseHeader("Server")
To request for Date:
ResponsePage = GetConnection.getResponseHeader("Date")
To request for Content Length:
ResponsePage = GetConnection.getResponseHeader("Content-Length")
...
In the example bellow we have add some code to avoid error messages when url is not
available, so that we will get a alternative text (line 17)
GetremoteURL.asp
<%
' Intruduce the url you want to visit
GotothisURL = "http://www.asptutorial.info"
' Create the xml object
Set GetConnection = CreateObject("Microsoft.XMLHTTP")
' Conect to specified URL
GetConnection.Open "get", GotothisURL, False
on error resume next
GetConnection.Send
' ResponsePage is the response we will get when visiting GotothisURL
ResponsePage = GetConnection.responseText
' We will write
if ResponsePage="" then
Response.write("The page is not available")
else
Response.write(ResponsePage)
end if
Set GetConnection = Nothing
%>
Googlesearch.asp
<html><head><title> Search</title></head>
<body bgcolor=ffffff>
<%
if request.querystring="" then
sendform()
else
sendform()
' You must ask Google for a key
key = "00000000000000000000000000000000000"
' The URL where the script is located
URL = "http://www.agencija027.com/"
SoapText = "<?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope xmlns:SOAPENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/1999/XMLSchema'><SOAPENV:Body><ns1:doGoogleSearch xmlns:ns1='urn:GoogleSearch' SOAPENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><key xsi:type='xsd:string'>"
& key &"</key><q xsi:type='xsd:string'>" & request.querystring("keywords") & "</q><start
xsi:type='xsd:int'>" & request.querystring("h") & "</start><maxResults
xsi:type='xsd:int'>10</maxResults><filter xsi:type='xsd:boolean'>true</filter><restrict
xsi:type='xsd:string'></restrict><safeSearch xsi:type='xsd:boolean'>false</safeSearch><lr
xsi:type='xsd:string'></lr> <ie xsi:type='xsd:string'>latin1</ie><oe
xsi:type='xsd:string'>latin1</oe></ns1:doGoogleSearch></SOAP-ENV:Body></SOAPENV:Envelope>"
Googleurl = "http://api.google.com/search/beta2"
Set objXML = CreateObject("Microsoft.XMLHTTP")
objXML.open "POST",Googleurl,"False"
objXML.setRequestHeader "Man", "POST"+" "+Googleurl+" HTTP/1.1"
objXML.setRequestHeader "MessageType", "CALL"
objXML.setRequestHeader "Content-Type", "text/xml"
objXML.send SoapText
ResponsePage = objXML.responseText
Set objXML = Nothing
ResponsePage=Replace(ResponsePage," xsi:type=" & CHR(34) & "xsd:string" & CHR(34),"")
ResponsePage=Replace(ResponsePage,"<b>","")
ResponsePage=Replace(ResponsePage,"</b>","")
ResponsePage=Replace(ResponsePage,"<br>","<br>")
EstimatedResults=left(ResponsePage,inStr(ResponsePage,"</estimatedTotalResultsCount>")1)
EstimatedResults=right(EstimatedResults,len (EstimatedResults)inStr(EstimatedResults,"<estimatedTotalResultsCount")-46)
Response.write ("Estimated results for <b>" & q & "</b>: " & EstimatedResults & "
<A href=" & request.servervariables("URL") & "?keywords=" &
request.querystring("keywords") & "&h=" & request.querystring("h"))+10 & "><font
size=2>next 10</font></a><HR>")
public namearray
namearray=split (ResponsePage,"<item xsi:type=" & CHR(34) & "ns1:ResultElement" &
CHR(34) & ">")
max=ubound(namearray)-1
for i=1 to max
theurl=left(namearray(i),inStr(namearray(i),"</URL>")-1)
theurl=right(theurl,len (theurl)-instr(theurl,"<URL>")-4)
thetitle=left(namearray(i),inStr(namearray(i),"</title>")-1)
thetitle=right(thetitle,len (thetitle)-inStr(thetitle,"<title>")-6)
if thetitle="" then
thetitle="No Title"
end if
AA=inStr(namearray(i),"</snippet>")-1
thedescription=left(namearray(i),AA)
thedescription=right(thedescription,len (thedescription)-inStr(thedescription,"<snippet>")-8)
Searchresults=Searchresults & "<p><a href=" & theurl & ">" & thetitle & "</a><br>" &
thedescription & "<br><font size=2>" & theurl & "</font>"
next
Response.write(Searchresults)
end if
%>
<% Sub SendForm() %>
<form method=get action=<% =request.servervariables("URL") %>>
Find Keywords <input type=text name=keywords size=15>
<input type=hidden name=h value=0> <input type=submit value="Google Search">
</form>
<% end sub%>
<HR>
This guest book is an adaptation of Request info and save it to a file script, but in this
case the number input fields has been reduced to the needs in a guest book, and the
access to the information provided by users is not password protected. This is also a
copy and paste script, so in most cases, you will only need to copy the code in the
tables bellow to get it working in your server.
This script will create a subdirectory withing cgi-bin ("cgi-bin/guessbook"), a counter
("cgi-bin/guessbook/counter.txt") and each message leave in the guessbook will be
save to a text file within the same subdirectory in correlative order ("cgibin/guessbook/1.txt", "cgi-bin/guessbook/2.txt", "cgi-bin/guessbook/3.txt" etc).
You may try it here
First, we will need a form users will used to write messeges to the guessbook:
form.html
<a href=guestbook.asp>See guestbook</a><p>
<FORM ACTION="guestbook.asp" METHOD=post>
Your name<br>
<input type=text name=visitorsname size=25><br>
Your email<br>
<input type=text name=visitorsemail size=25><br>
Your message<br>
<textarea name=visitorsmessage rows=4 Cols=80>
</textarea><BR>
<INPUT TYPE=submit value="Post">
</FORM>
And we also need the script. In case a message is send to the guestbook, then it will be
save and the messages in the guest book will be shown. If we link to this page
(without using a form), then messages will be shown.
Wcounter=Folderpath &"/counter.txt"
if request.form<>"" then
Set fs = CreateObject("Scripting.FileSystemObject")
if fs.FolderExists(Folderpath) then
Set a = fs.OpenTextFile(Wcounter)
counter = Clng(a.ReadLine)
counter = counter + 1
a.close
else
Set a = fs.CreateFolder(Folderpath)
counter=1
end if
Set a = fs.CreateTextFile(Wcounter,True)
a.WriteLine(counter)
a.Close
Set fs=nothing
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(Folderpath & "\" & counter & ".txt")
a.WriteLine("<b><a HREF=mailto:" & Request.Form("visitorsname") & ">" &
Request.Form("visitorsname") & "</a></b>")
a.WriteLine(Request.Form("visitorsmessage"))
a.Close
Set a=nothing
Set fs=nothing
end if
Dim fs, f, f1, fc, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(Folderpath)
Set fc = f.Files
Response.Write ("<HTML><HEAD><TITLE>Guest book</TITLE></HEAD>")
Response.Write ("<BODY BGCOLOR=FFFFFF>")
Response.Write ("<TABLE BORDER=0 Width=100" & CHR(37) & ">")
Response.Write ("<TR><TD BGCOLOR=C0C0C0>")
Response.Write ("<FONT SIZE=5><B>Guest book: posted messages</B></FONT>")
Response.Write ("</TD></TR></TABLE>")
For Each f1 in fc
Wfile=f1.name
if Wfile<>"counter.txt" then
FiletoCheck=Folderpath & "/" & Wfile
Set a=fs.OpenTextFile(FiletoCheck)
Theinfo=a.ReadAll
Response.write("<pre>" & Theinfo & "</pre><hr>")
end if
Next
'to show last message in the top,
'remove previous 4 lines and write next 4 lines instead
' Theinfo="<pre>" &a.ReadAll & "</pre><hr>" & Theinfo
' end if
'Next
'Response.write(Theinfo)
Post
On request we have create a script which allows to delete messages after reading
them
To get the script, choose a name and a password, and you will get the script in the
response page. The name of the resulting script and location in your site is not limited.
Choose name
Choose password
Submit
Example 1
Would you like to get on your email all the information included in a form?
First of all you need a form, as for example the one in the table:
form.html
<FORM ACTION="formtomail.asp" METHOD=post>
<!-- Your fields here -->
<INPUT TYPE=submit value="Submit">
</FORM>
formtomail.asp
<%
For Each x In Request.Form
message = message & x & ": " & Request.Form(x) & CHR(10)
Next
set smtp=Server.CreateObject("Bamboo.SMTP")
smtp.Server="mail.yourdomain.com"
smtp.Rcpt="youremail@yourdomain.com"
smtp.From="formtomail@yourdomain.com"
smtp.FromName="Joe Smith"
smtp.Subject="Response to my form"
smtp.Message = message
on error resume next
smtp.Send
if err then
response.Write err.Description
else
Response.redirect ("http:// redirect.com")
end if
set smtp = Nothing
%>
using a field like this: <input type="text" name="email">, you may write
"request.for("email")" instead of "formtomail@yourdomain.com".That way
you will get un email from the person filling the form.
"Joe Smith" will be the name of the sender. You may write
"request.form("yourname")" if you are asking your visitors their name in a
specific field (p.e., <input type="text" name="yourname">.
"Response to my form" will be the subject of the email you will get.
This script will redirect the response to a different page. Whatever you want to
unswer to the person who has fill the form must be writen in a html page.
Write this url in the script (change "http:// redirect.com").
NOTE: You may have problems with this script in your server in case
"Bamboo.SMTP" instruction is not supported by your server. In that case you will
need a different script.
This script will add or remove emails to a list. It will not send emails. For this second porpouse you
may check this script
The script code bellow has been split in different parts, each one corresponding to a subroutine. After
each section of the script an explanation is provided.
You may try this example (emails provided will be remove regularly from the list)
Explanation of each part of the script is provided bellow.
The form asking for emails (included in the last subroutine of the script) may be place in a different
page (but it must point to the script).
This script will createa file in the server the first time an email is submit (at this moment is set up to
create the file at "/cgi-bin/subscribers.txt").
This random number will be send to the subscriber. It will be included in the url the subscriber must visit a
confirm the inclusion in the mailing list.
<%
Sub CheckEmailandSendEmail()
Wemail=request.form("email")
test1=instr(Wemail, "@")
test2=instr(Wemail, ".")
test3=len(Wemail)
test4=InStr (test1,Wemail,".",1)
set smtp=Server.CreateObject("Bamboo.SMTP")
smtp.Server="mail.yourdomain.com"
smtp.Rcpt=request.form("email")
smtp.From="webmaster@yourdomain.com"
smtp.FromName="John Smith"
smtp.Subject="Mailing list inclusion request"
smtp.Message = message
on error resume next
smtp.Send
if err then
response.Write("Internal server error")
response.end
end if
<subscriber1@domain1.com><subscriber2@domain2.com><subscriber3@domain3.com>
<subscriber4@domain4.com><subscriber5@domain5.com><subscriber6@domain6.com>
<subscriber7@domain7.com>
After adding the email Responsetext is defined.
<%
Sub RemoveEmail()
email=lcase(request.form("email"))
email="<" & email & ">"
Wfile=server.mappath("\") &"/cgi-bin/subscribers.txt"
Set fs = CreateObject("Scripting.FileSystemObject")
on error resume next
Set a = fs.OpenTextFile(Wfile)
allemails = a.ReadAll
a.close
if error then
Responsetext="The mailing list is not available at the moment"
else
if instr(allemails,email)>0 then
allemails=replace(allemails,email,"")
Set a = fs.CreateTextFile(Wfile,True)
a.Write(allemails)
a.Close
Responsetext="Your email has been remove from our mailinglist"
else
Responsetext="Your email is not included in this mailing list"
end if
end if
end sub
%>
Explanation:
The email (which was stored in a session obhect) will suffer the same transformation as in the
previous subroutine.Then the file contain the list of emails is open and read (in case an error occurs
when trying to open the file a Responsetext is defined), I the email is included in the list it will be
deleted. If not the corresponding response will be set up.
When trying to delete the email (see subroutine bellow), this additional character added in first and
last position ("<> and "<") will prevent the script to delete aditional emails:
p.e. when deleting from the list "a@domain.com" we will avoit deleting "ana@domain.com"
(because we will delete "<a@domain.com>").
After deleteing the email the corresponding answer will be set up.
<% Sub SendResponse() %>
<html><head><title>Request to join mailing list</title></head>
<body bgcolor="#FFFFFF" text="#000000">
<center>
Add your email to our mailing list
<FORM METHOD=POST ACTION="<% =Request.servervariables("URL") %>">
<BR>
Email address: <INPUT TYPE="text" NAME="email" Size="60" MAXLENGTH="128">
<BR><BR>
<input type=radio name="action" value="Subscribe" checked> Subscribe
<input type=radio name="action" value="Unsubscribe"> Unsubscribe<BR><BR>
<INPUT TYPE="SUBMIT" VALUE="Submit/Enviar"><INPUT TYPE="RESET" VALUE="Clear/Borrar">
</FORM>
</center>
</body></html>
<% End Sub %>
Explanation:
This subroutine is used to introduce the email o the user the first time he to the page.
The form may be place in different page as far as it points to the script.
head.txt
<html><head><title>Links Page</title>
</head>
<body bgcolor="#FFFFFF">
<center><BR>
<table BORDER=0 COLS=2 WIDTH="500"><tr><td ALIGN=CENTER BGCOLOR="#AAAAFF"
COLSPAN=2>
<font face="Times New Roman,Times" color="red" size=7><b><i>My Links
Page</i></b></font><br><font face="Times New Roman,Times" color="green" size=4><b><i>The
place to find the very new</i></b></font>
</td></tr>
<tr><td>
<HR>
tail.txt
<HR></TD></TR></TABLE>
<!-- Please do not remove next two lines -->
<table BORDER=0 WIDTH="500"><TR><TD ALIGN=RiGHT><FONT SIZE=1>This script
obtained from <A
HREF="http://www.submitside.com">Submitside.com</A>.</TD></TR></TABLE>
<!-- Thank you -->
</CENTER>
</BODY></HTML>
addurl.asp
<!--#include virtual="/Links/head.txt" -->
<%
aa=Request.Form("url")
bb=Request.Form ("title")
cc=Request.Form ("description")
newlink="<LI><A HREF=" & aa & ">" & bb & "</A><BR>" & cc
badhtml=0
if instr(aa,"<")>0 OR instr(bb,"<")>0 OR instr(cc,"<")>0 OR instr(aa,">")>0 OR instr(bb,">")>0 OR
instr(cc,">")>0 OR instr(aa,".")=0 then
badhtml=1
end if
if instr(aa,".")=0 OR aa="" OR bb="" OR cc="" OR len(aa)>256 OR len(bb)>100 OR len(cc)>256 OR
badhtml=1 then %>
<CENTER>Please go back and check your data<BR>Some data are incorrect</CENTER>
<% else %>
<%
dim thelink(50)
Wfile=Server.Mappath ("/") & "\Links\links.txt"
Set fs = CreateObject("Scripting.FileSystemObject")
Set thisfile = fs.OpenTextFile(Wfile)
registeredlink=0
for counter = 1 to 50
thelink (counter)=thisfile.readline
if instr (thelink (counter),aa)>0 then
registeredlink=1
end if
next
thisfile.Close
set thisfile=nothing
set fs=nothing
if registeredlink=0 then
Response.write ("<OL>")
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(Wfile,True)
for counter = 2 to 50
a.WriteLine(thelink (counter))
Response.write thelink (counter)
next
a.WriteLine(newlink)
a.Close
Response.write (newlink)
Response.write ("</OL><center><A HREF=/Links>Links Page</A></center>")
else
Response.write ("The link is already included in the list")
end if
%>
<% end if %>
<!--#include virtual="/Links/tail.txt" -->
links.txt (this file must contain 50 lines. In this case the first 49 lines are blank lines.
If there are less than 50 lines you will get an error when the script is running)
Active server pages must be available in your server to use this script.
Create the following pages and save them to your server.
The system includes a form and a response file. Both may be customized.
chat.html
<html>
<head><title>Chat</title></head>
<frameset rows="*,100">
<frame src="chatopinions.asp">
<frame src="chatform.asp">
</frameset>
</html>
chatopinions.asp
<html>
<head>
<META HTTP-EQUIV=refresh content="5;URL=chatopinions.asp"></head>
<body bgcolor=FFFFFF>
<center>
<table border=0 width=350>
<tr><td width=50>
<% =Application("A9") %></td><td width=300><% =Application("B9") %>
</td></tr><tr><td>
<% =Application("A8") %></td><td><% =Application("B8") %>
</td></tr><tr><td>
<% =Application("A7") %></td><td><% =Application("B7") %>
</td></tr><tr><td>
<% =Application("A6") %></td><td><% =Application("B6") %>
</td></tr><tr><td>
<% =Application("A5") %></td><td><% =Application("B5") %>
</td></tr><tr><td width=50>
<% =Application("A4") %></td><td><% =Application("B4") %>
</td></tr><tr><td>
<% =Application("A3") %></td><td><% =Application("B3") %>
</td></tr><tr><td>
<% =Application("A2") %></td><td><% =Application("B2") %>
</td></tr><tr><td>
<% =Application("A1") %></td><td><% =Application("B1") %>
</td></tr></table>
<table border=0 width=350>
<tr><td align=right>
Get your chat at <A HREF="http://www.asptutorial.info">Asptutorial.info</A>: free script.
</td></tr></table>
</center>
</body>
</html>
chatform.asp
<%
If Request.Form ("Opinion")="" then
ShowForm()
else
if Session("AA")="" then
NewUser()
GoAhead()
else
GoAhead()
end if
end if %>
<% Sub ShowForm() %>
<html><body bgcolor=FFFFFF>
<center>
<form method=post action=chatform.asp>
<table border=0><tr><td>
<% if Session("AA")="" then %>
Chose a name or nickname
<input type=text name=Name size=20><BR>
Type your opinion
<% else %>
<% =Session("AA") %>
<% end if %>
<input type=text size=60 name=Opinion value="<% =request.form("Opinion") %>"><BR>
<input type=submit value="Submit">
</td><tr></table>
</form>
</center>
</body>
</html>
<% End Sub %>
<% Sub GoAhead() %>
<%
BB=Request.form("Opinion")
BB=server.htmlencode(BB)
Application.Lock
Application("B1")=Application("B2")
Application("B2")=Application("B3")
Application("B3")=Application("B4")
Application("B4")=Application("B5")
Application("B5")=Application("B6")
Application("B6")=Application("B7")
Application("B7")=Application("B8")
Application("B8")=Application("B9")
Application("B9")=BB
Application("A1")=Application("A2")
Application("A2")=Application("A3")
Application("A3")=Application("A4")
Application("A4")=Application("A5")
Application("A5")=Application("A6")
Application("A6")=Application("A7")
Application("A7")=Application("A8")
Application("A8")=Application("A9")
Application("A9")=Session("AA")
Application.Unlock
%>
<html>
<head></head><body bgcolor=FFFFFF>
<center>
<form method=post action=chatform.asp>
<table border=0><tr><td>
<% =Session("AA") %> <input type=text size=60 name=Opinion>
<BR><input type=submit value="Submit">
</td></tr></table>
</form>
</center>
</body>
</html>
<% End Sub %>
<% Sub NewUser() %>
<%
AA=Request.form("Name")
AA=server.htmlencode(AA)
Session("AA")=AA
%>
<% End Sub %>
With this script we will be able to know and show in our pages the number of active
visitors in a given moment. The script has two parts: a file name global.asa (check
information on "global.asa" file in this tutorial), and a small code you must insert in
your pages to show the number of active users.
Just copy the code in the table to a text file and save it in the main directory of your
site ("/global.asa").
global.asa
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Application_OnStart
application("activevisitors")=0
End Sub
Sub Application_OnEnd
End Sub
Sub Session_OnStart
application.lock
application("activevisitors")=application("activevisitors")+1
application.unlock
End Sub
Sub Session_OnEnd
application.lock
application("activevisitors")=application("activevisitors")-1
application.unlock
End Sub
</SCRIPT>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
The first time a visitor gets to our pages, global.asa will be executed, and
consequently, application("activevisitors") in line 4 will get a value equal to "0".
Immediately (as a new session has started), in line 12, application("activevisitors")
will be increased by one. Each time a new visitor gets to our pages
application("activevisitors") will be increased by one, and identically, each time a
session is finished, this parameter will be reduce by one (line 18).
In case we want to show the number of visitors in our page, we must use this kind of
code :
index.asp
There are <% =application("activevisitors") %> active visitors.
Last visit
<script type="text/javascript">
/***********************************************
* Display time of last visit script- by JavaScriptKit.com
* This notice MUST stay intact for use
* Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and more
***********************************************/
var lastvisit=new Object()
lastvisit.firstvisitmsg="This is your first visit to this page. Welcome!" //Change first visit message here
lastvisit.subsequentvisitmsg="Welcome back visitor! Your last visit was on <b>[displaydate]</b>" //Change subsequent visit
message here
lastvisit.getCookie=function(Name){ //get cookie value
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}
lastvisit.setCookie=function(name, value, days){ //set cookei value
var expireDate = new Date()
//set "expstring" to either future or past date, to set or delete cookie, respectively
var expstring=expireDate.setDate(expireDate.getDate()+parseInt(days))
document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/";
}
lastvisit.showmessage=function(){
if (lastvisit.getCookie("visitcounter")==""){ //if first visit
lastvisit.setCookie("visitcounter", 2, 730) //set "visitcounter" to 2 and for 730 days (2 years)
document.write(lastvisit.firstvisitmsg)
}
else
document.write(lastvisit.subsequentvisitmsg.replace("\[displaydate\]", new Date().toLocaleString()))
}
lastvisit.showmessage()
</script>
<!-/*
Background music script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/
//specify FULL path to midi
var musicsrc="http://www.yourdomain.com/allfor.mid"
if (navigator.appName=="Microsoft Internet Explorer")
document.write('<bgsound src='+'"'+musicsrc+'"'+' loop="infinite">')
else
document.write('<embed src=\"'+musicsrc+'\" hidden="true" border="0" width="20" height="20" autostart="true" loop="true">')
//-->
</script>
Table of Contents
Select one of the links below to find the contents of that trail.
Getting Started
Writing Java Programs
Writing Applets
Creating a User Interface
Custom Networking and Security
To 1.1 -- And Beyond!
Writing Global Programs
Integrating Native Code and Java Programs
JavaBeans Tutorial
Java Security 1.1
Getting Started
o The "Hello World" Applet
The Anatomy of a Java Applet
Importing Classes and Packages
Defining an Applet Subclass
Implementing Applet Methods
Running an Applet
o The "Hello World" Application
The Anatomy of a Java Application
Comments in Java Code
Defining a Class
The main() Method
Using Classes and Objects
o Common Compiler and Interpreter Problems (and Their Solutions)
Writing Java Programs
o Object-Oriented Programming Concepts: A Primer
What Is an Object?
What Are Messages?
What Are Classes?
What Is Inheritance?
Where Can I Get More Information?
o The Nuts and Bolts of the Java Language
Run the Application
Variables and Data Types
Operators
Expressions
Control Flow Statements
Arrays and Strings
Other Features of the Character-Counting Application
The main() Method
Introducing Exceptions
The Standard Input and Output Streams
o Objects, Classes, and Interfaces
Drawing
Event Handling
Using Components, the GUI Building Blocks
Using the AWT Components
General Rules for Using Components
How to Use Buttons
How to Use Canvases
How to Use Checkboxes
How to Use Choices
How to Use Dialogs
How to Use Frames
How to Use Labels
How to Use Lists
How to Use Menus
How to Use Panels
How to Use Scrollbars
How to Use TextAreas and TextFields
Details of the Component Architecture
Common Component Problems (and Their Solutions)
Laying Out Components within a Container
Using Layout Managers
General Rules for Using Layout Managers
How to Use BorderLayout
How to Use CardLayout
How to Use FlowLayout
How to Use GridLayout
How to Use GridBagLayout
Specifying Constraints
The Applet Example Explained
Creating a Custom Layout Manager
Doing Without a Layout Manager (Absolute Positioning)
Common Layout Problems (and Their Solutions)
Working with Graphics
Overview of AWT Graphics Support
Using Graphics Primitives
Drawing Simple Shapes
Working with Text
Using Images
Loading Images
Displaying Images
Manipulating Images
How to Use an Image Filter
How to Write an Image Filter
Performing Animation
Creating the Animation Loop
Animating Graphics
Eliminating Flashing
Overriding the update() Method
Double Buffering
Moving an Image Across the Screen
Displaying a Sequence of Images
Improving the Appearance and Performance of Image
Animation
Common Graphics Problems (and Their Solutions)
Custom Networking and Security
o Overview of Networking
Networking Basics
What You May Already Know About Networking in Java
o Working with URLs
What Is a URL?
Creating a URL
Parsing a URL
Reading Directly from a URL
Connecting to a URL
Reading from and Writing to a URLConnection
o All About Sockets
What Is a Socket?
Reading from and Writing to a Socket
Writing the Server Side of a Socket
o All About Datagrams
What Is a Datagram?
Writing a Datagram Client and Server
o Providing Your Own Security Manager
Introducing the Security Manager
Writing a Security Manager
Installing Your Security Manager
Deciding What SecurityManager Methods to Override
To 1.1 -- And Beyond!
o What's New in 1.1?
New Features in 1.1
Internationalization
Security and Signed Applets
AWT Enhancements
JavaBeans(tm)
JAR File Format
Networking Enhancements
I/O Enhancements
Math Package
Remote Method Invocation
Object Serialization
Reflection
Java Database Connectivity
Inner Classes
Java Native Interface
Performance Enhancements
Miscellaneous
function animateLogo() {
if (document.all)
{
yBase = window.document.body.offsetHeight/4;
xBase = window.document.body.offsetWidth/4;
}
else if (document.layers)
{
yBase = window.innerHeight/4 ;
xBase = window.innerWidth/4;
}
if (document.all)
{
var totaldivs=document.all.starsDiv.all.length
for ( i = 0 ; i < totaldivs ; i++ )
{
var tempdiv=document.all.starsDiv.all[i].style
Cursor trail 2
<SCRIPT language=JavaScript1.2>
<!-/*
Cursor Trailer II (By Kurt at kurt.grigg@virgin.net)
Modified and featured on Dynamicdrive.com
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
var message='Dynamicdrive.com';
var messagecolor='#000000'
//Enter number of seconds for message to display (0=perpetual)
var dismissafter=0
///no need to edit below/////////
var amount=5,ypos=0,xpos=0,Ay=0,Ax=0,By=0,Bx=0,Cy=0,Cx=0,Dy=0,Dx=0,Ey=0,Ex=0;
if (document.layers){
for (i = 0; i < amount; i++)
{document.write('<layer name=ns'+i+' top=0 left=0><font face="Courier New" size=3
color='+messagecolor+'>'+message+'</font></layer>')}
window.captureEvents(Event.MOUSEMOVE);
function nsmouse(evnt){xpos = evnt.pageX;ypos = evnt.pageY;makefollow()}
}
else if (document.all){
document.write("<div id='outer' style='position:absolute;top:0px;left:0px'>");
document.write("<div id='inner' style='position:relative'>");
for (i = 0; i < amount; i++)
{document.write('<div id="text"'+i+' style="position:absolute;top:0px;left:0px;fontfamily:Courier New;font-size:16px;color:'+messagecolor+'">'+message+'</div>')}
document.write("</div>");
document.write("</div>");
function iemouse(){ypos = document.body.scrollTop + event.y;xpos =
document.body.scrollLeft + event.x;makefollow()}
}
function makefollow(){
if (document.layers){
document.layers["ns0"].top=ay;document.layers["ns0"].left=ax;
document.layers["ns1"].top=by;document.layers["ns1"].left=bx;
document.layers["ns2"].top=cy;document.layers["ns2"].left=cx;
document.layers["ns3"].top=Dy;document.layers["ns3"].left=Dx;
document.layers["ns4"].top=Ey;document.layers["ns4"].left=Ex;
}
else if (document.all){
outer.all.inner.all[0].style.pixelTop=ay;outer.all.inner.all[0].style.pixelLeft=ax;
outer.all.inner.all[1].style.pixelTop=by;outer.all.inner.all[1].style.pixelLeft=bx;
outer.all.inner.all[2].style.pixelTop=cy;outer.all.inner.all[2].style.pixelLeft=cx;
outer.all.inner.all[3].style.pixelTop=Dy;outer.all.inner.all[3].style.pixelLeft=Dx;
outer.all.inner.all[4].style.pixelTop=Ey;outer.all.inner.all[4].style.pixelLeft=Ex;
}
}
function move(){
if (dismissafter!=0)
setTimeout("hidetrail()",dismissafter*1000)
if (document.layers){window.onMouseMove = nsmouse}
else if (document.all){window.document.onmousemove = iemouse}
ey = Math.round(Ey+=((ypos+20)-Ey)*2/2);ex = Math.round(Ex+=((xpos+20)-Ex)*2/2);
dy = Math.round(Dy+=(ey - Dy)*2/4);dx = Math.round(Dx+=(ex - Dx)*2/4);
cy = Math.round(Cy+=(dy - Cy)*2/6);cx = Math.round(Cx+=(dx - Cx)*2/6);
by = Math.round(By+=(cy - By)*2/8);bx = Math.round(Bx+=(cx - Bx)*2/8);
ay = Math.round(Ay+= (by - Ay)*2/10);ax = Math.round(Ax+= (bx - Ax)*2/10);
makefollow();
jumpstart=setTimeout('move()',10);
}
function hidetrail(){
if (document.all){
for (i2=0;i2<amount;i2++){
outer.all.inner.all[i2].style.visibility="hidden"
clearTimeout(jumpstart)
}
}
else if (document.layers){
for (i2=0;i2<amount;i2++){
temp="ns"+i2
document.layers[temp].visibility="hide"
clearTimeout(jumpstart)
}
}
}
window.onload=move;
//-->
</SCRIPT>
if (ns){
for (i=0; i < n; i++)
document.write('<layer name="nsmsg'+i+'" top=0 left=0 height='+a+'
width='+a+'><center>'+props+msg[i]+'</font></center></layer>');
}
if (ie){
document.write('<div id="outer"
style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
document.write('<div id="iemsg"
style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center;fontweight:regular;cursor:default">'+props+msg[i]+'</font></div>');
document.write('</div></div>');
}
(ns)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
ymouse = (ns)?evnt.pageY+20-(window.pageYOffset):event.y; // y-position
xmouse = (ns)?evnt.pageX+20:event.x-20; // x-position
}
if (ns||ie)
(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
y=new Array();
x=new Array();
Y=new Array();
X=new Array();
for (i=0; i < n; i++){
y[i]=0;
x[i]=0;
Y[i]=0;
X[i]=0;
}
function makecircle(){ // rotation properties
if (ie) outer.style.top=document.body.scrollTop;
currStep-=rotation;
for (i=0; i < n; i++){ // makes the circle
var d=(ns)?document.layers['nsmsg'+i]:iemsg[i].style;
d.top=y[i]+a*Math.sin((currStep+i*1)/3.8)+window.pageYOffset-15;
d.left=x[i]+a*Math.cos((currStep+i*1)/3.8)*2; // remove *2 for just a plain
circle, not oval
}
}
function drag(){ // makes the resistance
scrll=(ns)?window.pageYOffset:0;
y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
for (var i=1; i < n; i++){
y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed);
x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed);
}
makecircle();
// not rotation speed, leave at zero
setTimeout('drag()',10);
}
if (ns||ie)window.onload=drag;
// -->
</SCRIPT>
if (document.layers)
{window.captureEvents(Event.MOUSEMOVE);}
var yBase = 200;
var xBase = 200;
var step;
var currStep = 0;
var Xpos = 1;
var Ypos = 1;
if (document.all)
{
function MoveHandler(){
Xpos = document.body.scrollLeft+event.x;
Ypos = document.body.scrollTop+event.y;
}
document.onmousemove = MoveHandler;
}
else if (document.layers)
{
function xMoveHandler(evnt){
Xpos = evnt.pageX;
Ypos = evnt.pageY;
}
window.onMouseMove = xMoveHandler;
}
function animateLogo() {
if (document.all)
{
yBase = window.document.body.offsetHeight/4;
xBase = window.document.body.offsetWidth/4;
}
else if (document.layers)
{
yBase = window.innerHeight/4;
xBase = window.innerWidth/4;
}
if (document.all)
{
for ( i = 0 ; i < starsDiv.all.length ; i++ )
{step=3;
starsDiv.all[i].style.top = Ypos + yBase*Math.cos((currStep +
i*4)/12)*Math.cos(0.7+currStep/200);
starsDiv.all[i].style.left = Xpos + xBase*Math.sin((currStep +
i*3)/10)*Math.sin(8.2+currStep/400);
for (ai=0; ai < Clrs.length; ai++)
{
var c=Math.round(Math.random()*[ai]);
}
starsDiv.all[i].style.background=Clrs[c];
}
}
else if (document.layers)
{
for ( j = 0 ; j < 14 ; j++ ) //number of NS layers!
{step = 4;
var templayer="a"+j
document.layers[templayer].top = Ypos + yBase*Math.sin((currStep +
j*4)/12)*Math.cos(0.7+currStep/200);
document.layers[templayer].left = Xpos + xBase*Math.sin((currStep +
j*3)/10)*Math.sin(8.2+currStep/400);
for (aj=0; aj < Clrs.length; aj++)
{
var c=Math.round(Math.random()*[aj]);
}
document.layers[templayer].bgColor=Clrs[c];
}
}
currStep+= step;
setTimeout("animateLogo()", 10);
}
animateLogo();
// -->
</script>
write('<div style="position:relative;width:1px;height:1px;background:#fff000;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#ffa000;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#ff00ff;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#00ff00;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#0000ff;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#FF0000;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#ffffff;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#fff000;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#ffa000;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#ff00ff;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#00ff00;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#0000ff;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:3px;height:3px;background:#FF0000;fontsize:3px;visibility:visible"></div>')
write('</div>')
}
}
if (document.layers)
{window.captureEvents(Event.MOUSEMOVE);}
var yBase = 200;
var xBase = 200;
var step = 1;
var currStep = 0;
var Xpos = 1;
var Ypos = 1;
if (document.all)
{
function MoveHandler(){
Xpos = document.body.scrollLeft+event.x;
Ypos = document.body.scrollTop+event.y;
}
document.onmousemove = MoveHandler;
}
else if (document.layers)
{
function xMoveHandler(evnt){
Xpos = evnt.pageX;
Ypos = evnt.pageY;
}
window.onMouseMove = xMoveHandler;
}
function animateLogo() {
if (document.all)
{
yBase = window.document.body.offsetHeight/6;
xBase = window.document.body.offsetWidth/6;
}
else if (document.layers)
{
yBase = window.innerHeight/8;
xBase = window.innerWidth/8;
}
if (document.all)
{
for ( i = 0 ; i < starsDiv.all.length ; i++ )
{
starsDiv.all[i].style.top = Ypos + yBase*Math.sin((currStep +
i*4)/12)*Math.cos(400+currStep/200);
starsDiv.all[i].style.left = Xpos + xBase*Math.sin((currStep +
i*3)/10)*Math.sin(currStep/200);
}
}
else if (document.layers)
{
for ( j = 0 ; j < 14 ; j++ ) //number of NS layers!
{
var templayer="a"+j
document.layers[templayer].top = Ypos + yBase*Math.sin((currStep +
j*4)/12)*Math.cos(400+currStep/200);
document.layers[templayer].left = Xpos + xBase*Math.sin((currStep +
j*3)/10)*Math.sin(currStep/200);
}
}
currStep+= step;
setTimeout("animateLogo()", 10);
}
animateLogo();
</script>
Kissing trail
<style type="text/css">
<!-h1 {
color:#cc3333;
font-family:"Comic Sans MS",Helvetica;
}
h3 {
color:#993333;
font-family:"Comic Sans MS",Helvetica;
}
.kisser {
position:absolute;
top:0;
left:0;
visibility:hidden;
}
-->
</style>
<script language="JavaScript1.2" type="text/JavaScript">
<!-- cloak
//Kissing trail- By dij8 (dij8@dij8.com)
//Modified by Dynamic Drive for bug fixes
//Visit http://www.dynamicdrive.com for this script
kisserCount = 15 //maximum number of images on screen at one time
curKisser = 0 //the last image DIV to be displayed (used for timer)
kissDelay = 1000 //duration images stay on screen (in milliseconds)
kissSpacer = 50 //distance to move mouse b4 next heart appears
theimage = "lips_small.gif" //the 1st image to be displayed
theimage2 = "small_heart.gif" //the 2nd image to be displayed
//Browser checking and syntax variables
var docLayers = (document.layers) ? true:false;
var docId = (document.getElementById) ? true:false;
var docAll = (document.all) ? true:false;
var docbitK = (docLayers) ? "document.layers['":(docId) ? "document.getElementById('":
(docAll) ? "document.all['":"document."
var docbitendK = (docLayers) ? "']":(docId) ? "')":(docAll) ? "']":""
}
//Make the image disappear
function hideKisser(knum) {
eval(docbitK + "kisser" + knum + docbitendK + stylebitK + ".visibility = '" + hidebitK + "'")
}
function kissbegin(){
//Let the browser know when the mouse moves
if (docLayers) {
document.captureEvents(Event.MOUSEMOVE)
document.onMouseMove = doKisser
} else {
document.onmousemove = doKisser
}
}
window.onload=kissbegin
// decloak -->
</script>
Tremblin message
<style>
.jc{
position:relative;
}
</style>
<script language="JavaScript1.2">
//Trembling message script- Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com
var ns6=document.getElementById&&!document.all
var ie=document.all
var customcollect=new Array()
var i=0
function jiggleit(num){
if ((!document.all&&!document.getElementById)) return;
customcollect[num].style.left=(parseInt(customcollect[num].style.left)==-1)?
customcollect[num].style.left=1 : customcollect[num].style.left=-1
}
function init(){
if (ie){
while (eval("document.all.jiggle"+i)!=null){
customcollect[i]= eval("document.all.jiggle"+i)
i++
}
}
else if (ns6){
while (document.getElementById("jiggle"+i)!=null){
customcollect[i]= document.getElementById("jiggle"+i)
i++
}
}
if (customcollect.length==1)
setInterval("jiggleit(0)",80)
else if (customcollect.length>1)
for (y=0;y<customcollect.length;y++){
var tempvariable='setInterval("jiggleit('+y+')",'+'100)'
eval(tempvariable)
}
}
window.onload=init
</script>
Wave text
}
window.onload=start
</Script>
<div ID = "wft" Style = "width:600px; filter:wave(add=0, freq=4, light=0, phase=0,
strength=5)" class = "big">
Cenovnik Agencije 027</div>
Rainbow text
<STYLE>
<!-Rainbow Text- By Chris Rickard (chris.rickard@paccoast.com)
Submitted to Dynamicdrive.com
For this script, visit http://www.dynamicdrive.com
-->
.rainbow{ behavior:url(rainbow.htc) }
</STYLE>
Matrix text
<style type="text/css">
.matrix { font-family:Lucida Console, Courier, Monotype; font-size:10pt; text-align:center;
width:10px; padding:0px; margin:0px;}
</style>
<script type="text/javascript" language="JavaScript">
<!-var rows=11; // must be an odd number
var speed=50; // lower is faster
var reveal=2; // between 0 and 2 only. The higher, the faster the word appears
var effectalign="default" //enter "center" to center it.
/***********************************************
* The Matrix Text Effect- by Richard Womersley (http://www.mf2fm.co.uk/rv)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var w3c=document.getElementById && !window.opera;;
var ie45=document.all && !window.opera;
var ma_tab, matemp, ma_bod, ma_row, x, y, columns, ma_txt, ma_cho;
var m_coch=new Array();
var m_copo=new Array();
window.onload=function() {
if (!w3c && !ie45) return
var matrix=(w3c)?document.getElementById("matrix"):document.all["matrix"];
ma_txt=(w3c)?matrix.firstChild.nodeValue:matrix.innerHTML;
ma_txt=" "+ma_txt+" ";
columns=ma_txt.length;
if (w3c) {
while (matrix.childNodes.length) matrix.removeChild(matrix.childNodes[0]);
ma_tab=document.createElement("table");
ma_tab.setAttribute("border", 0);
ma_tab.setAttribute("align", effectalign);
ma_tab.style.backgroundColor="#000000";
ma_bod=document.createElement("tbody");
for (x=0; x<rows; x++) {
ma_row=document.createElement("tr");
for (y=0; y<columns; y++) {
matemp=document.createElement("td");
matemp.setAttribute("id", "Mx"+x+"y"+y);
matemp.className="matrix";
matemp.appendChild(document.createTextNode(String.fromCharCode(160)));
ma_row.appendChild(matemp);
}
ma_bod.appendChild(ma_row);
}
ma_tab.appendChild(ma_bod);
matrix.appendChild(ma_tab);
} else {
ma_tab='<ta'+'ble align="'+effectalign+'" border="0" style="background-color:#000000">';
for (var x=0; x<rows; x++) {
ma_tab+='<t'+'r>';
for (var y=0; y<columns; y++) {
ma_tab+='<t'+'d class="matrix" id="Mx'+x+'y'+y+'"> </'+'td>';
}
ma_tab+='</'+'tr>';
}
ma_tab+='</'+'table>';
matrix.innerHTML=ma_tab;
}
ma_cho=ma_txt;
for (x=0; x<columns; x++) {
ma_cho+=String.fromCharCode(32+Math.floor(Math.random()*94));
m_copo[x]=0;
}
ma_bod=setInterval("mytricks()", speed);
}
function mytricks() {
x=0;
for (y=0; y<columns; y++) {
x=x+(m_copo[y]==100);
ma_row=m_copo[y]%100;
if (ma_row && m_copo[y]<100) {
if (ma_row<rows+1) {
if (w3c) {
matemp=document.getElementById("Mx"+(ma_row-1)+"y"+y);
matemp.firstChild.nodeValue=m_coch[y];
}
else {
matemp=document.all["Mx"+(ma_row-1)+"y"+y];
matemp.innerHTML=m_coch[y];
}
matemp.style.color="#33ff66";
matemp.style.fontWeight="bold";
}
if (ma_row>1 && ma_row<rows+2) {
matemp=(w3c)?document.getElementById("Mx"+(ma_row2)+"y"+y):document.all["Mx"+(ma_row-2)+"y"+y];
matemp.style.fontWeight="normal";
matemp.style.color="#00ff00";
}
if (ma_row>2) {
matemp=(w3c)?document.getElementById("Mx"+(ma_row3)+"y"+y):document.all["Mx"+(ma_row-3)+"y"+y];
matemp.style.color="#009900";
}
if (ma_row<Math.floor(rows/2)+1) m_copo[y]++;
else if (ma_row==Math.floor(rows/2)+1 && m_coch[y]==ma_txt.charAt(y)) zoomer(y);
else if (ma_row<rows+2) m_copo[y]++;
else if (m_copo[y]<100) m_copo[y]=0;
}
else if (Math.random()>0.9 && m_copo[y]<100) {
m_coch[y]=ma_cho.charAt(Math.floor(Math.random()*ma_cho.length));
m_copo[y]++;
}
}
if (x==columns) clearInterval(ma_bod);
}
function zoomer(ycol) {
var mtmp, mtem, ytmp;
if (m_copo[ycol]==Math.floor(rows/2)+1) {
for (ytmp=0; ytmp<rows; ytmp++) {
if (w3c) {
mtmp=document.getElementById("Mx"+ytmp+"y"+ycol);
mtmp.firstChild.nodeValue=m_coch[ycol];
}
else {
mtmp=document.all["Mx"+ytmp+"y"+ycol];
mtmp.innerHTML=m_coch[ycol];
}
mtmp.style.color="#33ff66";
mtmp.style.fontWeight="bold";
}
if (Math.random()<reveal) {
mtmp=ma_cho.indexOf(ma_txt.charAt(ycol));
ma_cho=ma_cho.substring(0, mtmp)+ma_cho.substring(mtmp+1, ma_cho.length);
}
if (Math.random()<reveal-1) ma_cho=ma_cho.substring(0, ma_cho.length-1);
m_copo[ycol]+=199;
setTimeout("zoomer("+ycol+")", speed);
}
else if (m_copo[ycol]>200) {
if (w3c) {
mtmp=document.getElementById("Mx"+(m_copo[ycol]-201)+"y"+ycol);
mtem=document.getElementById("Mx"+(200+rows-m_copo[ycol]--)+"y"+ycol);
}
else {
mtmp=document.all["Mx"+(m_copo[ycol]-201)+"y"+ycol];
mtem=document.all["Mx"+(200+rows-m_copo[ycol]--)+"y"+ycol];
}
mtmp.style.fontWeight="normal";
mtem.style.fontWeight="normal";
setTimeout("zoomer("+ycol+")", speed);
}
else if (m_copo[ycol]==200) m_copo[ycol]=100+Math.floor(rows/2);
if (m_copo[ycol]>100 && m_copo[ycol]<200) {
if (w3c) {
mtmp=document.getElementById("Mx"+(m_copo[ycol]-101)+"y"+ycol);
mtmp.firstChild.nodeValue=String.fromCharCode(160);
mtem=document.getElementById("Mx"+(100+rows-m_copo[ycol]--)+"y"+ycol);
mtem.firstChild.nodeValue=String.fromCharCode(160);
}
else {
mtmp=document.all["Mx"+(m_copo[ycol]-101)+"y"+ycol];
mtmp.innerHTML=String.fromCharCode(160);
mtem=document.all["Mx"+(100+rows-m_copo[ycol]--)+"y"+ycol];
mtem.innerHTML=String.fromCharCode(160);
}
setTimeout("zoomer("+ycol+")", speed);
}
}
// -->
</script>
3d spinning message
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
<style type="text/css">
v\:* { behavior: url(#default#VML); }
</style>
<script type="text/javascript">
/***********************************************
* 3D Spinning Message Script- By Copyright (c) 2003 Peter Gehrig
* Website: http://www.24fun.com
* Script available at/modified by Dynamic Drive (http://www.dynamicdrive.com)
* This notice must stay intact for use
***********************************************/
// Add as many messages as you like
var message=new Array("Dynamic Drive", "#1 DHTML site online", "Visit us for free
scripts", "Enjoy")
// Set the outline-color. Add as many colors as you like
var outlinecolor=new Array("black", "black")
// Set fillcolors 1. Add as many colors as you like
var fillcolor1=new Array("gray", "green", "white", "green")
// Set fillcolors 2. Add as many colors as you like
var fillcolor2=new Array("blue", "olive", "black", "lime")
// Set the letter marking the circle
var circlemark=new Array("-")
// Set the width of the outline
var strkweight=2
// Set the waiting time between the messages (seconds)
var pause=2
// Set the strength of the opacity (transparency of letters)
var strengthopacity="60%"
// Set the size of the circle (values range from 0.1 to 1)
var circlesize=0.5
// Always keep messages in view even if page is scrolled? (DD added option)
var keepinview="yes"
// Do not edit below this line
mytruebody=(!window.opera && document.compatMode && document.compatMode!
="BackCompat")? document.documentElement : document.body //Dynamicdrive added
object
var outerwidth=mytruebody.clientWidth
var outerheight=mytruebody.clientHeight
var innerwidth=Math.floor(circlesize*outerwidth)
var innerheight=Math.floor(circlesize*outerheight)
var posleft=(outerwidth-innerwidth)/2
var postop=(outerheight-innerheight)/2
var path=new Array()
var i_message=0
var i_outlinecolor=0
var i_fillcolor1=0
var i_fillcolor2=0
var i_messagelength=0
var longestmessage=0
pause*=1000
var ie=document.getElementById&&document.all?1:0
for (i=0;i<=message.length-1;i++) {
if (message[i].length>longestmessage) {
longestmessage=message[i].length
}
longestmessage+=4
}
for (i=0;i<=message.length-1;i++) {
var emptyspace=""
var i_emptyspace=(longestmessage-message[i].length)/2
for (ii=0;ii<=i_emptyspace;ii++) {
emptyspace+=circlemark
}
message[i]=emptyspace+" "+message[i]+" "+emptyspace
}
function changeform() {
if (keepinview=="yes") //DD added
document.getElementById("roofid").style.top=mytruebody.scrollTop //DD added
if (i_outlinecolor >= outlinecolor.length) {i_outlinecolor=0}
if (i_fillcolor1 >= fillcolor1.length) {i_fillcolor1=0}
window.onload=changeform
}
</script>
Bouncy message
<style type="text/css">
#supertext {
position:absolute;
left:0;
top:0;
visibility:hide;
visibility:hidden;
}
</style>
<script language="JavaScript1.2">
/*
Bouncy message script- By Dynamicdrive.com
Code based on Lloyd Hassell's, at
http://www.dynamicdrive.com/dynamicindex4/bounceimage.htm
For full source, TOS, and 100s DTHML scripts, visit http://dynamicdrive.com
*/
//Configure the below three variables
//1) Set message to display (HTML accepted)
var thecontent='<h2><font color="#0000FF">Agencija 027 Srbija!</font></h2>'
//2) Set delay after which message should be hidden, in miliseconds ('' makes it incessantly
visible on the screen)
var hidetimer='';
//3) Set speed of animation (1-50), where larger is faster
var BallSpeed = 15;
function calculatePosition() {
if (xDir == "right") {
if (xPos > (xMax - contentWidth - BallSpeed)) {
xDir = "left";
}
}
else if (xDir == "left") {
if (xPos < (0 + BallSpeed)) {
xDir = "right";
}
}
if (yDir == "down") {
if (yPos > (yMax - contentHeight - BallSpeed)) {
yDir = "up";
}
}
else if (yDir == "up") {
if (yPos < (0 + BallSpeed)) {
yDir = "down";
}
}
if (xDir == "right") {
xPos = xPos + BallSpeed;
}
else if (xDir == "left") {
xPos = xPos - BallSpeed;
}
else {
xPos = xPos;
}
if (yDir == "down") {
yPos = yPos + BallSpeed;
}
else if (yDir == "up") {
yPos = yPos - BallSpeed;
}
else {
yPos = yPos;
}
}
function hidetext(){
if (document.all)
supertext.style.visibility="hidden"
else if (document.layers)
document.supertext.visibility="hide"
clearTimeout(animatetext)
}
if (document.all||document.layers){
document.write('<span id="supertext"><nobr>'+thecontent+'</nobr></span>')
window.onload = initializeBall;
window.onresize = new Function("window.location.reload()");
}
</script>
setTimeout("test.style.visibility='hidden'",appearfor)
else if (document.getElementById)
setTimeout("document.getElementById('test').style.visibility='hidden'",appearfor)
return
}
else
setTimeout("expand()",50)
}
</script>
Flying letters
<h2 id="fly">Thanks for visiting$Dynamic Drive!</h2>
<script type="text/javascript">
//Flying Letters script- by Matthias (info@freejavascripts.f2s.com)
// Modified by Twey for efficiency and compatibility
//For this script and more, visit Dynamic Drive: http://www.dynamicdrive.com
//Configure message to display. Use "$" for linebreak
//By default, set to just grab the text from element with ID="fly"
message = document.getElementById("fly").innerHTML; // $ = taking a new line
distance = 50; // pixel(s)
speed = 200; // milliseconds
var txt="",
num=0,
num4=0,
flyofle="",
flyofwi="",
flyofto="",
fly=document.getElementById("fly");
function stfly() {
for(i=0;i != message.length;i++) {
if(message.charAt(i) != "$")
txt += "<span style='position:relative;visibility:hidden;'
id='n"+i+"'>"+message.charAt(i)+"<\/span>";
else
txt += "<br>";
}
fly.innerHTML = txt;
txt = "";
flyofle = fly.offsetLeft;
flyofwi = fly.offsetWidth;
flyofto = fly.offsetTop;
fly2b();
}
function fly2b() {
if(num4 != message.length) {
if(message.charAt(num4) != "$") {
var then = document.getElementById("n" + num4);
Nudging text
<script language="JavaScript1.2">
/*
Nudging text by Matthias (info@freejavascripts.f2s.com)
Modified by Dynamic Drive to function in NS6
For this script and more, visit http://www.dynamicdrive.com
*/
//configure message
message="Dobro dosli u Prokuplje!"
//animate text in NS6? (0 will turn it off)
ns6switch=1
var ns6=document.getElementById&&!document.all
mes=new Array();
mes[0]=-1;
mes[1]=-4;
mes[2]=-7;mes[3]=-10;
mes[4]=-7;
mes[5]=-4;
mes[6]=-1;
num=0;
num2=0;
txt="";
function jump0(){
if (ns6&&!ns6switch){
jump.innerHTML=message
return
}
if(message.length > 6){
for(i=0; i != message.length;i++){
txt=txt+"<span style='position:relative;' id='n"+i+"'>"+message.charAt(i)+"</span>"};
jump.innerHTML=txt;
txt="";
jump1a()
}
else{
alert("Your message is to short")
}
}
function jump1a(){
{
veran = 0;
s++;
if ( s == tekst.length)
{s = 0;}
p = 0;
if (window.loop)
{clearInterval(loop)}
loop = motor();
}
}
}
output += "<font style='font-size: "+ q +"pt'>" +tekst[s].substring(w,w+1)+ "</font>";
}
for(k=w;k<klaar+w;k++)
{
output += "<font style='font-size: " + size + "pt'>" +tekst[s].substring(k,k+1)+ "</font>";
}
idee.innerHTML = output;
}
function startmotor(p){
if (!document.all)
return
var loop = motor(p);
if (window.time)
{clearInterval(time)}
if (klaar == tekst[s].length)
{
klaar = 0;
veran = 1;
tel = 0;
var time = setTimeout("startmotor(" +(p+1) + ")", speed_between_messages);
}else
{
var time =setTimeout("startmotor(" +(p+1) + ")", 50);
}
}
</script>
<div ID="idee"></div>
Text animator
<style type="text/css">
<!-.textanimlink,a {
text-decoration : none;
}
P.main {
font-family : Arial;
font-size : 15pt;
font-weight : bold;
}
-->
</style>
<Script Language="Javascript">
<!-- Hiding
/*
Script created by Lefteris Haritou
(lef@the.forthnet.gr)
Permission granted to Dynamicdrive.com to feature the script
For more DHTML scripts, visit Dynamicdrive.com
*/
bname=navigator.appName;
bversion=parseInt(navigator.appVersion)
if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" &&
bversion>=4))
window.onload=start
else
stop();
window.onunload=stop
if (bname=="Netscape"){
brows=true
dt=2
}
else{
brows=false
dt=20
}
var z=0;
var msg=0;
var rgb=0;
var link=false;
var status=true;
var updwn=false;
var message= new Array();
var value=0;
var h=window.innerHeight;
var w=window.innerWidth;
var timer1;
var timer2;
var timer3;
var convert = new Array()
var hexbase= new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D",
"E", "F");
// Put here your own messages. Add as many as you wan't (Do not edit anything else in the
Script except the lines below)
var bgcolor="#FFFFFF"; //Color of background
var color="#00008D"; //Color of the Letters
message[0]='The future of JavaScript'
message[1]='Today.'
message[2]='Dynamic Drive DHTML code library'
message[3]='<a href="http://dynamicdrive.com">Click here to begin THE experience</a>'
// Put here your own messages. Add as many as you wan't (Do not edit anything else in the
Script except the lines above)
for (x=0; x<16; x++){
for (y=0; y<16; y++){
convert[value]= hexbase[x] + hexbase[y];
value++;
}
}
redx=color.substring(1,3);
greenx=color.substring(3,5);
bluex=color.substring(5,7);
hred=eval(parseInt(redx,16));
hgreen=eval(parseInt(greenx,16));
hblue=eval(parseInt(bluex,16));
eredx=bgcolor.substring(1,3);
egreenx=bgcolor.substring(3,5);
ebluex=bgcolor.substring(5,7);
ered=eval(parseInt(eredx,16));
egreen=eval(parseInt(egreenx,16));
eblue=eval(parseInt(ebluex,16));
red=ered;
green=egreen;
blue=eblue;
function start(){
if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" &&
bversion>=4)){
link=false;
updwn=true;
if (brows)
res=document.layers['textanim'].top
else{
textanim.style.width=document.body.offsetWidth-20;
textanim.innerHTML='<Pre><P Class="main" Align="Center">'+message[msg]
+'</P></Pre>'
res=textanim.style.top
for (x=0; x<document.all.length; x++)
if(document.all[x].id=="textanimlink")
link=true;
}
up()
}
}
function stop(){
clearTimeout(timer1);
clearTimeout(timer2);
clearTimeout(timer3);
}
function resz(){
h=window.innerHeight;
w=window.innerWidth;
if (updwn)
timer1=setTimeout('up()',1000)
else
timer2=setTimeout('down()',1000)
}
function breakf(){
if (status){
clearTimeout(timer1);
clearTimeout(timer2);
status=false
return;
}
else{
status=true;
if (updwn)
timer1=setTimeout('up()',dt)
else
timer2=setTimeout('down()',dt)
}
}
function up(){
if (red<hred){
if ((red+7)<hred)
red+=7;
else
red=hred
redx = convert[red]
}
else{
if ((red-7)>hred)
red-=7;
else
red=hred
redx = convert[red]
}
if (green<hgreen){
if ((green+7)<hgreen)
green+=7;
else
green=hgreen
greenx = convert[green]
}
else{
if ((green-7)>hgreen)
green-=7;
else
green=hgreen
greenx = convert[green]
}
if (blue<hblue){
if ((blue+7)<hblue)
blue+=7;
else
blue=hblue
bluex = convert[blue]
}
else{
if ((blue-7)>hblue)
blue-=7;
else
blue=hblue
bluex = convert[blue]
}
rgb = "#"+redx+greenx+bluex;
if (brows){
document.layers['textanim'].document.linkColor=rgb;
document.layers['textanim'].document.vlinkColor=rgb;
if (window.innerHeight!=h || window.innerWidth!=w){
clearTimeout(timer1);
resz()
return;
}
else{
document.layers['textanim'].document.write('<Pre><P Class="main" Align="Center"><font
color="'+rgb+'">'+message[msg]+'</font></P></Pre>')
document.layers['textanim'].document.close();
}
}
else{
textanim.style.color=rgb;
if(link)
textanimlink.style.color=rgb;
}
if (z<38){
if (brows)
document.layers['textanim'].top-else
textanim.style.posTop-z++
timer1=setTimeout('up()',dt)
}
else
{
updwn=false;
down()
}
}
function down(){
if (red<ered){
if ((red+7)<ered)
red+=7;
else
red=ered
redx = convert[red]
}
else{
if ((red-7)>ered)
red-=7;
else
red=ered
redx = convert[red]
}
if (green<egreen){
if ((green+7)<egreen)
green+=7;
else
green=egreen
greenx = convert[green]
}
else{
if ((green-7)>egreen)
green-=7;
else
green=egreen
greenx = convert[green]
}
if (blue<eblue){
if ((blue+7)<eblue)
blue+=7;
else
blue=eblue
bluex = convert[blue]
}
else{
if ((blue-7)>eblue)
blue-=7;
else
blue=eblue
bluex = convert[blue]
}
rgb = "#"+redx+greenx+bluex;
if (brows){
document.layers['textanim'].document.linkColor=rgb;
document.layers['textanim'].document.vlinkColor=rgb;
if (window.innerHeight!=h || window.innerWidth!=w){
clearTimeout(timer2);
resz()
return;
}
else{
document.layers['textanim'].document.write('<Pre><P Class="main" Align="Center"><font
color="'+rgb+'">'+message[msg]+'</font></P></Pre>')
document.layers['textanim'].document.close();
}
}
else{
textanim.style.color=rgb;
if(link)
textanimlink.style.color=rgb;
}
if (z<76){
if (brows)
document.layers['textanim'].top-else
textanim.style.posTop-z++
timer2=setTimeout('down()',dt)
}
else
{
if (brows){
document.layers['textanim'].document.write('')
document.layers['textanim'].document.close();
}
else
textanim.innerHTML='';
window.clearInterval(timer2);
if(msg<message.length-1){
msg++;
z=0;
if (brows){
document.layers['textanim'].top=res;
}
else
textanim.style.top=res;
timer3=setTimeout('start()',100);
}
else
{
msg=0;
z=0;
if (brows)
document.layers['textanim'].top=res;
else
textanim.style.top=res;
timer3=setTimeout('start()',2000);
}
}
}
// done hiding -->
</Script>
<Div id="textanim" style="position: absolute; left: 0; top: 440" onclick="breakf()">
</Div>
<Layer name="textanim" left=0 top=440>
</Layer>
timer= setTimeout("fadeout()",pause)
}
else {
clearTimeout(timer)
i_message++
if (i_message>=message.length) {i_message=0}
text.innerHTML=message[i_message]
fadein()
}
}
function fadein() {
if (document.all.cover.style.posLeft <=coverleft) {
clipleft-=step
clipright=clipleft+textwidth
clippoints="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
document.all.cover.style.clip=clippoints
document.all.cover.style.posLeft+=step
timer= setTimeout("fadein()",pause)
}
else {
clearTimeout(timer)
init()
}
}
</script>
<script language="JavaScript1.2">
if (document.all&&window.print){
document.write('<DIV ID="text" class="textstyle">'+message[0]+'</div>')
document.write('<DIV ID="cover" class="coverstyle"><img src="slidefader.gif"></DIV>')
}
</script>
Pulsating text
<script>
<!-//Pulsating Text (Chris A e-mail: KilerCris@Mail.com)
//Permission granted to Dynamic Drive to feature script in archive
//For full source and 100's more DHTML scripts, visit http://www.dynamicdrive.com
var divs = new Array();
var da = document.all;
var start;
//CONFIGUER THESE VARS!!!!!!
//speed of pulsing
var speed = 50;
function initVars(){
if (!document.all)
return
//Extend of shrink the below list all you want
//put an "addDiv(1,"2",3,4); for each div you made,
//1)'id' of div
//2)color or glow(name or hex)(in quotes!!!)
//3)minimum strength
//4)maximum strength
addDiv(hi,"lime",2,11);
addDiv(welcome,"red",4,9);
addDiv(message,"purple",2,4);
addDiv(msg2,"orange",15,17);
addDiv(msg3,"blue",1,3);
//NO MORE EDITING!!!!!!
startGlow();
}
function addDiv(id,color,min,max)
{
var j = divs.length;
divs[j] = new Array(5);
divs[j][0] = id;
divs[j][1] = color;
divs[j][2] = min;
divs[j][3] = max;
divs[j][4] = true;
}
function startGlow()
{
if (!document.all)
return 0;
for(var i=0;i<divs.length;i++)
{
divs[i][0].style.filter = "Glow(Color=" + divs[i][1] + ", Strength=" + divs[i][2]
+ ")";
divs[i][0].style.width = "100%";
}
start = setInterval('update()',speed);
}
function update()
{
for (var i=0;i<divs.length;i++)
{
if (divs[i][4])
{
divs[i][0].filters.Glow.Strength++;
if (divs[i][0].filters.Glow.Strength == divs[i][3])
divs[i][4] = false;
}
if (!divs[i][4])
{
divs[i][0].filters.Glow.Strength--;
if (divs[i][0].filters.Glow.Strength == divs[i][2])
divs[i][4] = true;
}
}
}
-->
</script>
<div id="hi" style="color: lime">
Hello!
</div>
<br>
<div id="welcome" style="color: lime">
Welcome!
</div>
<br>
<div id="message" style="color: lime">
This is a pulsating message!
</div>
<br>
<div id="msg2" style="color: lime">
This is another pulsating message!
</div>
<br>
<div id="msg3" style="color: lime">
This is yet another pulsating message!
</div>
Upper right
<script LANGUAGE="JavaScript" FPTYPE="mydynamicanimation">
<!-dynamicanimAttr = "mydynamicanimation"
animateElements = new Array()
currentElement = 0
speed = 0
stepsZoom = 8
stepsWord = 8
stepsFly = 12
stepsSpiral = 16
steps = stepsZoom
step = 0
outString = ""
function mydynAnimation()
{
var ms = navigator.appVersion.indexOf("MSIE")
ie4 = (ms>0) && (parseInt(navigator.appVersion.substring(ms+5, ms+6)) >= 4)
if(!ie4)
{
if((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion.substring(0, 1)) >= 4))
{
for (index=document.layers.length-1; index >= 0; index--)
{
layer=document.layers[index]
if (layer.left==10000)
layer.left=0
}
}
return
}
for (index=document.all.length-1; index >= document.body.sourceIndex; index--)
{
el = document.all[index]
animation = el.getAttribute(dynamicanimAttr, false)
if(null != animation)
{
if(animation == "dropWord" || animation == "flyTopRightWord" || animation ==
"flyBottomRightWord")
{
ih = el.innerHTML
outString = ""
i1 = 0
iend = ih.length
while(true)
{
i2 = startWord(ih, i1)
if(i2 == -1)
i2 = iend
outWord(ih, i1, i2, false, "")
if(i2 == iend)
break
i1 = i2
i2 = endWord(ih, i1)
if(i2 == -1)
i2 = iend
outWord(ih, i1, i2, true, animation)
if(i2 == iend)
break
i1 = i2
}
document.all[index].innerHTML = outString
document.all[index].style.posLeft = 0
document.all[index].setAttribute(dynamicanimAttr, null)
}
if(animation == "zoomIn" || animation == "zoomOut")
{
ih = el.innerHTML
outString = "<SPAN " + dynamicanimAttr + "=\"" + animation + "\" style=\"position:
relative; left: 10000;\">"
outString += ih
outString += "</SPAN>"
document.all[index].innerHTML = outString
document.all[index].style.posLeft = 0
document.all[index].setAttribute(dynamicanimAttr, null)
}
}
}
i=0
for (index=document.body.sourceIndex; index < document.all.length; index++)
{
el = document.all[index]
animation = el.getAttribute(dynamicanimAttr, false)
if (null != animation)
{
if(animation == "flyLeft")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = 0
}
else if(animation == "flyRight")
{
el.style.posLeft = 10000-offsetLeft(el)+document.body.offsetWidth
el.style.posTop = 0
}
else if(animation == "flyTop" || animation == "dropWord")
{
el.style.posLeft = 0
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "flyBottom")
{
el.style.posLeft = 0
el.style.posTop = document.body.scrollTop-offsetTop(el)+document.body.offsetHeight
}
else if(animation == "flyTopLeft")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "flyTopRight" || animation == "flyTopRightWord")
{
el.style.posLeft = 10000-offsetLeft(el)+document.body.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "flyBottomLeft")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)+document.body.offsetHeight
}
else if(animation == "flyBottomRight" || animation == "flyBottomRightWord")
{
el.style.posLeft = 10000-offsetLeft(el)+document.body.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)+document.body.offsetHeight
}
else if(animation == "spiral")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "zoomIn")
{
el.style.posLeft = 10000
el.style.posTop = 0
}
else if(animation == "zoomOut")
{
el.style.posLeft = 10000
el.style.posTop = 0
}
else
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = 0
}
el.initLeft = el.style.posLeft
el.initTop = el.style.posTop
animateElements[i++] = el
}
}
window.setTimeout("animate();", speed)
}
function offsetLeft(el)
{
x = el.offsetLeft
for (e = el.offsetParent; e; e = e.offsetParent)
x += e.offsetLeft;
return x
}
function offsetTop(el)
{
y = el.offsetTop
for (e = el.offsetParent; e; e = e.offsetParent)
y += e.offsetTop;
return y
}
function startWord(ih, i)
{
for(tag = false; i < ih.length; i++)
{
c = ih.charAt(i)
if(c == '<')
tag = true
if(!tag)
return i
if(c == '>')
tag = false
}
return -1
}
function endWord(ih, i)
{
nonSpace = false
space = false
while(i < ih.length)
{
c = ih.charAt(i)
if(c != ' ')
nonSpace = true
if(nonSpace && c == ' ')
space = true
if(c == '<')
return i
if(space && c != ' ')
return i
i++
}
return -1
}
function outWord(ih, i1, i2, dyn, anim)
{
if(dyn)
outString += "<SPAN " + dynamicanimAttr + "=\"" + anim + "\" style=\"position:
relative; left: 10000;\">"
outString += ih.substring(i1, i2)
if(dyn)
outString += "</SPAN>"
}
function animate()
{
el = animateElements[currentElement]
animation = el.getAttribute(dynamicanimAttr, false)
step++
if(animation == "spiral")
{
steps = stepsSpiral
v = step/steps
rf = 1.0 - v
t = v * 2.0*Math.PI
rx = Math.max(Math.abs(el.initLeft), 200)
ry = Math.max(Math.abs(el.initTop), 200)
el.style.posLeft = Math.ceil(-rf*Math.cos(t)*rx)
el.style.posTop = Math.ceil(-rf*Math.sin(t)*ry)
}
else if(animation == "zoomIn")
{
steps = stepsZoom
el.style.fontSize = Math.ceil(50+50*step/steps) + "%"
el.style.posLeft = 0
}
else if(animation == "zoomOut")
{
steps = stepsZoom
el.style.fontSize = Math.ceil(100+200*(steps-step)/steps) + "%"
el.style.posLeft = 0
}
else
{
steps = stepsFly
if(animation == "dropWord" || animation == "flyTopRightWord" || animation ==
"flyBottomRightWord")
steps = stepsWord
dl = el.initLeft / steps
dt = el.initTop / steps
el.style.posLeft = el.style.posLeft - dl
el.style.posTop = el.style.posTop - dt
}
if (step >= steps)
{
el.style.posLeft = 0
el.style.posTop = 0
currentElement++
step = 0
}
if(currentElement < animateElements.length)
window.setTimeout("animate();", speed)
}
//-->
</script>
<p align="center" mydynamicanimation="flyTopRightWord"
style="position: relative !important; left: 10000 !important"><strong><big><big><font
face="Arial">Welcome to <a href="http://www.dynamicdrive.com">Dynamic Drive</a>,
your
ultimate DHTML source.</font></big></big></strong></p>
Dropping
<script LANGUAGE="JavaScript" FPTYPE="dynamicanimation8">
<!-dynamicanimAttr = "dynamicanimation8"
animateElements = new Array()
currentElement = 0
speed = 0
stepsZoom = 8
stepsWord = 8
stepsFly = 12
stepsSpiral = 16
steps = stepsZoom
step = 0
outString = ""
function dynAnimation8()
{
var ms = navigator.appVersion.indexOf("MSIE")
ie4 = (ms>0) && (parseInt(navigator.appVersion.substring(ms+5, ms+6)) >= 4)
if(!ie4)
{
if((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion.substring(0, 1)) >= 4))
{
for (index=document.layers.length-1; index >= 0; index--)
{
layer=document.layers[index]
if (layer.left==10000)
layer.left=0
}
}
return
}
for (index=document.all.length-1; index >= document.body.sourceIndex; index--)
{
el = document.all[index]
animation = el.getAttribute(dynamicanimAttr, false)
if(null != animation)
{
if(animation == "dropWord" || animation == "flyTopRightWord" || animation ==
"flyBottomRightWord")
{
ih = el.innerHTML
outString = ""
i1 = 0
iend = ih.length
while(true)
{
i2 = startWord(ih, i1)
if(i2 == -1)
i2 = iend
outWord(ih, i1, i2, false, "")
if(i2 == iend)
break
i1 = i2
i2 = endWord(ih, i1)
if(i2 == -1)
i2 = iend
outWord(ih, i1, i2, true, animation)
if(i2 == iend)
break
i1 = i2
}
document.all[index].innerHTML = outString
document.all[index].style.posLeft = 0
document.all[index].setAttribute(dynamicanimAttr, null)
}
if(animation == "zoomIn" || animation == "zoomOut")
{
ih = el.innerHTML
outString = "<SPAN " + dynamicanimAttr + "=\"" + animation + "\" style=\"position:
relative; left: 10000;\">"
outString += ih
outString += "</SPAN>"
document.all[index].innerHTML = outString
document.all[index].style.posLeft = 0
document.all[index].setAttribute(dynamicanimAttr, null)
}
}
}
i=0
for (index=document.body.sourceIndex; index < document.all.length; index++)
{
el = document.all[index]
animation = el.getAttribute(dynamicanimAttr, false)
if (null != animation)
{
if(animation == "flyLeft")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = 0
}
else if(animation == "flyRight")
{
el.style.posLeft = 10000-offsetLeft(el)+document.body.offsetWidth
el.style.posTop = 0
}
else if(animation == "flyTop" || animation == "dropWord")
{
el.style.posLeft = 0
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "flyBottom")
{
el.style.posLeft = 0
el.style.posTop = document.body.scrollTop-offsetTop(el)+document.body.offsetHeight
}
else if(animation == "flyTopLeft")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "flyTopRight" || animation == "flyTopRightWord")
{
el.style.posLeft = 10000-offsetLeft(el)+document.body.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "flyBottomLeft")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)+document.body.offsetHeight
}
else if(animation == "flyBottomRight" || animation == "flyBottomRightWord")
{
el.style.posLeft = 10000-offsetLeft(el)+document.body.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)+document.body.offsetHeight
}
else if(animation == "spiral")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "zoomIn")
{
el.style.posLeft = 10000
el.style.posTop = 0
}
else if(animation == "zoomOut")
{
el.style.posLeft = 10000
el.style.posTop = 0
}
else
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = 0
}
el.initLeft = el.style.posLeft
el.initTop = el.style.posTop
animateElements[i++] = el
}
}
window.setTimeout("animate();", speed)
}
function offsetLeft(el)
{
x = el.offsetLeft
for (e = el.offsetParent; e; e = e.offsetParent)
x += e.offsetLeft;
return x
}
function offsetTop(el)
{
y = el.offsetTop
for (e = el.offsetParent; e; e = e.offsetParent)
y += e.offsetTop;
return y
}
function startWord(ih, i)
{
for(tag = false; i < ih.length; i++)
{
c = ih.charAt(i)
if(c == '<')
tag = true
if(!tag)
return i
if(c == '>')
tag = false
}
return -1
}
function endWord(ih, i)
{
nonSpace = false
space = false
while(i < ih.length)
{
c = ih.charAt(i)
if(c != ' ')
nonSpace = true
if(nonSpace && c == ' ')
space = true
if(c == '<')
return i
dt = el.initTop / steps
el.style.posLeft = el.style.posLeft - dl
el.style.posTop = el.style.posTop - dt
}
if (step >= steps)
{
el.style.posLeft = 0
el.style.posTop = 0
currentElement++
step = 0
}
if(currentElement < animateElements.length)
window.setTimeout("animate();", speed)
}
//-->
</script>
<p dynamicanimation8="dropWord"
style="position: relative !important; left: 10000 !important"><big><big>Thanks for
dropping by! Please visit us again soon.</big></big></p>
Email riddler
<script type="text/javascript">
/*<![CDATA[*/
/***********************************************
* Encrypt Email script- Please keep notice intact
* Tool URL: http://www.dynamicdrive.com/emailriddler/
* **********************************************/
<!-- Encrypted version of: milantoplica [at] *****.*** //-->
var
emailriddlerarray=[109,105,108,97,110,116,111,112,108,105,99,97,64,103,109,97,105,108,46
,99,111,109]
var encryptedemail_id57='' //variable to contain encrypted email
for (var i=0; i<emailriddlerarray.length; i++)
encryptedemail_id57+=String.fromCharCode(emailriddlerarray[i])
document.write('<a href="mailto:'+encryptedemail_id57+'">Contact Us</a>')
/*]]>*/
</script>
Snow effect
<script type="text/javascript">
/******************************************
* Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html)
* Visit Dynamic Drive DHTML code library (http://www.dynamicdrive.com/) for full source
code
* Last updated Nov 9th, 05' by DD. This notice must stay intact for use
******************************************/
//Configure below to change URL path to the snow image
var snowsrc="snow.gif"
// Configure below to change number of snow to render
var no = 10;
// Configure whether snow should disappear after x seconds (0=never):
var hidesnowtime = 0;
// Configure how much snow should drop down before fading ("windowheight" or
"pageheight")
var snowdistance = "pageheight";
///////////Stop Config//////////////////////////////////
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")?
document.documentElement : document.body
}
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;
if (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = iecompattest().clientWidth;
doc_height = iecompattest().clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "snow.gif" : snowsrc
for (i = 0; i < no; ++ i) {
dx[i] = 0;
// set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20;
// set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ie4up||ns6up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +";
VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img
src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +";
VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"'
border=\"0\"><\/div>");
}
}
}
function snowIE_NS6() { // IE and NS6 main animation function
doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
doc_height=(window.innerHeight && snowdistance=="windowheight")?
window.innerHeight : (ie4up && snowdistance=="windowheight")?
iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")?
iecompattest().scrollHeight : iecompattest().offsetHeight;
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
}
dx[i] += stx[i];
document.getElementById("dot"+i).style.top=yp[i]+"px";
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";
}
snowtimer=setTimeout("snowIE_NS6()", 10);
}
function hidesnow(){
if (window.snowtimer) clearTimeout(snowtimer)
Autumn levels
<script language="JavaScript1.2">
//Autumn leaves- by Kurt Grigg (kurt.grigg@virgin.net)
//Modified by Dynamic Drive for NS6 functionality
//visit http://www.dynamicdrive.com for this script
//Pre-load your image below!
grphcs=new Array(6)
Image0=new Image();
Image0.src=grphcs[0]="al.gif";
Image1=new Image();
Image1.src=grphcs[1]="bl.gif"
Image2=new Image();
Image2.src=grphcs[2]="cl.gif"
Image3=new Image();
Image3.src=grphcs[3]="dl.gif"
Image4=new Image();
Image4.src=grphcs[4]="el.gif"
Image5=new Image();
Image5.src=grphcs[5]="fl.gif"
Amount=8; //Smoothness depends on image file size, the smaller the size the more you can
use!
Ypos=new Array();
Xpos=new Array();
Speed=new Array();
Step=new Array();
Cstep=new Array();
ns=(document.layers)?1:0;
ns6=(document.getElementById&&!document.all)?1:0;
if (ns){
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img
src="+rndPic+"></LAYER>");
}
}
else{
document.write('<div style="position:absolute;top:0px;left:0px"><div
style="position:relative">');
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write('<img id="si'+i+'" src="'+rndPic+'"
style="position:absolute;top:0px;left:0px">');
}
document.write('</div></div>');
}
WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
for (i=0; i < Amount; i++){
Ypos[i] = Math.round(Math.random()*WinHeight);
Xpos[i] = Math.round(Math.random()*WinWidth);
Speed[i]= Math.random()*5+3;
Cstep[i]=0;
Step[i]=Math.random()*0.1+0.05;
}
function fall(){
var WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
var WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
var hscrll=(ns||ns6)?window.pageYOffset:document.body.scrollTop;
var wscrll=(ns||ns6)?window.pageXOffset:document.body.scrollLeft;
for (i=0; i < Amount; i++){
sy = Speed[i]*Math.sin(90*Math.PI/180);
sx = Speed[i]*Math.cos(Cstep[i]);
Ypos[i]+=sy;
Xpos[i]+=sx;
if (Ypos[i] > WinHeight){
Ypos[i]=-60;
Xpos[i]=Math.round(Math.random()*WinWidth);
Speed[i]=Math.random()*5+3;
}
if (ns){
document.layers['sn'+i].left=Xpos[i];
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else if (ns6){
document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i]);
document.getElementById("si"+i).style.top=Ypos[i]+hscrll;
}
else{
eval("document.all.si"+i).style.left=Xpos[i];
eval("document.all.si"+i).style.top=Ypos[i]+hscrll;
}
Cstep[i]+=Step[i];
}
setTimeout('fall()',20);
}
window.onload=fall
//-->
</script>
Bubble effect
<script language="JavaScript1.2">
<!-- Begin
//Bubble Script by Lisa (issa@lissaexplains.com, http://lissaexplains.com)
//Based on code by Altan d.o.o. (snow@altan.hr)
//For full source code and installation instructions to this script, visit
http://www.dynamicdrive.com
var no = 15; // image number or falling rate
var speed = 2; // the lower the number the faster the image moves
var snow = new Array();
snow[0] = "bubble.gif"
snow[1] = "bubble.gif"
snow[2] = "bubble.gif"
var ns4up = (document.layers) ? 1 : 0; // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 1800;
if (ns4up||ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
j = 0;
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = doc_height;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = ns6up?window.innerWidth-5:document.body.clientWidth;
doc_height = ns6up?window.innerHeight-5:document.body.clientHeight;
}
dx[i] += stx[i];
if (ie4up){
document.all["dot"+i].style.pixelTop = yp[i]+document.body.scrollTop;
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
else if (ns6up){
document.getElementById("dot"+i).style.top=yp[i]+pageYOffset;
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]);
}
}
setTimeout("snowIE_NS6()", speed);
}
if (ns4up) {
snowNS();
} else if (ie4up||ns6up) {
snowIE_NS6();
}
// End -->
</script>
Scrolable content
<ilayer name="scroll1" width=170 height=150 clip="0,0,170,150">
<layer name="scroll2" width=170 height=150 bgColor="lightyellow">
<div id="scroll3" style="width:170px;height:150px;backgroundcolor:lightyellow;overflow:scroll">
<big>T</big>his is a cool script that allows you to compact any content and confine it within
a scrollable mini "window" Save valuable document space while making your page more
"interactive", all at the same time! This script uses two different techniques- one for IE, one
for NS- to create the scrollable window. Scrollbars will be available to IE 4 users to scroll the
window, while NS users will need to use the "up" and "down" buttons instead (since NS does
not support the adding of scrollbars to contents).
</div>
</layer>
</ilayer>
<script>
/***********************************************
* Scrollable content Script- Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var nsstyle='display:""'
if (document.layers)
var scrolldoc=document.scroll1.document.scroll2
function up(){
if (!document.layers) return
if (scrolldoc.top<0)
scrolldoc.top+=10
temp2=setTimeout("up()",50)
}
function down(){
if (!document.layers) return
if (scrolldoc.top-150>=scrolldoc.document.height*-1)
scrolldoc.top-=10
temp=setTimeout("down()",50)
}
function clearup(){
if (window.temp2)
clearInterval(temp2)
}
function cleardown(){
if (window.temp)
clearInterval(temp)
}
</script>
<br><span style="display:none" style=&{nsstyle};><a href="#" onMousedown="up()"
onMouseup="clearup()" onClick="return false" onMouseout="clearup()">Up</a> | <a
href="#"
onMousedown="down()" onMouseup="cleardown()" onClick="return false"
onMouseout="cleardown()">Down</a> | <a href="#" onClick="if (document.layers)
scrolldoc.top=0;return false">Top</a> | <a href="#" onClick="if (document.layers)
scrolldoc.top=scrolldoc.document.height*(-1)+150;return false">Bottom</a></span>
Flexy slideshow
<script language="JavaScript1.2">
/***********************************************
* Flexi Slideshow- Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var variableslide=new Array()
//variableslide[x]=["path to image", "OPTIONAL link for image", "OPTIONAL text
description (supports HTML tags)"]
variableslide[0]=['ball.gif', '', '']
variableslide[1]=['spaceship.gif', 'http://www.space.com', 'Has aliens landed on earth? You
decide.']
variableslide[2]=['cake.gif', '', '']
//configure the below 3 variables to set the dimension/background color of the slideshow
var slidewidth='130px' //set to width of LARGEST image in your slideshow
var slideheight='120px' //set to height of LARGEST iamge in your slideshow, plus any text
description
var slidebgcolor='#F3F3F3'
//configure the below variable to determine the delay between image rotations (in
miliseconds)
var slidedelay=3000
////Do not edit pass this line////////////////
var ie=document.all
var dom=document.getElementById
for (i=0;i<variableslide.length;i++){
var cacheimage=new Image()
cacheimage.src=variableslide[i][0]
}
var currentslide=0
function rotateimages(){
contentcontainer='<center>'
if (variableslide[currentslide][1]!="")
contentcontainer+='<a href="'+variableslide[currentslide][1]+'">'
contentcontainer+='<img src="'+variableslide[currentslide][0]+'" border="0" vspace="3">'
if (variableslide[currentslide][1]!="")
contentcontainer+='</a>'
contentcontainer+='</center>'
if (variableslide[currentslide][2]!="")
contentcontainer+=variableslide[currentslide][2]
if (document.layers){
crossrotateobj.document.write(contentcontainer)
crossrotateobj.document.close()
}
else if (ie||dom)
crossrotateobj.innerHTML=contentcontainer
if (currentslide==variableslide.length-1) currentslide=0
else currentslide++
setTimeout("rotateimages()",slidedelay)
}
if (ie||dom)
document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+';
background-color:'+slidebgcolor+'"></div>')
function start_slider(){
crossrotateobj=dom? document.getElementById("slidedom") : ie? document.all.slidedom :
document.slidensmain.document.slidenssub
if (document.layers)
document.slidensmain.visibility="show"
rotateimages()
}
if (ie||dom)
start_slider()
else if (document.layers)
window.onload=start_slider
</script>
<ilayer id="slidensmain" width=&{slidewidth}; height=&{slideheight};
bgColor=&{slidebgcolor}; visibility=hide><layer id="slidenssub" width=&{slidewidth};
left=0 top=0></layer></ilayer>
<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>
Translucend slideshow
<script type="text/javascript">
/***********************************************
* Translucent Slideshow script- Dynamic Drive DHTML code library
(www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
var trans_width='140px' //slideshow width
var trans_height='225px' //slideshow height
var pause=3000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
var degree=10 //animation speed. Greater is faster.
var slideshowcontent=new Array()
//Define slideshow contents: [image URL, OPTIONAL LINK, OPTIONAL LINK TARGET]
slideshowcontent[0]=["photo1.jpg", "http://www.cnn.com", "_new"]
slideshowcontent[1]=["photo2.jpg", "", ""]
slideshowcontent[2]=["photo3.jpg", "http://www.google.com", ""]
////NO need to edit beyond here/////////////
var bgcolor='white'
var imageholder=new Array()
for (i=0;i<slideshowcontent.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideshowcontent[i][0]
}
var ie4=document.all
var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1
if (ie4||dom)
document.write('<div
style="position:relative;width:'+trans_width+';height:'+trans_height+';overflow:hidden"><div
id="canvas0" style="position:absolute;backgroundcolor:'+bgcolor+';width:'+trans_width+';height:'+trans_height+';left:-'+trans_width+';filter:alp
ha(opacity=20);-moz-opacity:0.2;"></div><div id="canvas1"
style="position:absolute;backgroundcolor:'+bgcolor+';width:'+trans_width+';height:'+trans_height+';left:-'+trans_width+';filter:alp
ha(opacity=20);-moz-opacity:0.2;"></div></div>')
else if (document.layers){
document.getElementById("canvas0").style.MozOpacity=document.getElementById("canvas
1").style.MozOpacity=0.2
var temp='setInterval("moveslide()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else if (document.layers){
crossobj.document.write(getslidehtml(slideshowcontent[curindex]))
crossobj.document.close()
}
curindex=(curindex<slideshowcontent.length-1)? curindex+1 : 0
}
function jumptoslide(which){
curindex=which
rotateslide()
}
function resetit(what){
curpos=parseInt(trans_width)*(-1)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.left=curpos+"px"
}
function startit(){
crossobj=ie4? eval("document.all."+curcanvas) : dom? document.getElementById(curcanvas)
: document.tickernsmain.document.tickernssub
if (ie4||dom){
crossobj.innerHTML=getslidehtml(slideshowcontent[curindex])
rotateslide()
}
else{
document.tickernsmain.visibility='show'
curindex++
setInterval("rotateslide()",pause)
}
}
if (window.addEventListener)
window.addEventListener("load", startit, false)
else if (window.attachEvent)
window.attachEvent("onload", startit)
else if (ie4||dom||document.layers)
window.onload=startit
</script>
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://www.dynamicdrive.com">Dynamic
Drive</a></font></p>
PresentaTIONAL slidewshow
<script language="JavaScript1.2">
//Presentational Slideshow Script- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for legal use
var slideshow_width='100px' //SET SLIDESHOW WIDTH (set to largest image's width if
multiple dimensions exist)
var slideshow_height='100px' //SET SLIDESHOW HEIGHT (set to largest image's height if
multiple dimensions exist)
var pause=3000 //SET PAUSE BETWEEN SLIDE (2000=2 seconds)
var slidebgcolor="white"
var dropimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
dropimages[0]="image1.gif"
dropimages[1]="image2.gif"
dropimages[2]="image3.gif"
var droplinks=new Array()
//SET IMAGE URLs. Use "" if you wish particular image to NOT be linked:
droplinks[0]="http://www.yahoo.com"
droplinks[1]=""
droplinks[2]="http://www.google.com"
////NO need to edit beyond here/////////////
var preloadedimages=new Array()
for (p=0;p<dropimages.length;p++){
preloadedimages[p]=new Image()
preloadedimages[p].src=dropimages[p]
}
var ie4=document.all
var dom=document.getElementById
if (ie4||dom)
document.write('<div
style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hid
den"><div id="canvas0"
style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';backgroundcolor:'+slidebgcolor+';left:-'+slideshow_width+'"></div><div id="canvas1"
style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';backgroundcolor:'+slidebgcolor+';left:-'+slideshow_width+'"></div></div>')
else
document.write('<a href="javascript:rotatelink()"><img name="defaultslide"
src="'+dropimages[0]+'" border=0></a>')
var curpos=parseInt(slideshow_width)*(-1)
var degree=10
var curcanvas="canvas0"
var curimageindex=linkindex=0
var nextimageindex=1
function movepic(){
if (curpos<0){
curpos=Math.min(curpos+degree,0)
tempobj.style.left=curpos+"px"
}
else{
clearInterval(dropslide)
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
var slideimage='<img src="'+dropimages[curimageindex]+'" border=0>'
tempobj.innerHTML=(droplinks[curimageindex]!="")? '<a href="'+droplinks[curimageindex]
+'">'+slideimage+'</a>' : slideimage
nextimageindex=(nextimageindex<dropimages.length-1)? nextimageindex+1 : 0
setTimeout("rotateimage()",pause)
}
}
function rotateimage(){
if (ie4||dom){
resetit(curcanvas)
var crossobj=tempobj=ie4? eval("document.all."+curcanvas) :
document.getElementById(curcanvas)
crossobj.style.zIndex++
var temp='setInterval("movepic()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else
document.images.defaultslide.src=dropimages[curimageindex]
linkindex=curimageindex
curimageindex=(curimageindex<dropimages.length-1)? curimageindex+1 : 0
}
function rotatelink(){
if (droplinks[linkindex]!="")
window.location=droplinks[linkindex]
}
function resetit(what){
curpos=parseInt(slideshow_width)*(-1)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.left=curpos+"px"
}
function startit(){
var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.innerHTML='<a href="'+droplinks[curimageindex]+'"><img
src="'+dropimages[curimageindex]+'" border=0></a>'
rotateimage()
}
if (ie4||dom)
window.onload=startit
else
setInterval("rotateimage()",pause)
</script>
<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>
DROP-IN SLIDESHOW
<script language="JavaScript1.2">
//Drop-in slideshow- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
var slideshow_width='140px' //SET SLIDESHOW WIDTH (set to largest image's width if
multiple dimensions exist)
var slideshow_height='225px' //SET SLIDESHOW HEIGHT (set to largest image's height if
multiple dimensions exist)
var pause=3000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
var dropimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
dropimages[0]="photo1.jpg"
dropimages[1]="photo2.jpg"
dropimages[2]="photo3.jpg"
////NO need to edit beyond here/////////////
var preloadedimages=new Array()
for (p=0;p<dropimages.length;p++){
preloadedimages[p]=new Image()
preloadedimages[p].src=dropimages[p]
}
var ie4=document.all
var dom=document.getElementById
if (ie4||dom)
document.write('<div
style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hid
den"><div id="canvas0"
style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:-'+slides
how_height+'"></div><div id="canvas1"
style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:-'+slides
how_height+'"></div></div>')
else
document.write('<img name="defaultslide" src="'+dropimages[0]+'">')
var curpos=parseInt(slideshow_height)*(-1)
var degree=10
var curcanvas="canvas0"
var curimageindex=0
var nextimageindex=1
function movepic(){
if (curpos<0){
curpos=Math.min(curpos+degree,0)
tempobj.style.top=curpos+"px"
}
else{
clearInterval(dropslide)
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
tempobj.innerHTML='<img src="'+dropimages[nextimageindex]+'">'
nextimageindex=(nextimageindex<dropimages.length-1)? nextimageindex+1 : 0
setTimeout("rotateimage()",pause)
}
}
function rotateimage(){
if (ie4||dom){
resetit(curcanvas)
var crossobj=tempobj=ie4? eval("document.all."+curcanvas) :
document.getElementById(curcanvas)
crossobj.style.zIndex++
var temp='setInterval("movepic()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else
document.images.defaultslide.src=dropimages[curimageindex]
curimageindex=(curimageindex<dropimages.length-1)? curimageindex+1 : 0
}
function resetit(what){
curpos=parseInt(slideshow_height)*(-1)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.top=curpos+"px"
}
function startit(){
var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.innerHTML='<img src="'+dropimages[curimageindex]+'">'
rotateimage()
}
if (ie4||dom)
window.onload=startit
else
setInterval("rotateimage()",pause)
</script>
DROPI-IN 2
<script language="JavaScript1.2">
//Drop-in slideshow II (hyperlinked)- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
var slideshow_width='88px' //SET SLIDESHOW WIDTH (set to largest image's width if
multiple dimensions exist)
var slideshow_height='31px' //SET SLIDESHOW HEIGHT (set to largest image's height if
multiple dimensions exist)
var pause=3000 //SET PAUSE BETWEEN SLIDE (2000=2 seconds)
var dropimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
dropimages[0]="button1.gif"
dropimages[1]="button2.gif"
dropimages[2]="button3.gif"
var droplinks=new Array()
//SET IMAGE URLs. Extend or contract array as needed
droplinks[0]="http://www.dynamicdrive.com"
droplinks[1]="http://www.freewarejava.com"
droplinks[2]="http://www.javascriptkit.com"
////NO need to edit beyond here/////////////
var preloadedimages=new Array()
for (p=0;p<dropimages.length;p++){
preloadedimages[p]=new Image()
preloadedimages[p].src=dropimages[p]
}
var ie4=document.all
var dom=document.getElementById
if (ie4||dom)
document.write('<div
style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hid
den"><div id="canvas0"
style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:-'+slides
how_height+'"></div><div id="canvas1"
style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:-'+slides
how_height+'"></div></div>')
else
}
function startit(){
var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.innerHTML='<a href="'+droplinks[curimageindex]+'"><img
src="'+dropimages[curimageindex]+'" border=0></a>'
rotateimage()
}
if (ie4||dom)
window.onload=startit
else
setInterval("rotateimage()",pause)
</script>
<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>
setTimeout("move1(tlayer)",50)
}
else{
tlayer.top=parseInt(scrollerheight)
tlayer.document.write(slideimages[i])
tlayer.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}
function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",pausebetweenimages)
setTimeout("move1(document.main.document.first)",pausebetweenimages)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.top=parseInt(scrollerheight)
tlayer2.document.write(slideimages[i])
tlayer2.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}
function move3(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
tdiv.style.top=0+"px"
setTimeout("move3(tdiv)",pausebetweenimages)
setTimeout("move4(second2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
setTimeout("move3(tdiv)",50)
}
else{
tdiv.style.top=scrollerheight
tdiv.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}
function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
tdiv2.style.top=0+"px"
setTimeout("move4(tdiv2)",pausebetweenimages)
setTimeout("move3(first2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
setTimeout("move4(second2_obj)",50)
}
else{
tdiv2.style.top=scrollerheight
tdiv2.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}
function startscroll(){
if (ie||dom){
first2_obj=ie? first2 : document.getElementById("first2")
second2_obj=ie? second2 : document.getElementById("second2")
move3(first2_obj)
second2_obj.style.top=scrollerheight
second2_obj.style.visibility='visible'
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.top=parseInt(scrollerheight)+5
document.main.document.second.visibility='show'
}
}
window.onload=startscroll
</script>
if (tlayer.left>=tlayer.document.width*-1){
tlayer.left-=5
setTimeout("move1(tlayer)",50)
}
else{
tlayer.left=parseInt(scrollerwidth)+5
tlayer.document.write(slideimages[i])
tlayer.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}
function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.left>0&&tlayer2.left<=5){
tlayer2.left=0
setTimeout("move2(tlayer2)",pausebetweenimages)
setTimeout("move1(document.main.document.first)",pausebetweenimages)
return
}
if (tlayer2.left>=tlayer2.document.width*-1){
tlayer2.left-=5
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.left=parseInt(scrollerwidth)+5
tlayer2.document.write(slideimages[i])
tlayer2.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}
function move3(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.left)>0&&parseInt(tdiv.style.left)<=5){
tdiv.style.left=0+"px"
setTimeout("move3(tdiv)",pausebetweenimages)
setTimeout("move4(scrollerdiv2)",pausebetweenimages)
return
}
if (parseInt(tdiv.style.left)>=tdiv.offsetWidth*-1){
tdiv.style.left=parseInt(tdiv.style.left)-5+"px"
setTimeout("move3(tdiv)",50)
}
else{
tdiv.style.left=scrollerwidth
tdiv.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}
function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.left)>0&&parseInt(tdiv2.style.left)<=5){
tdiv2.style.left=0+"px"
setTimeout("move4(tdiv2)",pausebetweenimages)
setTimeout("move3(scrollerdiv1)",pausebetweenimages)
return
}
if (parseInt(tdiv2.style.left)>=tdiv2.offsetWidth*-1){
tdiv2.style.left=parseInt(tdiv2.style.left)-5+"px"
setTimeout("move4(scrollerdiv2)",50)
}
else{
tdiv2.style.left=scrollerwidth
tdiv2.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}
function startscroll(){
if (ie||dom){
scrollerdiv1=ie? first2 : document.getElementById("first2")
scrollerdiv2=ie? second2 : document.getElementById("second2")
move3(scrollerdiv1)
scrollerdiv2.style.left=scrollerwidth
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.left=parseInt(scrollerwidth)+5
document.main.document.second.visibility='show'
}
}
window.onload=startscroll
</script>
CONVEYOR SLIDESHOW
<script type="text/javascript">
/***********************************************
* Conveyor belt slideshow script- Dynamic Drive DHTML code library
(www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
//Specify the slider's width (in pixels)
var sliderwidth="300px"
//Specify the slider's height
var sliderheight="150px"
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=3
//configure background color:
slidebgcolor="#EAEAEA"
//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<a href="http://"><img src="dynamicbook1.gif" border=1></a>'
leftrightslide[1]='<a href="http://"><img src="dynamicbook2.gif" border=1></a>'
leftrightslide[2]='<a href="http://"><img src="dynamicbook3.gif" border=1></a>'
leftrightslide[3]='<a href="http://"><img src="dynamicbook4.gif" border=1></a>'
leftrightslide[4]='<a href="http://"><img src="dynamicbook5.gif" border=1></a>'
//Specify gap between each image (use HTML):
var imagegap=" "
//Specify pixels gap between each slideshow rotation (use integer):
var slideshowgap=5
////NO NEED TO EDIT BELOW THIS LINE////////////
var copyspeed=slidespeed
leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:9000px">'+leftrightslide+'</span>')
var actualwidth=''
var cross_slide, ns_slide
function fillup(){
if (iedom){
cross_slide=document.getElementById? document.getElementById("test2") :
document.all.test2
cross_slide2=document.getElementById? document.getElementById("test3") :
document.all.test3
cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
actualwidth=document.all? cross_slide.offsetWidth :
document.getElementById("temp").offsetWidth
cross_slide2.style.left=actualwidth+slideshowgap+"px"
}
else if (document.layers){
ns_slide=document.ns_slidemenu.document.ns_slidemenu2
ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
ns_slide.document.write(leftrightslide)
ns_slide.document.close()
actualwidth=ns_slide.document.width
ns_slide2.left=actualwidth+slideshowgap
ns_slide2.document.write(leftrightslide)
ns_slide2.document.close()
}
lefttime=setInterval("slideleft()",30)
}
window.onload=fillup
function slideleft(){
if (iedom){
if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"
else
cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"
if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"
else
cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+"px"
}
else if (document.layers){
if (ns_slide.left>(actualwidth*(-1)+8))
ns_slide.left-=copyspeed
else
ns_slide.left=ns_slide2.left+actualwidth+slideshowgap
if (ns_slide2.left>(actualwidth*(-1)+8))
ns_slide2.left-=copyspeed
else
ns_slide2.left=ns_slide.left+actualwidth+slideshowgap
}
}
if (iedom||document.layers){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div
style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';backgroundcolor:'+slidebgcolor+'" onMouseover="copyspeed=0"
onMouseout="copyspeed=slidespeed">')
write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')
write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu"
bgColor='+slidebgcolor+'>')
write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0"
onMouseout="copyspeed=slidespeed"></layer>')
write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0"
onMouseout="copyspeed=slidespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</script>
<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://dynamicdrive.com">Dynamic Drive</a></font></p>
BACKGROUND SLIDESHOW
<style>
body{
/*Remove below line to make bgimage NOT fixed*/
background-attachment:fixed;
background-repeat: no-repeat;
/*Use center center in place of 300 200 to center bg image*/
background-position: 300 200;
}
</style>
<script language="JavaScript1.2">
//Background Image Slideshow- Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com
//Specify background images to slide
var bgslides=new Array()
bgslides[0]="bgslide.jpg"
bgslides[1]="bgslide2.jpg"
bgslides[2]="bgslide3.jpg"
//Specify interval between slide (in miliseconds)
var speed=3000
//preload images
var processed=new Array()
for (i=0;i<bgslides.length;i++){
processed[i]=new Image()
processed[i].src=bgslides[i]
}
var inc=-1
function slideback(){
if (inc<bgslides.length-1)
inc++
else
inc=0
document.body.background=processed[inc].src
}
if (document.all||document.getElementById)
window.onload=new Function('setInterval("slideback()",speed)')
</script>
if (ie4||ns6)
var contentobj=document.getElementById? document.getElementById("dynamic3"):
document.all.dynamic3
function generateimage(which){
if (ie4||ns6){
contentobj.innerHTML='<center>Loading image...</center>'
contentobj.innerHTML='<center><img
src="'+which+'"><br><br>'+description[tempobj.options.selectedIndex]+'</center>'
}
else if (document.layers){
document.dynamic1.document.dynamic2.document.write('<center><img
src="'+which+'"><br><br>'+description[tempobj.options.selectedIndex]+'</center>')
document.dynamic1.document.dynamic2.document.close()
}
else
alert('You need NS 4+ or IE 4+ to view the images!')
}
function generatedefault(){
generateimage(tempobj.options[tempobj.options.selectedIndex].value)
}
if (ie4||ns6||document.layers){
if (tempobj.options.selectedIndex!=-1){
if (ns6)
generatedefault()
else
window.onload=generatedefault
}
}
</script>
function ml(id)
{
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x;this.style.top=y;};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop +
document.body.clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function()
{
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : document.body.scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop +
document.body.clientHeight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);
}
ftlObj = ml("divStayTopLeft");
stayTopLeft();
}
JSFX_FloatTopDiv();
</script>
cross_scroll.innerHTML=menucontents
actualwidth=document.all? cross_scroll.offsetWidth :
document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_scroll=document.ns_scrollmenu.document.ns_scrollmenu2
ns_scroll.document.write(menucontents)
ns_scroll.document.close()
actualwidth=ns_scroll.document.width
}
loadedyes=1
}
window.onload=fillup
function moveleft(){
if (loadedyes){
if (iedom&&parseInt(cross_scroll.style.left)>(menuwidth-actualwidth)){
cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed+"px"
}
else if (document.layers&&ns_scroll.left>(menuwidth-actualwidth))
ns_scroll.left-=scrollspeed
}
lefttime=setTimeout("moveleft()",50)
}
function moveright(){
if (loadedyes){
if (iedom&&parseInt(cross_scroll.style.left)<0)
cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed+"px"
else if (document.layers&&ns_scroll.left<0)
ns_scroll.left+=scrollspeed
}
righttime=setTimeout("moveright()",50)
}
if (iedom||document.layers){
with (document){
write('<table border="0" cellspacing="0" cellpadding="2">')
write('<td valign="middle"><a href="#" '+leftdircode+'><img
src="'+goleftimage+'"border=0></a> </td>')
write('<td width="'+menuwidth+'px" valign="top">')
if (iedom){
write('<div
style="position:relative;width:'+menuwidth+'px;height:'+menuheight+'px;overflow:hidden;">'
)
write('<div id="test2" style="position:absolute;left:0;top:0">')
write('</div></div>')
}
else if (document.layers){
</li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</li>
<li><a href="#">Link</a></li>
</ul>
</div>
TRANSLUCENT SCROLLER
<script language="JavaScript1.2">
//Translucent scroller- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
var scroller_width='150px'
var scroller_height='115px'
var bgcolor='#E0EFD1'
var pause=3000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
var scrollercontent=new Array()
//Define scroller contents. Extend or contract array as needed
scrollercontent[0]='Visit our partner site <a
href="http://freewarejava.com">Freewarejava.com </a>for free Java applets!'
scrollercontent[1]='Got JavaScript? <a href="http://www.javascriptkit.com">JavaScript
Kit</a> is the most comprehensive JavaScript site online.'
scrollercontent[2]='Link to Dynamic Drive on your site. Please visit our <a
href="http://www.dynamicdrive.com/link.htm">links page</a>.'
////NO need to edit beyond here/////////////
var ie4=document.all
var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1
if (ie4||dom)
document.write('<div
style="position:relative;width:'+scroller_width+';height:'+scroller_height+';overflow:hidden"
><div id="canvas0" style="position:absolute;backgroundcolor:'+bgcolor+';width:'+scroller_width+';height:'+scroller_height+';top:'+scroller_height+';fi
lter:alpha(opacity=20);-moz-opacity:0.2;"></div><div id="canvas1"
style="position:absolute;backgroundcolor:'+bgcolor+';width:'+scroller_width+';height:'+scroller_height+';top:'+scroller_height+';fi
lter:alpha(opacity=20);-moz-opacity:0.2;"></div></div>')
else if (document.layers){
document.write('<ilayer id=tickernsmain visibility=hide width='+scroller_width+'
height='+scroller_height+' bgColor='+bgcolor+'><layer id=tickernssub
width='+scroller_width+' height='+scroller_height+' left=0
top=0>'+scrollercontent[0]+'</layer></ilayer>')
}
var curpos=scroller_height*(1)
var degree=10
var curcanvas="canvas0"
var curindex=0
var nextindex=1
function moveslide(){
if (curpos>0){
curpos=Math.max(curpos-degree,0)
tempobj.style.top=curpos+"px"
}
else{
clearInterval(dropslide)
if (crossobj.filters)
crossobj.filters.alpha.opacity=100
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=1
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
tempobj.innerHTML=scrollercontent[curindex]
nextindex=(nextindex<scrollercontent.length-1)? nextindex+1 : 0
setTimeout("rotateslide()",pause)
}
}
function rotateslide(){
if (ie4||dom){
resetit(curcanvas)
crossobj=tempobj=ie4? eval("document.all."+curcanvas) :
document.getElementById(curcanvas)
crossobj.style.zIndex++
if (crossobj.filters)
document.all.canvas0.filters.alpha.opacity=document.all.canvas1.filters.alpha.opacity=20
else if (crossobj.style.MozOpacity)
document.getElementById("canvas0").style.MozOpacity=document.getElementById("canvas
1").style.MozOpacity=0.2
var temp='setInterval("moveslide()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else if (document.layers){
crossobj.document.write(scrollercontent[curindex])
crossobj.document.close()
}
curindex=(curindex<scrollercontent.length-1)? curindex+1 : 0
}
function resetit(what){
curpos=parseInt(scroller_height)*(1)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.top=curpos+"px"
}
function startit(){
Forms
<HTML><HEAD>
<TITLE>ASP Web Pro</TITLE>
</HEAD>
<BODY>
<FORM NAME="YourFormName" METHOD="post" ACTION="confirmationpage.asp">
<TABLE>
<TR><TD>Email: </TD>
<TD><INPUT TYPE="text" NAME="Email" SIZE="50"></TD></TR>
<TR><TD>Namel: </TD>
<TD><INPUT TYPE="text" NAME="Name" SIZE="50"></TD></TR>
</TABLE>
<INPUT TYPE="submit" NAME="Submit" VALUE="Submit Form">
</BODY>
</HTML>
<SELECT NAME="Subject">
<OPTION SELECTED>List Item 1</OPTION>
<OPTION>List Item 2</OPTION>
<OPTION>List Item 3</OPTION>
</SELECT>
<BODY>
<table>
<tr><td><% Response.Write objRS("Company") %></td></tr>
<tr><td><% Response.Write objRS("Address") %></td></tr>
<tr><td><% Response.Write objRS("City") %></td></tr>
<tr><td><% Response.Write objRS("State") %></td></tr>
<tr><td><% Response.Write objRS("Zipcode") %></td></tr>
</table>
</BODY>
<%
' Don't forget to close your connection after you display your data.
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
<table>
<% DO WHILE NOT objRS.EOF %>
<tr><td><% Response.Write objRS("Company") %></td></tr>
<tr><td><% Response.Write objRS("Address") %></td></tr>
<tr><td><% Response.Write objRS("City") %></td></tr>
<tr><td><% Response.Write objRS("State") %></td></tr>
<tr><td><% Response.Write objRS("Zipcode") %></td></tr>
<tr><td><hr></td></tr>
<%
objRS.MoveNext
Loop
%>
</table>
</BODY>
<%
' Don't forget to close your connection after you display your data.
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
Sql basic
<%
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DSN=myCONNECTION.dsn"
objConn.Open
DIM mySQL
mySQL = "SELECT * FROM myTABLE"
DIM objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open mySQL, objConn
%>
<HTML>
<HEAD><TITLE></TITLE><HEAD>
<BODY>
Display data from database here.
</BODY>
Php poll
It's a PHP script, so installation is pretty easy.
Copy '*.php', 'poll_data.txt' and 'vote/*' in your good directory.
Change permissions to 'poll_data.txt' for be writing by nobody (chmod a+rw)
Edit 'poll_data.txt', you will have to do some configuration:
$RESULT_FILE_NAME = "poll_data.txt";
// En: Absolute path and name to file contain poll data.
$QUESTION = "How do you like this Script?";
// En: Question Text.
$ANSWER = array("Love it!", "Like it!", "Its okay..", "I dislike it", "I hate it..");
// En: All answer.
$IMG_DIR_URL = "./vote";
// En: URL Directory of poll graphs.
$REVOTE_TIME = 3600;
// En: Time (second) after people can revote, use cookies.
You can edit 'test.php' to change look.
Za DODAJ U FAVORITE
<script language="JavaScript1.2">
POP UP PROZORI
Korak 1: Dodajte ovaj dolje kod u <head> dio vae stranice.
<STYLE TYPE="text/css">
<!-BODY {OVERFLOW:scroll;OVERFLOW-X:hidden}
.DEK {POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200;}
//-->
</STYLE>
Korak 2: Dodajte ovaj dolje kod u <body> dio vae stranice.
<DIV ID="dek" CLASS="dek"></DIV>
<SCRIPT TYPE="text/javascript">
<!-/*
korak-po-korak upute za ne-programere
Posjetite http://www.webmajstor.net
*/
Xoffset=-60; // podesavanje mjesta prozora.
Yoffset= 20; // podesavanje mjesta prozora.
var nav,old,iex=(document.all),yyy=-1000;
if(navigator.appName=="Netscape"){(document.layers)?nav=true:old=true;}
if(!old){
var skn=(nav)?document.dek:dek.style;
if(nav)document.captureEvents(Event.MOUSEMOVE);
document.onmousemove=get_mouse;
}
function popup(msg,bak){
var content="<TABLE WIDTH=150 BORDER=1 BORDERCOLOR=black
CELLPADDING=2 CELLSPACING=0 "+
"BGCOLOR="+bak+"><TD ALIGN=center><FONT COLOR=black
SIZE=2>"+msg+"</FONT></TD></TABLE>";
if(old){alert(msg);return;}
else{yyy=Yoffset;
if(nav){skn.document.write(content);skn.document.close();skn.visibility="visible"}
if(iex){document.all("dek").innerHTML=content;skn.visibility="visible"}
}
}
function get_mouse(e){
var x=(nav)?e.pageX:event.x+document.body.scrollLeft;skn.left=x+Xoffset;
var y=(nav)?e.pageY:event.y+document.body.scrollTop;skn.top=y+yyy;
}
function kill(){
if(!old){yyy=-1000;skn.visibility="hidden";}
}
//-->
</SCRIPT>
Korak 3: I na kraju napiite ovo dole u svaki link koji ce sadrzavati prozorcic. U prvom dijelu
napiite tekst koji ce biti u prozoru a u drugom dijelu napiite boju prozora:
ONMOUSEOVER="popup('Opis linka ovdje','orange')"; ONMOUSEOUT="kill()"
Primjer:
<a href="http://www.agencija027.com" ONMOUSEOVER="popup('Najjeftinija I
najkvalitetnija izrada sajtova.','lightblue')"; ONMOUSEOUT="kill()">Agencija027r</a>
Uzivajte!
}
else{
shake.style.left=parseInt(shake.style.left)-rector
}
if (a<4)
a++
else
a=1
setTimeout("rattleimage()",50)
}
function stoprattle(which){
stopit=1
which.style.left=0
which.style.top=0
}
</script>
Korak 2: Dodajte ovo dolje u <img> tag u sve objekte gdje zelite da se efekt deava:
class="shakeimage" onMouseover="init(this);rattleimage()" onMouseout="stoprattle(this)"
Za primjer:
<img src="slika.gif" class="shakeimage"onMouseover="init(this);rattleimage()"
onMouseout="stoprattle(this)">
skriptarnica (c) 2000 - 2003 :: powered by WEBMAJSTOR - izrada i dizajn web stranica,
programiranje, registracija domena, hosting
Upute
Korak 1: Jednostavno dodajte copy/paste ovaj dole kod odmah iznad </body> taga.
<script>
<!-- Hide from old browsers
// korak-po-korak upute za ne programere.
// Posjetite http://www.agencija027.com
// Sve sto trebate napraviti je da stavite svoj tekst u mjesto mojeg.
// Nemojte zaboraviti da na kraju svake poruke stavite ^
// Ako ne stavite ^ na kraj svih poruka, poruke se nece ponavljati
message
= ""
function scrollText(pos) {
if (message.charAt(pos) != '^') {
txt = txt + message.charAt(pos)
status = txt
pauze = scrollSpeed
}
else {
pauze = lineDelay
txt = ""
if (pos == message.length-1) pos = -1
}
pos++
setTimeout("scrollText('"+pos+"')",pauze)
}
// Unhide -->
scrollText(0)
</script>
TETIVA MENU
Tetiva menu (Sve)
Kategorija: MENU
Opis: Ova odlicna menu scripta za razliku od ostalih menua, kada dodjete sa miom na link u
status baru se pojavi sadrzaj linka, lako za instaliranje.
Demo:
LEBDECI MENI
<div id="point1" STYLE="position:absolute;visibility:visible;">
<!--Please delete this table and insert into your html elements-->
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<a href="http://www.agencija027.com">
<img src="...scripte/images2" width=96 height=60 alt="" border="0">
</a>
</td>
</tr>
<tr>
<td>
<center><a href="marketing.htm">
<font face="Arial" size="2" color="#0000FF">Marketing</font>
</a></center>
</td>
</tr>
<tr>
<td>
<center><a href="nekretnine.htm">
<font face="Arial" size="2" color="#0000FF">Nekretnine</font>
</a></center>
</td>
</tr>
<tr>
<td>
<center><a href="turizam.htm">
<font face="Arial" size="2" color="#0000FF">Turizam</font>
</a></center>
</td>
</tr>
<tr>
<td>
<center><a href="kontakt.htm">
<font face="Arial" size="2" color="#0000FF">Kontakt</font>
</a></center>
</td>
</tr>
</table>
<!--End of the customizable area, please do not delete div the tag -->
</div>
<script LANGUAGE="JavaScript1.2">
/*
Lebdeci menu - Bruce Anderson (http://appletlib.tripod.com)
korak-po-korak upute za ne-programere
Posjetite http://www.skriptarnica.com
*/
var XX=20; // X position of the scrolling objects
var xstep=1;
var delay_time=60;
//Ne mijenjajte nista ispod
var YY=0;
var ch=0;
var oh=0;
var yon=0;
var ns4=document.layers?1:0
var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
if(ie){
YY=document.body.clientHeight;
point1.style.top=YY;
}
else if (ns4){
YY=window.innerHeight;
document.point1.pageY=YY;
document.point1.visibility="hidden";
}
else if (ns6){
YY=window.innerHeight
document.getElementById('point1').style.top=YY
}
function reloc1()
{
if(yon==0){YY=YY-xstep;}
else{YY=YY+xstep;}
if (ie){
ch=document.body.clientHeight;
oh=point1.offsetHeight;
}
else if (ns4){
ch=window.innerHeight;
oh=document.point1.clip.height;
}
else if (ns6){
ch=window.innerHeight
oh=document.getElementById("point1").offsetHeight
}
if(YY<0){yon=1;YY=0;}
if(YY>=(ch-oh)){yon=0;YY=(ch-oh);}
if(ie){
point1.style.left=XX;
point1.style.top=YY+document.body.scrollTop;
}
else if (ns4){
document.point1.pageX=XX;
document.point1.pageY=YY+window.pageYOffset;
}
else if (ns6){
document.getElementById("point1").style.left=XX
document.getElementById("point1").style.top=YY+window.pageYOffset
}
}
function onad()
{
if(ns4)
document.point1.visibility="visible";
loopfunc();
}
function loopfunc()
{
reloc1();
setTimeout('loopfunc()',delay_time);
}
if (ie||ns4||ns6)
window.onload=onad
</script>
VEBMAJSTOR MENU
Kategorija: MENU
Opis: Unutra-van menu ce zadovoljiti i najzahtjevnije webmastere. Izmeu duge liste opcija
koju ova scripta ima jesu i:
Opcija za staticku poziciju menija na stranici.
Podrka da se linkovi mogu podici u novom frame-u ili browseru.
Mogucnost da se prikazu header-i i subheader-i unutar menija.
I na kraju jo i to da radi na svim browserima!
Demo: S vae lijeve...
Upute:
Korak 1: Prvo, "skinite" ova dva file-a "menu.js" i "main.js" i usnimite ih u direktorij vae
stranice.
MENU.JS
if (IE) {document.write('<DIV ID="ssm2" style="visibility:hidden;Position : Absolute ;Left :
0px ;Top : '+YOffset+'px ;Z-Index : 20;width:1px" onmouseover="moveOut()"
onmouseout="moveBack()">')}
if (NS) {document.write('<LAYER visibility="hide" top="'+YOffset+'" name="ssm2"
bgcolor="'+menuBGColor+'" left="0" onmouseover="moveOut()"
onmouseout="moveBack()">')}
tempBar=""
for (i=0;i<barText.length;i++) {
tempBar+=barText.substring(i, i+1)+"<BR>"}
document.write('<table border="0" cellpadding="0" cellspacing="1" width="'+
(menuWidth+16+2)+'" bgcolor="'+menuBGColor+'"><tr><td bgcolor="'+hdrBGColor+'"
WIDTH="'+menuWidth+'"> <font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'"
COLOR="'+hdrFontColor+'"><b>'+menuHeader+'</b></font></td><td align="center"
rowspan="100" width="16" bgcolor="'+barBGColor+'"><p align="center"><font
face="'+barFontFamily+'" Size="'+barFontSize+'"
COLOR="'+barFontColor+'"><B>'+tempBar+'</B></font></p></TD></tr>')
function addItem(text, link, target) {
if (!target) {target=linkTarget}
document.write('<TR><TD BGCOLOR="'+linkBGColor+'"
onmouseover="bgColor=\''+linkOverBGColor+'\'"
onmouseout="bgColor=\''+linkBGColor+'\'"><ILAYER><LAYER
onmouseover="bgColor=\''+linkOverBGColor+'\'"
onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="100%"><FONT
face="'+linkFontFamily+'" Size="'+linkFontSize+'"> <A HREF="'+link+'"
target="'+target+'"
CLASS="ssm2Items">'+text+'</A></FONT></LAYER></ILAYER></TD></TR>')}
function addHdr(text) {
document.write('<tr><td bgcolor="'+hdrBGColor+'" WIDTH="140"> <font
face="'+hdrFontFamily+'" Size="'+hdrFontSize+'"
COLOR="'+hdrFontColor+'"><b>'+text+'</b></font></td></tr>')}
//Only edit the script between HERE
addItem('Naslovnica', 'http://www.webmajstor.net/index.htm', '');
addItem('Naj scripte', 'http://www.webmajstor.net/naj.htm', '');
addItem('Za mia', 'http://www.webmajstor.net/mis.htm', '');
addItem('Menu', 'http://www.webmajstor.net/menu.htm', '');
addItem('Satovi', 'http://www.webmajstor.net/sat.htm', '');
addItem('Counter', 'http://www.webmajstor.net/brojac.htm', '');
addHdr('Ostali linkovi');
addItem('Bug', 'http://www.bug.hr', '_blank');
addItem('Vidi', 'http://www.vidi.hr', '_blank');
addItem('Monitor', 'http://www.monitor.hr', '_blank');
addItem('Hinet', 'http://www.ht.hr', '_blank');
addItem('GrafikaKreimir', 'http://www.grafika-kresimir.hr', '_blank');
// and HERE! No more!
document.write('<tr><td bgcolor="'+hdrBGColor+'"><font size="0"
face="Arial"> </font></td></TR></table>')
if (IE) {document.write('</DIV>')}
if (NS) {document.write('</LAYER>')}
if ((IE||NS) && (menuIsStatic=="yes"&&staticMode)) {makeStatic(staticMode);}
MAIN.JS
function MM_displayStatusMsg(msgStr) {
status=msgStr;
document.MM_returnValue = true;
}
function highlight(x){
document.forms[x].elements[0].focus()
document.forms[x].elements[0].select()
}
function MM_jumpMenu(targ,selObj,restore){
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
var NS
IE=document.all;
NS=document.layers;
hdrFontFamily="Verdana, Arial, Helevetica";
hdrFontSize="2";
hdrFontColor="white";
hdrBGColor="#FF9900";
linkFontFamily="Verdana, Arial, Helevetica";
linkFontSize="2";
linkBGColor="white";
linkOverBGColor="#CCCCCC";
linkTarget="_top";
YOffset=60;
staticYOffset=20;
menuBGColor="black";
menuIsStatic="no";
menuHeader="Glavni linkovi"
menuWidth=150; // Must be a multiple of 5!
staticMode="advanced"
barBGColor="#1298fd";
barFontFamily="Verdana";
barFontSize="2";
barFontColor="white";
barText="MENU";
function moveOut() {
if (window.cancel) {
cancel="";
}
if (window.moving2) {
clearTimeout(moving2);
moving2="";
}
if ((IE && ssm2.style.pixelLeft<0)||(NS && document.ssm2.left<0)) {
if (IE) {ssm2.style.pixelLeft += (5%menuWidth);
}
if (NS) {
document.ssm2.left += (5%menuWidth);
}
moving1 = setTimeout('moveOut()', 5)
}
else {
clearTimeout(moving1)
}
};
function moveBack() {
cancel = moveBack1()
}
function moveBack1() {
if (window.moving1) {
clearTimeout(moving1)
}
if ((IE && ssm2.style.pixelLeft>(-menuWidth))||(NS && document.ssm2.left>(-150))) {
if (IE) {ssm2.style.pixelLeft -= (5%menuWidth);
}
if (NS) {
document.ssm2.left -= (5%menuWidth);
}
moving2 = setTimeout('moveBack1()', 5)}
else {
clearTimeout(moving2)
}
};
lastY = 0;
function makeStatic(mode) {
if (IE) {winY = document.body.scrollTop;var NM=ssm2.style
}
if (NS) {winY = window.pageYOffset;var NM=document.ssm2
}
if (mode=="smooth") {
if ((IE||NS) && winY!=lastY) {
smooth = .2 * (winY - lastY);
if(smooth > 0) smooth = Math.ceil(smooth);
else smooth = Math.floor(smooth);
if (IE) NM.pixelTop+=smooth;
if (NS) NM.top+=smooth;
lastY = lastY+smooth;
}
setTimeout('makeStatic("smooth")', 1)
}
else if (mode=="advanced") {
if ((IE||NS) && winY>YOffset-staticYOffset) {
if (IE) {NM.pixelTop=winY+staticYOffset
}
if (NS) {NM.top=winY+staticYOffset
}
}
else {
if (IE) {NM.pixelTop=YOffset
}
if (NS) {NM.top=YOffset-7
}
}
setTimeout('makeStatic("advanced")', 1)
}
}
function init() {
if (IE) {
ssm2.style.pixelLeft = -menuWidth;
ssm2.style.visibility = "visible"
}
else if (NS) {
document.ssm2.left = -menuWidth;
document.ssm2.visibility = "show"
}
else {
alert('Choose either the "smooth" or "advanced" static modes!')
}
}
function MM_displayStatusMsg(msgStr) {
status=msgStr;
document.MM_returnValue = true;
}
Korak 2: Copy zatim paste ovaj dolje kod u <head> dio vae stranice.
<style>
<!-/*
Maximus' Slide-In Menu (By Maximus at http://absolutegb.com/maximus/)
Posjetite http://www.skriptarnica.net
*/
#ssm2 A {
color:black;
text-decoration:none;
font-size:12;
font-family:verdana;
}
#ssm2 A:hover {
color:red;
}
-->
</style>
<script language="javascript1.2" src="main.js"></script>
Korak 3: Dodajte ovaj dolje kod u <body> dio vae stranice odmah prateci <body> tag.
<script language="javascript1.2" src="menu.js"></script>
Korak 4: Jo malo. I na kraju upiite ovo dolje (crveno) u sam <body> tag kao to je i
prikazano:
<body onLoad="init()">
Sve to zelite promijeniti nalazi se u u "main.js" i "menu.js" file-u koji mozete konfigurirati
uz pomoc bilo kojeg tekstualnog editora (ie: Notepad).
Upute:
Korak 1: Dodajte ovaj dolje kod u <head> dio vae stranice.
<script language="JavaScript1.2">
/*
Static menu script (By maXimus, maximus@nsimail.com, http://absolutegb.com/maximus/)
Prilogodba: http://www.skriptarnica.com
*/
function move(x) {
if (document.all) {
object1.style.pixelLeft += x;
object1.style.visibility = "visible"}
else if (document.layers) {
document.object1.left += x;
document.object1.visibility = "show"}};
function makeStatic() {
if (document.all) {object1.style.pixelTop=document.body.scrollTop+20}
else {eval(document.object1.top=eval(window.pageYOffset+20));}
setTimeout("makeStatic()",0);}
</script>
<style>
<!-.hl
{
Background-Color : silver;
Cursor:hand;
.n
}
{
Cursor:hand;
}
-->
</style>
Korak 2: Dodajte ovaj dolje kod u <body> dio vae stranice izvan svih tagova
<LAYER visibility="hide" top="20" name="object1" bgcolor="black" left="0"
onmouseover="move(132)" onmouseout="move(-132)">
<script language="JavaScript1.2">
function positionmenu(){
move(-132)
}
if (document.all) {document.write('<DIV ID="object1" style="visibility:hidden;cursor:hand;
Position : Absolute ;Left : 0px ;Top : 20px ;Z-Index : 20" onmouseover="move(132)"
onmouseout="move(-132)">')}
</script>
<table border="0" cellpadding="0" cellspacing="1" width="150" bgcolor="#000000">
<tr><td bgcolor="#0099FF"> <font size="4" face="Verdana, Arial,
Helevetica"><b>Menu</b></font></td>
<script language="JavaScript1.2">
document.write('<td align="center" rowspan="100" width="16" bgcolor="#FF6666"><span
style="font-size:13px"><p align="center"><font face="Arial
Black">S<br>I<br>D<br>E<br>M<br>E<br>N<BR>U</font></p></span></TD>')
</script>
</tr>
<script language="JavaScript1.2"><!-if (document.all||document.layers) {
makeStatic();}
var text=new Array();
var thelink=new Array();
//Ovdje promijenite linkove. Koliko god...
text[0]="Naslovna";
text[1]="Marketing";
text[2]="Modeli";
text[3]="Nekretnine";
text[4]="Chat";
text[5]="Forum";
text[6]="Slike";
text[7]="Oglasi";
thelink[0]="index.htm";
thelink[1]="marketing.htm";
thelink[2]="modeli.htm";
thelink[3]="nekretnine.htm";
thelink[4]="chat.htm";
thelink[5]="forum.htm";
thelink[6]="slike.htm";
thelink[7]="oglasi.htm";
//enter target of above links
//Valid values are '', 'new', or 'framename' (where 'framename' is the name of the frame you
wish the links to target)
var linktarget=''
///NE MIJENJAJTE NISTA ISPOD OVE LINIJE////////////////
function navigateie(which){
if (linktarget=='')
window.location=thelink[which]
else if (linktarget=='new')
window.open(thelink[which])
else{
temp_var=eval("window.parent."+linktarget)
temp_var.location=thelink[which]
}
}
for (i=0;i<=text.length-1;i++)
if (document.all) {document.write('<TR><TD height=20 bgcolor=white
onclick="navigateie('+i+')" onmouseover="className=\'hl\'"
onmouseout="className=\'n\'"><FONT SIZE=2 FACE=ARIAL> '+text[i]
+'</FONT></TD></TR>')}
else {document.write('<TR><TD bgcolor="white"><ILAYER><LAYER HEIGHT="18"
onmouseover="this.bgColor=\'yellow\'" onmouseout="this.bgColor=\'white\'"
width=131><FONT SIZE=2 FACE=ARIAL> <A HREF="'+thelink[i]+'"
target="'+linktarget+'" id="nounderline">'+text[i]
+'</A></FONT></LAYER></ILAYER></TD></TR>')}
//-->
</script>
<tr>
<td bgcolor="#0099FF"><font size="1" face="Arial"> </font></td>
</TR>
</table>
<script language="JavaScript1.2">
if (document.all) {document.write('</DIV>')}
window.onload=positionmenu
</script>
</LAYER>
Promijenite linkove unutar koda u drugom koraku kao i sve ostalo.
VOJNI SAT
<script language="JavaScript">
<!-f1Col='ccccc0';//boja glave.
f2Col='ccccc0';//boja glave.
d1Col='ff0000';//boja tocki.
d2Col='ff0000';//boja tocki.
hCol='00ff00';//boja sati.
mCol='00ff00';//boja minuta.
sCol='00ff00';//boja sekundi.
ClockHeight=50;
ClockWidth=50;
//NE MIJENJAJTE NITA ISPOD!
h=10;
m=7;
s=7;
face24='06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 01 02 03 04 05';
face24=face24.split(' ');
n1=face24.length;
face12='15 20 25 30 35 40 45 50 55 0 5 10';
face12=face12.split(' ');
n2=face12.length;
p="<font face=Arial size=1 color=#"+f1Col+">";
p2="<font face=Arial size=1 color=#"+f2Col+">";
e=360/n1;
e2=360/n2
e3=360/60
HandHeight=ClockHeight/6;
HandWidth=ClockWidth/6;
y=0;
x=0;
ns6=(document.getElementById&&!document.all);
ns=(document.layers);
ie=(document.all);
if (ns){
for (i=0; i < n1; i++)
document.write('<layer name="nshour24'+i+'" top=0 left=0 height=15
width=15><center>'+p+face24[i]+'</font></center></layer>');
for (i=0; i < n1; i++)
if (ns){
y=window.pageYOffset+window.innerHeight-ClockHeight*2;
x=window.pageXOffset+window.innerWidth-ClockWidth*2.3;
}
if (ns6){
y=window.pageYOffset+window.innerHeight-ClockHeight*2.1;
x=window.pageXOffset+window.innerWidth-ClockWidth*2.2;
}
if (ie){
y=document.body.scrollTop+window.document.body.clientHeight-ClockHeight*2;
x=document.body.scrollLeft+window.document.body.clientWidth-ClockWidth*2;
}
setTimeout('Scroll()',50);
}
Scroll();
function ClockAndAssign(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.57 + Math.PI * hr/12 + Math.PI*parseInt(time.getMinutes())/720;
for (i=0; i < s; i++){
var cs=(ns)?document.layers['nsS'+i]:(ie)?
document.all['ieS'+i].style:document.getElementById("ieS"+i).style;
cs.top=y+(i*HandHeight)*Math.sin(sec);
cs.left=x+(i*HandWidth)*Math.cos(sec);
}
for (i=0; i < m; i++){
var cm=(ns)?document.layers['nsM'+i]:(ie)?
document.all['ieM'+i].style:document.getElementById("ieM"+i).style;
cm.top=y+(i*HandHeight)*Math.sin(min);
cm.left=x+(i*HandWidth)*Math.cos(min);
}
for (i=0; i < h; i++){
var ch=(ns)?document.layers['nsH'+i]:(ie)?
document.all['ieH'+i].style:document.getElementById("ieH"+i).style;
ch.top=y+(i*HandHeight)*Math.sin(hrs);
ch.left=x+(i*HandWidth)*Math.cos(hrs);
}
for (i=0; i < 12; i++){
var d2=(ns)?document.layers['nsdots2'+i]:(ie)?
document.all['dots2'+i].style:document.getElementById("dots2"+i).style;
d2.top=y + ClockHeight*Math.sin(-1.0471 + i*e2*Math.PI/180);
d2.left=x + ClockWidth*Math.cos(-1.0471 + i*e2*Math.PI/180);
}
for (i=0; i < n2; i++){
var h12=(ns)?document.layers['nshour12'+i]:(ie)?
document.all['hour12'+i].style:document.getElementById("hour12"+i).style;
h12.top=y-6 + ClockHeight*1.2*Math.sin(i*e2*Math.PI/180);
h12.left=x-6 + ClockWidth*1.2*Math.cos(i*e2*Math.PI/180);
}
for (i=0; i < n1; i++){
var d1=(ns)?document.layers['nsdots1'+i]:(ie)?
document.all['dots1'+i].style:document.getElementById("dots1"+i).style;
d1.top=y + ClockHeight*1.5*Math.sin(-1.0471 + i*e*Math.PI/180);
d1.left=x + ClockWidth*1.5*Math.cos(-1.0471 + i*e*Math.PI/180);
}
for (i=0; i < n1; i++){
var h24=(ns)?document.layers['nshour24'+i]:(ie)?
document.all['hour24'+i].style:document.getElementById("hour24"+i).style;
h24.top=y-6 + ClockHeight*1.7*Math.sin(i*e*Math.PI/180);
h24.left=x-6 + ClockWidth*1.7*Math.cos(i*e*Math.PI/180);
}
setTimeout('ClockAndAssign()',500);
}
ClockAndAssign();
//-->
</script>
POZDRAVNA PORUKA
<SCRIPT LANGUAGE="JavaScript">
<!-- Pocetak
day = new Date()
hr = day.getHours()
if ((hr == 0)||(hr == 1)||(hr == 2)||(hr == 3)||(hr == 4)||(hr == 5))
document.write("Laku noc.")
if ((hr == 6)||(hr == 7)||(hr == 8)||(hr == 9)||(hr == 10)||(hr == 11))
document.write("Dobro jutro.")
if ((hr == 12)||(hr == 13)||(hr == 14)||(hr == 15)||(hr == 16)||(hr == 17))
document.write("Dobar dan.")
if ((hr == 18)||(hr == 19)||(hr == 20)||(hr == 21)||(hr == 22)||(hr == 23))
document.write("Dobra vece.")
//www.agencija027.com
// Kraj -->
</SCRIPT>
Roendan (Sve)
Kategorija: SEZONA
Opis: Scripta koja moze reci vaim posjetiocima koliko imaju jo roendana.
Demo:
Rodjendan
Odaberite datum vaeg slijedeceg rodjendana i kliknite 'koliko jo'. Odbrojavanje cete vidjeti
u status baru.
Korak 1: Dodajte ovaj dolje kod u <head> dio vae stranice
<script>
var futuredate
var nowdate
var resulthoursraw
var resulthours
var resultminutesraw
var resultminutes
var resultsecondsraw
var resultseconds
var content
function setfuturedate() {
var futureyear=document.future.ye.options[document.future.ye.selectedIndex].value
var
futuremonth=document.future.mo.options[document.future.mo.selectedIndex].value
var futureday=document.future.da.options[document.future.da.selectedIndex].value
futuredate=new Date(futureyear,futuremonth,futureday,0,0,0)
docountdown()
}
function docountdown() {
caclulateresults()
formatresults()
displayresults()
setTimeout("docountdown()",1000)
}
function caclulateresults() {
nowdate=new Date()
resultdaysraw=(Date.parse(futuredate)-Date.parse(nowdate))/1000/60/60/24
resultdays=Math.floor((Date.parse(futuredate)-Date.parse(nowdate))/1000/60/60/24)
resulthoursraw=(resultdaysraw-resultdays)*24
resulthours=Math.floor((resultdaysraw-resultdays)*24)
resultminutesraw=(resulthoursraw-resulthours)*60
resultminutes=Math.floor((resulthoursraw-resulthours)*60)
resultsecondsraw=(resultminutesraw-resultminutes)*60
resultseconds=Math.floor((resultminutesraw-resultminutes)*60)
}
function formatresults() {
content="Morate cekati "+resultdays+" dana i "+resulthours+" sati i "+resultminutes
+" minuta i "+resultseconds +" sekundi do vaseg rodjendana."
}
function displayresults() {
if (document.all) {
window.status=content
//korak-po-korak upute za ne programere
//posjetite www.skriptarnica.com
}
if (document.layers) {
window.status=content
}
}
</script>
<form name="future">
<font size=2 face=Verdana><b>Rodjendan</b><br>
Odaberite datum vaeg slijedeceg rodjendana i kliknite 'koliko jo'. Odbrojavanje cete vidjeti
u status baru. <br><br>
<select name="ye" style="font-size:8pt">
<option>godina</option>
<option value="2010">2010</option>
<option value="2009">2009</option>
<option value="2008">2008</option>
<option value="2007">2007</option>
</select>
<select name="mo" style="font-size:8pt">
<option>mjesec</option>
<option value="0">Januar</option>
<option value="1">Februar</option>
<option value="2">Mart</option>
<option value="3">April</option>
<option value="4">Maj</option>
<option value="5">Jun</option>
<option value="6">Jul</option>
<option value="7">Avgust</option>
<option value="8">Septembar</option>
<option value="9">Oktobar</option>
<option value="10">Novembar</option>
<option value="11">Decembar</option>
</select>
<select name="da" style="font-size:8pt">
<option>dan</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<input type="button" onClick="setfuturedate()" value="Koliko jo" style="fontsize:8pt"></form>
I koliko jo...? :)
<script language="JavaScript1.2">
<!-/*
Leteci KupidPosjetite http://www.skriptarnica.com
*/
Cupid=new Image();
Cupid.src="kupid.gif"; //napiite src. slike
amount=3; //Broj kupida, minimum 3.
Xpos=700; //kupid x koordinate, u pixelima
Ypos=200; //kupid y koordinate, u pixelima
step=0.3; //Brzina animacije (manje je sporije)
dismissafter=10; //sekunde nakon koliko kupid nestane, u sekundama
var ns6=document.getElementById&&!document.all
bats=new Array(3)
if (document.layers){
for (i=0; i < amount; i++)
{document.write("<LAYER NAME=n"+i+" LEFT=0 TOP=-50><a
href='http://webmajstor.terrashare.com'><IMG SRC='"+Cupid.src+"' NAME='nsi' width=69
height=60 border=0></a></LAYER>")}
}
else if (document.all||ns6){
document.write('<div id="out" style="position:absolute;top:0;left:0"><div id="in"
style="position:relative">');
for (i=0; i < amount; i++){
if (document.all)
document.write('<a href="http://webmajstor.terrashare.com"><img src="'+Cupid.src+'"
id="msieBats" style="position:absolute;top:-50;left:0" border=0></a>')
else
document.write('<a href="http://webmajstor.terrashare.com"><img src="'+Cupid.src+'"
id="ns6Bats'+i+'" width=69 height=60 style="position:absolute;top:-50;left:0"
border=0></a>')
}
document.write('</div></div>');
}
yBase=xBase=currStep=a_count=0;
b_count=1;
c_count=2;
d_count=3;
move=1;
if (document.layers||ns6){
yBase=window.innerHeight/3;
xBase=window.innerWidth/6;
if (document.layers)
window.captureEvents(Event.MOUSEMOVE);
}
if (document.all){
yBase = window.document.body.offsetHeight/3;
xBase = window.document.body.offsetWidth/6;
}
function dismisscupid(){
clearInterval(flycupid)
if (document.layers){
for (i2=0; i2 < amount; i2++){
document.layers['n'+i2].visibility="hide"
}
}
else if (document.all)
document.all.out.style.visibility="hidden"
else if (ns6)
document.getElementById("out").style.visibility="hidden"
}
if (document.layers){
for (i=0; i < amount; i++)
document.layers['n'+i].document.images['nsi'].src=Cupid.src
}
else if (document.all){
for (i=0; i < amount; i++)
document.all.msieBats[i].src=Cupid.src
}
else if (ns6){
for (i=0; i < amount; i++)
document.getElementById("ns6Bats"+i).src=Cupid.src
}
function Animate(){
a_count+=move;
b_count+=move;
c_count+=move;
currStep+=step;
if (a_count >= bats.length) a_count=0;
if (b_count >= bats.length) b_count=0;
if (c_count >= bats.length) c_count=0;
if (document.layers){
for (i=0; i < amount; i++) {
var NewL="n"+i
document.layers[NewL].top = Ypos+yBase*Math.sin(((currStep)
+i*3.7)/4)*Math.cos((currStep+i*35)/10)
document.layers[NewL].left =Xpos+xBase*Math.cos(((currStep)
+i*3.7)/4)*Math.cos((currStep+i*35)/62)
}
}
if (document.all){
for (i=0; i < amount; i++){
document.all.msieBats[i].style.pixelTop = Ypos+yBase*Math.sin(((currStep)
+i*3.7)/4)*Math.cos((currStep+i*35)/10)
document.all.msieBats[i].style.pixelLeft =Xpos+xBase*Math.cos(((currStep)
+i*3.7)/4)*Math.cos((currStep+i*35)/62)
}
}
if (ns6){
for (i=0; i < amount; i++){
document.getElementById("ns6Bats"+i).style.top = Ypos+yBase*Math.sin(((currStep)
+i*3.7)/4)*Math.cos((currStep+i*35)/10)
document.getElementById("ns6Bats"+i).style.left =Xpos+xBase*Math.cos(((currStep)
+i*3.7)/4)*Math.cos((currStep+i*35)/62)
}
}
}
flycupid=setInterval('Animate()',30);
setTimeout("dismisscupid()",dismissafter*1000)
//-->
</script>
Opis: Ako zelite zatititi tekst na vaim stranicama onda bez razmiljanja dodajte ovu scriptu.
Demo: Pokuajte kopirati bilo koji tekst na ovoj stranici :) a sada pokuajte kopirat ovaj dolje
kod :))
Upute
Dodajte ovaj kod u <body> dio vae stranice.
<script language="JavaScript">
//Posjetite www.agencija027.com
<!-document.onselectstart= function() {return false}
// -->
</script>
/*
korak-po-korak upute za ne-programere
Posjetite http://www.agencija027.com
*/
var clickmessage="Zabranjeno kopiranje slika!"
function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
}
function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}
if (document.all)
document.onmousedown=disableclick
else if (document.layers)
associateimages()
</script>
<script language="JavaScript">
// Posjetite www.skriptarnica.com
<!-document.oncontextmenu= function() {return false}
document.onmousedown= function() {return false}
// -->
</script>
Opis: Scripta koju mozete vrlo cesto vidjeti na Internetu. Kada posjetilac dodje na vae
stranice automatski se otvori pop-up prozor.
Demo: Vjerojatno ste ga ugasili :)
Upute
Korak1: Dodajte ovaj dolje kod u <head> dio vae stranice.
<SCRIPT>
//Posjetite : http://www.skriptarnica.com
var win=true;
function wm()
{
if (win)
window.open('http://www.skriptarnica.com/imeprozora.htm','wm','width=468,height=60,resiz
able=no');
}
</SCRIPT>
Korak2: Ako zelite da Vam se prozor pojavljuje na ulasku u stranicu upiite u sam <body> tag
kao to je prikazano.
<BODY onload=wm()>
Korak3: Ako zelite da Vam se prozor pojavljuje na izlasku iz stranice upiite u sam <body>
tag kao to je prikazano.
<BODY onunload=wm()>
Preporuka (Sve)
Kategorija: SYSTEM
Opis: Neka vai posjetitelji preporuce svojim prijateljima vau stranicu (putem emaila) sa
ovom scriptom! Pitajuci za prijateljev e-mail, zatim loadira email program sa vec gotovom
porukom koja je odmah spremna za slanje.
Demo:
Preporuci ovaj site prijatelju:
Upute
Korak 1: Dodajte ovaj dolje kod u <body> dio vae stranice gdje zelite da vam se scripta
pojavi
<SCRIPT LANGUAGE="JavaScript">
<!-- Pocni
//Posjetite http://www.skriptarnica.com
var initialsubj="Hey prijatelju, pogledaj ovo"
var initialmsg="Hey:\n Pogledaj ovaj site: "+window.location
var good;
function checkEmailAddress(field) {
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|
(\.info)|(\.sex)|(\.biz)|(\.aero)|(\.coop)|(\.museum)|(\.name)|(\.pro)|(\..{2,2}))$)\b/gi);
if (goodEmail) {
good = true;
}
else {
alert(milantoplica@gmail.com');
field.focus();
field.select();
good = false;
}
}
u = window.location;
function mailThisUrl() {
good = false
checkEmailAddress(document.eMailer.email);
if (good) {
//window.location = "mailto:"+document.eMailer.email.value+"?
subject="+initialsubj+"&body="+document.title+" "+u;
window.location = "mailto:"+document.eMailer.email.value+"?
subject="+initialsubj+"&body="+initialmsg
}
}
// End -->
</script>
<form name="eMailer">
Preporuci ovaj site prijatelju:
<input type="text" name="email" size="26" value=" Upiite email adresu ovdje"
onFocus="this.value=''" onMouseOver="window.status='Upiite email adresu ovdje i
preporucite site prijatelju...'; return true" onMouseOut="window.status='';return true">
<br>
<input type="button" value="Poalji" onMouseOver="window.status='Kliknite da bi poslali
email (sa adresom sitea) prijatelju! Upiite iznad email'; return true"
onMouseOut="window.status='';return true" onClick="mailThisUrl();">
</form>
Preporuka2 (Sve)
Kategorija: SYSTEM
Opis: Neka vai posjetitelji preporuce svojim prijateljima vau stranicu (putem emaila) sa
ovom scriptom! Za razliku od prve scripte u ovoj scripti vai posjetitelji mogu napisati subject
i tekst po zelji. Lako za instaliranje.
Demo:
Sviaju Vam se nae stranice...
Zelite javiti vaim prijateljima o nama? Prima email:
Subject:
Text:
Upute:
Korak1: Dodajte ovaj kod u <head> dio vae stranice.
<script language="Javascript">
function sem(form){
var okem=form.st.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..
{2,2}))$)\b/gi);
if (okem){
window.location = "mailto:"+form.st.value+"?
subject="+form.sb.value+"&body="+form.ta.value;
}
else{
alert("Upiite ispravnu email adresu.");
form.st.focus();
form.st.select();
}
}
</script>
Upute:
Korak 1: Dodajte ovaj dolje kod u <body> dio vae stranice
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide from JavaScript-Impaired Browsers
/* Prvo, Ako imate manje ili vise od 6 sponzora u vasem
rotatoru promijenite dolje broj. */
number_of_sponsors=6;
var sctr=0;
var halt=0;
var isn=new Array();
for (i=0;i<number_of_sponsors;i++){
isn[i]=new Image();
}
/* Ovdje napisati adrese gif.-ova po rednom broju. */
isn[0].src="http://www.tvojurl/ime.gif";
isn[1].src="http://www.tvojurl/ime.gif";
isn[2].src="http://www.tvojurl/ime.gif";
isn[3].src="http://www.tvojurl/ime.gif";
isn[4].src="http://www.tvojurl/ime.gif";
isn[5].src="http://www.tvojurl/ime.gif";
/* Ovdje zamijenite adrese linkova po rednom broju. */
var durl=new Array();
durl[0]="http://www.webmajstor.net/";
durl[1]="http://www.bug.hr";
durl[2]="http://www.vidi.hr";
durl[3]="http://www.croadria.com";
durl[4]="http://www.grafika-kresimir.f2s.com";
durl[5]="http://www.pcchip.hr/";
/* Ova scripta je podesena da mijenja bannere svakih 10 sekundi.
(5000=5 sekundi, dakle 30000 bi bilo 30 sek.)
Promijeni vrijeme pod "seTimeut" dolje. */
function rotateIt(){
if (halt!=1){
sctr++;
if (sctr>number_of_sponsors-1){
sctr=0;
}
document.sponsor.src=isn[sctr].src;
setTimeout("rotateIt()",5000);
}
}
/* Ovaj kod ce raditi ako imate ili nemate frameove.
Ali ako zelite da promijenite target jednostavno promijenite:
location.href call u:
parent.location.href=durl[sctr];
ovdje dolje. */
function doIt(){
halt=1;
parent.location.href=durl[sctr];
}
function dispIt(){
parent.window.status=durl[sctr];
}
// End Hiding -->
</SCRIPT><center><table BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<tr>
<td><a href="index.htm" onClick="doIt();return false" onMouseover="dispIt();return true;"
target="_blank"><img SRC="http://nekoime.gif" NAME="sponsor" BORDER=0 height=31
width=88></a></td>
</tr>
</table></center>
<!-- webmajstor.net -->
Korak 2: Ovaj kod dodajte na sam kraj stranice odmah iza </body> taga.
<!-- webmajstor.net -->
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide JavaScript from Java-Impaired Browsers
sctr=0;
rotateIt();
// End Hiding -->
</SCRIPT>
<!-- webmajstor.net -->
Opis: Sa ovom scriptom mozete napisati tekst u status baru vaeg browsera. Mozete dodati
bilo koji tekst, samo morate paziti da nije previe dugacak, jer se nece cijeli prikazati.
Demo: Pogledajte va status bar (dolje lijevo)
Upute
Korak 1: Dodajte ovaj dolje kod u <head> dio vae stranice
<script language="JavaScript1.2">
/*
korak-po-korak upute za ne programere
www.skriptarnica.com
*/
timeID = 5;
stcnt = 11;
msg = "<< VA TEKST >>";
wmsg = new Array(33);
wmsg[0]=msg;
blnk = "
";
for (i=1; i<32; i++)
{
b = blnk.substring(0,i);
wmsg[i]="";
for (j=0; j<msg.length; j++) wmsg[i]=wmsg[i]+msg.charAt(j)+b;
}
function wiper()
{
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = str;
clearTimeout(timeID);
timeID = setTimeout("wiper()",100);
}
//-->
</script>
Na vrh (Sve)
Kategorija: SYSTEM
Opis: Za stranice koje su malo duze od ostalih, ova scripta omogucuje brzi nacin povratka na
vrh stranice.
Demo: Pogledajte u donji desni kut vaeg browsera...
Upute:
Korak 1: Usnimite ovaj dole file u direktorij vae stranice:
jumptop.js
Korak 2: Dodajte ovaj dole kod u <body> dio vae stranice i u svaku stranicu gdje zelite da se
efekt pojavi.
<script src="http://www.ime.com/jumptop.js">
//Na vrh
//korak-po-korak upute za ne programere
//Posjetite http://www.skriptarnica.com
</script>
Upute:
Dodajte ovaj dolje kod u <body> dio vae stranice gdje zelite da vam se scripta pojavi.
<script language=JavaScript>
function somequotes(){
//korak-po-korak upute za ne programere
//www.webmajstor.net
var quotes=new Array()
quotes[0]='Cak i <img src="../banneri/wm1.gif" border=0 alt="Prikazuje i bannere">
prikazuje slucajne bannere'
quotes[1]='Zahvaljujem na posjeti'
quotes[2]='Jeli ovo dobra scripta ili ne?'
quotes[3]='Zivio webmajstor!!! :)'
quotes[4]='Ne radite nedjeljom.'
quotes[5]='Mislite na buducnost.'
quotes[6]='Dobrodoli'
quotes[7]='<a href="http://www.webmajstor.net" target="_blank">www.webmajstor.net</a>'
var whichquote=Math.floor(Math.random()*(quotes.length));
var fontstylestart='<font face="Tahoma,Verdana,Arial,Helvetica" size="2"
color="#FF6600"><b><span style="letter-spacing: 1">';
var fontstyleend='</span></b></font>'
document.write(fontstylestart+quotes[whichquote]+fontstyleend)
}
somequotes();
</script>
Loptanje (Sve)
Kategorija: OSTALO
Opis: Zanimljiva scripta kojoj i samo ime govori sve. Lopta koja se odbija od rubova vaeg
browsera...
Demo:
Upute:
Korak 1: Snimite loptu u direktorij vae stranice ili ako zelite upotrijebiti vlastitu sliku ili
objekt preskocite ovaj dio.
<script language="JavaScript">
<!-- hide script from old browsers
/*
korak-po-korak upute za ne-programere
Posjetite http://www.webmajstor.net
*/
//Podesite brzinu(od 1 do 50, vece je brze)
var ballWidth = 40;
var ballHeight = 40;
var BallSpeed = 11;
var maxBallSpeed = 50;
var xMax;
var yMax;
var xPos = 0;
var yPos = 0;
var xDir = 'right';
var yDir = 'down';
var superballRunning = true;
var tempBallSpeed;
var currentBallSrc;
var newXDir;
var newYDir;
function initializeBall() {
if (document.all) {
xMax = document.body.clientWidth
yMax = document.body.clientHeight
document.all("superball").style.visibility = "visible";
}
else if (document.layers) {
xMax = window.innerWidth;
yMax = window.innerHeight;
document.layers["superball"].visibility = "show";
}
setTimeout('moveBall()',400);
}
function moveBall() {
if (superballRunning == true) {
calculatePosition();
if (document.all) {
document.all("superball").style.left = xPos + document.body.scrollLeft;
document.all("superball").style.top = yPos + document.body.scrollTop;
}
else if (document.layers) {
document.layers["superball"].left = xPos + pageXOffset;
document.layers["superball"].top = yPos + pageYOffset;
}
setTimeout('moveBall()',30);
}
}
function calculatePosition() {
if (xDir == "right") {
if (xPos > (xMax - ballWidth - BallSpeed)) {
xDir = "left";
}
}
else if (xDir == "left") {
if (xPos < (0 + BallSpeed)) {
xDir = "right";
}
}
if (yDir == "down") {
if (yPos > (yMax - ballHeight - BallSpeed)) {
yDir = "up";
}
}
else if (yDir == "up") {
Korak 3: Dodajte ovaj dolje kod u <body> dio vae stranice, IZVAN svih tagova. Ovaj dio
scripte sadrzi original HTLM kod da prikazuje loptu.
Mijenjanje scripte:
Ako zelite loptu zamijeniti nekim vlastitim objektom. Morate promijenti img src u trecem
koraku. Kao i brzinu kretanja lopte u kodu drugog koraka.
skriptarnica (c) 2000 - 2003 :: powered by WEBMA
Opis: Ova DHTML scripta simulira Edit> Find In Page radnju da vaim posjetiocima olaka
trazenje odreenog teksta na vaim stranicama. Ako vae stranice sadrze podosta teksta,
nemojte razmiljati o dodatku ove scripte na vae stranice.
Demo: Napiite rijec koju zelite naci na ovoj stranici.
Upute:
Jednostavno dodajte ovaj dolje kod u vae stranice.
<script language="JavaScript">
/*
Nadji na straniciPosjetite http://www.delfinradio.co.yu
*/
var NS4 = (document.layers);
var IE4 = (document.all);
var win = window;
var n = 0;
// Which browser?
// window to search.
function findInPage(str) {
var txt, i, found;
if (str == "")
return false;
// Find next occurance of the given string on the page, wrap around to the
// start of the page if necessary.
if (NS4) {
// Look for match starting at the current point. If not found, rewind
// back to the first match.
if (!win.find(str))
while(win.find(str, false, true))
n++;
else
n++;
Legenda:
(Sve) - Scripte rade sa Netscape 4+ i Internet Explorer 4+
(NS) - Znaci da scripte rade sa Netscape 4 i vie
(IE) - Znaci da scripte rade sa Internet Explorer 4 i vie
(IE5) - Znaci da scripte rade sa Internet Explorer 5 i vie
webmajstor 2000-2002
Mjehurici (Sve)
Kategorija: OSTALO
Opis: Mjehurici idu prema gore, zatim nestaju. Mjehurici se pojavljuju samo u gornjem dijelu
dugih stranica.
Demo:
Upute
Korak 1: Snimite i stavite u svoj direktorij sliku koja slijedi (kliknite desnom tipkom mia i
odaberite opciju "Save As")
Korak 2: Jeste snimili? sada dodajte ovaj dole kod copy/paste ODMAH iza <body> taga:
<script language="JavaScript1.2">
<!-- Pocetak
/*
korak-po-korak upute za ne-programere
Posjetite http://www.webmajstor.net
*/
var no = 20; // Broj mjehurica
var speed = 1; // Sto ih manje ima to su brzi
var snow = new Array();
snow[0] = "bubble.gif"
snow[1] = "bubble.gif"
snow[2] = "bubble.gif"
var ns4up = (document.layers) ? 1 : 0; // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 1800;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
j = 0;
for (i = 0; i < no; ++ i) {
dx[i] = 0;
// set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20;
// set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ns4up) {
// set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\"
visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\"
visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>");
}
} else if (ie4up) {
if (i == 0)
{
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; ZINDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" +
snow[j] + "\" border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; ZINDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" +
snow[j] + "\" border=\"0\"></div>");
}
}
if (j == (snow.length-1)) { j = 0; } else { j += 1; }
}
function snowNS() { // Netscape main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] -= sty[i];
if (yp[i] < -50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = doc_height;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] +
am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", speed);
}
function snowIE() { // IE main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] -= sty[i];
if (yp[i] < -50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = doc_height;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx[i] += stx[i];
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] +
am[i]*Math.sin(dx[i]);
}
setTimeout("snowIE()", speed);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
// Kraj -->
</script>