zxz 18.02.2011 02:25
Predmet:Valoviti tekst

PreuzmiIzvorni kôd (Text):
  1. <HTML>
  2. <HEAD>
  3. <META NAME="generator" CONTENT="toniarts easyhtml v.2.4">
  4. <TITLE>Title of your page</TITLE>
  5. </HEAD>
  6. <BODY>
  7. <script language="JavaScript1.2">
  8.  
  9. message="Dobro došli na portal iCentar"
  10.  
  11. ns6switch=1
  12.  
  13.  
  14. var ns6=document.getElementById&&!document.all
  15.  
  16. mes=new Array();
  17.  
  18. mes[0]=-1;
  19.  
  20. mes[1]=-4;
  21.  
  22. mes[2]=-7;mes[3]=-10;
  23.  
  24. mes[4]=-7;
  25.  
  26. mes[5]=-4;
  27.  
  28. mes[6]=-1;
  29.  
  30. num=0;
  31.  
  32. num2=0;
  33.  
  34. txt="";
  35.  
  36. function jump0(){
  37.  
  38. if (ns6&&!ns6switch){
  39.  
  40. jump.innerHTML=message
  41.  
  42. return
  43.  
  44. }
  45.  
  46. if(message.length > 6){
  47.  
  48. for(i=0; i != message.length;i++){
  49.  
  50. txt=txt+"<span style='position:relative;' id='n"+i+"'>"+message.charAt(i)+"</span>"};
  51.  
  52. jump.innerHTML=txt;
  53.  
  54. txt="";
  55.  
  56. jump1a()
  57.  
  58. }
  59.  
  60. else{
  61.  
  62. alert("Prekratko")
  63.  
  64. }
  65.  
  66. }
  67.  
  68.  
  69.  
  70. function jump1a(){
  71.  
  72. nfinal=(document.getElementById)? document.getElementById("n0") : document.all.n0
  73.  
  74. nfinal.style.left=-num2;
  75.  
  76. if(num2 != 9){
  77.  
  78. num2=num2+3;
  79.  
  80. setTimeout("jump1a()",50)
  81.  
  82. }
  83.  
  84. else{
  85.  
  86. jump1b()
  87.  
  88. }
  89.  
  90. }
  91.  
  92.  
  93.  
  94. function jump1b(){
  95.  
  96. nfinal.style.left=-num2;
  97.  
  98. if(num2 != 0){num2=num2-3;
  99.  
  100. setTimeout("jump1b()",50)
  101.  
  102. }
  103.  
  104. else{
  105.  
  106. jump2()
  107.  
  108. }
  109.  
  110. }
  111.  
  112.  
  113.  
  114. function jump2(){
  115.  
  116. txt="";
  117.  
  118. for(i=0;i != message.length;i++){
  119.  
  120. if(i+num > -1 && i+num < 7){
  121.  
  122. txt=txt+"<span style='position:relative;top:"+mes[i+num]+"'>"+message.charAt(i)+"</span>"
  123.  
  124. }
  125.  
  126. else{txt=txt+"<span>"+message.charAt(i)+"</span>"}
  127.  
  128. }
  129.  
  130. jump.innerHTML=txt;
  131.  
  132. txt="";
  133.  
  134. if(num != (-message.length)){
  135.  
  136. num--;
  137.  
  138. setTimeout("jump2()",50)}
  139.  
  140. else{num=0;
  141.  
  142. setTimeout("jump0()",50)}}
  143.  
  144. </script>
  145.  
  146. </head>
  147.  
  148. <body>
  149.  
  150.  
  151.  
  152. <h2><div id="jumpx" style="color:black"></div></h2>
  153.  
  154. <script>
  155.  
  156. if (document.all||document.getElementById){
  157.  
  158. jump=(document.getElementById)? document.getElementById("jumpx") : document.all.jumpx
  159.  
  160. jump0()
  161.  
  162. }
  163.  
  164. else
  165.  
  166. document.write(message)
  167.  
  168. </script>
  169. </BODY>
  170. </HTML>

zxz 18.02.2011 11:44
Predmet:Pulsirajuci link

PreuzmiIzvorni kôd (Text):
  1. <HTML>
  2. <HEAD>
  3. <META NAME="generator" CONTENT="toniarts easyhtml v.2.4">
  4. <TITLE>Title of your page</TITLE>
  5. </HEAD>
  6. <BODY>
  7. <span id="theText" style="width:100%">
  8. <h3 align="center"><font color="#000000"><font size="+5"><A HREF="http://www.icentar.ba/index.php">iCentar</A></font>
  9. </font>
  10. <script>
  11. var from = 5;
  12. var to = 11;
  13. var delay = 55;
  14. var glowColor = "red";
  15. var glowColor2 = "orange";
  16. var glowColor3 = "yellow";
  17. var glowColor4 = "lime";
  18. var glowColor5 = "blue";
  19. var glowColor6 = "magenta";
  20.  
  21. var i = to;
  22. var j = 0;
  23. textPulseDown();
  24. function textPulseUp()
  25. {
  26. if (!document.all)
  27. return
  28. if (i < to)
  29. {
  30. theText.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")";
  31. i++;
  32. theTimeout = setTimeout('textPulseUp()',delay);
  33. return 0;
  34. }
  35. if (i = to)
  36. {
  37. theTimeout = setTimeout('textPulseDown()',delay);
  38. return 0;
  39. }
  40. }
  41. function textPulseDown()
  42. {
  43. if (!document.all)
  44. return
  45. if (i > from)
  46. {
  47. theText.style.filter = "Glow(Color=" + glowColor2 + ", Strength=" + i + ")";
  48. i--;
  49. theTimeout = setTimeout('textPulseDown()',delay);
  50. return 0;
  51. }
  52. if (i = from)
  53. {
  54. theTimeout = setTimeout('textPulseUp2()',delay);
  55. return 0;
  56. }
  57. }
  58.  
  59. function textPulseUp2()
  60. {
  61. if (!document.all)
  62. return
  63. if (i < to)
  64. {
  65. theText.style.filter = "Glow(Color=" + glowColor3 + ", Strength=" + i + ")";
  66. i++;
  67. theTimeout = setTimeout('textPulseUp2()',delay);
  68. return 0;
  69. }
  70. if (i = to)
  71. {
  72. theTimeout = setTimeout('textPulseDown2()',delay);
  73. return 0;
  74. }
  75. }
  76. function textPulseDown2()
  77. {
  78. if (!document.all)
  79. return
  80. if (i > from)
  81. {
  82. theText.style.filter = "Glow(Color=" + glowColor4 + ", Strength=" + i + ")";
  83. i--;
  84. theTimeout = setTimeout('textPulseDown2()',delay);
  85. return 0;
  86. }
  87. if (i = from)
  88. {
  89. theTimeout = setTimeout('textPulseUp3()',delay);
  90. return 0;
  91. }
  92. }
  93. function textPulseUp3()
  94. {
  95. if (!document.all)
  96. return
  97. if (i < to)
  98. {
  99. theText.style.filter = "Glow(Color=" + glowColor5 + ", Strength=" + i + ")";
  100. i++;
  101. theTimeout = setTimeout('textPulseUp3()',delay);
  102. return 0;
  103. }
  104. if (i = to)
  105. {
  106. theTimeout = setTimeout('textPulseDown3()',delay);
  107. return 0;
  108. }
  109. }
  110. function textPulseDown3()
  111. {
  112. if (!document.all)
  113. return
  114. if (i > from)
  115. {
  116. theText.style.filter = "Glow(Color=" + glowColor6 + ", Strength=" + i + ")";
  117. i--;
  118. theTimeout = setTimeout('textPulseDown3()',delay);
  119. return 0;
  120. }
  121. if (i = from)
  122. {
  123. theTimeout = setTimeout('textPulseUp()',delay);
  124. return 0;
  125. }
  126. }
  127. </script></font></h3></span>
  128. </BODY>
  129. </HTML>

zxz 18.02.2011 12:43
Predmet:Zoom tekst

PreuzmiIzvorni kôd (Text):
  1. <HTML>
  2. <HEAD>
  3. <META NAME="generator" CONTENT="toniarts easyhtml v.2.4">
  4. <TITLE>Title of your page</TITLE>
  5. <style type="text/css">
  6. #divZoom {position:absolute; left:0px; top:170px; width:100%; text-align:center;}
  7. </style>
  8. <script language="JavaScript" type="text/javascript">
  9.  
  10. function lib_bwcheck(){ //Browsercheck (needed)
  11.         this.ver=navigator.appVersion
  12.         this.agent=navigator.userAgent
  13.         this.dom=document.getElementById?1:0
  14.         this.opera5=this.agent.indexOf("Opera 5")>-1
  15.         this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
  16.         this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
  17.         this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
  18.         this.ie=this.ie4||this.ie5||this.ie6
  19.         this.mac=this.agent.indexOf("Mac")>-1
  20.         this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
  21.         this.ns4=(document.layers && !this.dom)?1:0;
  22.         this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
  23.         return this
  24. }
  25. var bw=new lib_bwcheck()
  26.  
  27.  
  28. /*Here are the variables you have to set, play with different values:
  29. First the text: (it will stop and fade/change the colors on the last one)*/
  30. zText=new Array('Dobro došli','Na','iCenatar','Forum')
  31.  
  32. //Now the colors:
  33. //all you have to do is set the color you want to have in here:
  34. //(the first color will be the color that the text is when it zooms.)
  35. zColor=new Array('#202020','#424242','#8E8E8E','#C2C2C2','#E8E8E8')
  36.  
  37. var zEndSize=70   //The fontsize in px you want the zoom to end at
  38. var zSpeed=70     //Zoom speed
  39. var zAddSize=5    //Px to add to the fontsize on each interval
  40. var zFadeSpeed=70 //Color change/fade speed
  41. var zFont='arial black,arial,helvetica,sans-serif' //Font
  42. var zHide=true    //do you want it to hide when its done? (true or false)
  43. var zHideWait=1000  //Time to wait before hiding
  44. var zStartSize=10 //The size to start at
  45. var zEndCode=""   // Code to execute when the zoom and fade is finished. ie: "location.href='newpage.html', executes when the hide does.
  46.  
  47. /*You can remove this if you don't wan't it to start right away.
  48. You can have it start if someone clicks a link (make a link like this:
  49. <a href="#" onclick="fadeInit()">Click to Zoomtext</a>)*/
  50. //onload=zoomInit;
  51.  
  52. /********* You shouldn't really have to set anything below this point ***********/
  53.  
  54. //Object functions
  55. function makeZoomObj(obj,font,size,endsize,color,text,zspeed,fadespeed,addsize,hide,hidewait,endcode){
  56.         this.css=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;
  57.         this.writeref=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj].document:0;
  58.         this.zoomWrite=b_zoomWrite;     this.zoomIt=b_zoomIt; this.fadeIt=b_fadeIt;     this.zoomFade=b_zoomFade;
  59.         this.font=font; this.color=new Array(); this.color=eval(color); this.text=new Array(); this.text=eval(text);
  60.         this.zspeed=zspeed; this.fadespeed=fadespeed; this.addsize=addsize; this.endcode=endcode
  61.         this.hide=hide; this.hidewait=hidewait; this.size=size; this.startsize=size; this.endsize=endsize
  62.         if(size<endsize){this.way="<"; this.addsize=this.addsize
  63.     }else{this.way=">"; this.addsize=-this.addsize}
  64.         if(bw.dom || bw.ie4){ //Setting the style properties
  65.                 this.css.fontFamily=this.font; this.css.fontSize=this.size+"px"; this.css.color=this.color[0]
  66.         }
  67.         this.obj = obj + "Object";      eval(this.obj + "=this"); return this
  68. }
  69. function b_zoomFade(num){
  70.         if(num<this.text.length){
  71.                 this.size=this.startsize
  72.                 this.zoomIt(num,'this.zoomFade('+(num+1)+')')
  73.         }
  74.         else if(num==this.text.length) this.fadeIt(0,'this.zoomFade('+(num+1)+')')
  75.         else if(this.hide) setTimeout(this.obj+".css.visibility='hidden'; eval("+this.obj+".endcode)",this.hidewait)
  76. }
  77. function b_zoomWrite(num,cnum){
  78.         if(bw.ns4){
  79.                 this.writeref.write('<span style="text-align:center; font-size:' +this.size+'px; font-family:'+this.font+'; color:'+this.color[cnum]+'">'+this.text[num]+'</span>')
  80.                 this.writeref.close()
  81.         }else this.writeref.innerHTML="<center>"+this.text[num]+"</center>"
  82. }
  83. function b_zoomIt(num,fn){
  84.         if(eval(this.size+this.way+this.endsize)){
  85.                 if(this.size==this.startsize || bw.ns4) this.zoomWrite(num,0)
  86.                 if(bw.dom || bw.ie4) this.css.fontSize=this.size+"px"
  87.                 this.size=this.size+this.addsize
  88.                 setTimeout(this.obj+".zoomIt("+num+",'"+fn+"')",this.zspeed)
  89.         }else eval(fn)
  90. }
  91. function b_fadeIt(num,fn){
  92.         if(num<this.color.length){
  93.                 if(bw.ns4) this.zoomWrite(this.text.length-1,num)
  94.                 else this.css.color=this.color[num]
  95.                 num++
  96.                 setTimeout(this.obj+".fadeIt("+num+",'"+fn+"')",this.fadespeed)
  97.         }else eval(fn)
  98. }
  99. /*Initiates the object, shows it and starts the zoom
  100. ****************************************************************************/
  101. function zoomInit(){
  102.         if(bw.bw){
  103.                 oZoom=new makeZoomObj('divZoom',zFont,zStartSize,zEndSize,'zColor','zText',zSpeed,zFadeSpeed,zAddSize,zHide,zHideWait,zEndCode)
  104.                 oZoom.zoomFade(0)
  105.                 oZoom.css.visibility='visible'
  106.         }
  107. }
  108. </script>
  109.  
  110. </HEAD>
  111. <BODY>
  112. <div id="divZoom" align="center"></div>
  113.  
  114. <a href="#" onclick="zoomInit(); return false">Start</a>
  115.  
  116. </BODY>
  117. </HTML>

zxz 18.02.2011 13:15
Predmet:Å etajući tekst

PreuzmiIzvorni kôd (Text):
  1. <HTML>
  2. <HEAD>
  3. <META NAME="generator" CONTENT="toniarts easyhtml v.2.4">
  4. <TITLE>Title of your page</TITLE>
  5. <script language="javascript">
  6.  
  7. for (i=0; i<29 ;i++) {
  8.  
  9. document.write("<style type='text/css'>#m"+i+"{ position: absolute; left: 0px; top: 0px;}<\/style>\n")
  10.  
  11. }
  12.  
  13. </script>
  14. </HEAD>
  15. <BODY>
  16. <script language="javascript">
  17.  
  18. var ax=20, ay=20
  19.  
  20. var speedx1=3, speedy1=3
  21.  
  22. var speedx2=3, speedy2=3
  23.  
  24. text="iCentar.ba portal"    ; // Maksimalno 30 znakova
  25.  
  26. anzahl=text.length
  27.  
  28. x=new Array()
  29.  
  30. y=new Array()
  31.  
  32. xst=new Array()
  33.  
  34. yst=new Array()
  35.  
  36.  
  37.  
  38. var ns4up = (document.layers) ? 1 : 0;
  39.  
  40. var ie4up = (document.all) ? 1 : 0;
  41.  
  42. if (ns4up) {
  43.  
  44.  hoehe = self.innerHeight-35;
  45.  
  46.  breite= self.innerWidth-anzahl*11;
  47.  
  48. } else if (ie4up) {
  49.  
  50.  hoehe = document.body.clientHeight-35;
  51.  
  52.  breite = document.body.clientWidth-anzahl*11;
  53.  
  54. }
  55.  
  56. var mx=breite, my=hoehe
  57.  
  58. document.write("<font color=\"#0000FF\">\n")         ; // Boja teksta
  59.  
  60. document.write("<b><tt><font size=\"+1\">\n")        ; //Veli
  61. ina i bold
  62.  
  63. for (i=0; i<anzahl ;i++) {
  64.  
  65. document.write("<div id='m"+i+"'>"+text.substr(i,1)+"<\/div>\n")
  66.  
  67. x[i]=0
  68.  
  69. y[i]=0
  70.  
  71. }
  72.  
  73. document.write("<\/font><\/tt></b><\/font>\n")
  74.  
  75. zufall()
  76.  
  77. mt()
  78.  
  79. function mt() {
  80.  
  81. xst[0]=(mx-x[0]+ax)/speedx1
  82.  
  83. yst[0]=(my-y[0]+ay)/speedy1
  84.  
  85. x[0]=x[0]+xst[0]
  86.  
  87. y[0]=y[0]+yst[0]
  88.  
  89. for (i=1; i<anzahl; i++) {
  90.  
  91. xst[i]=(x[i-1]-x[i]+10)/speedx2
  92.  
  93. yst[i]=(y[i-1]-y[i])/speedy2
  94.  
  95. x[i]=x[i]+xst[i]
  96.  
  97. y[i]=y[i]+yst[i]
  98.  
  99. }
  100.  
  101. if (Math.abs(xst[0])<0.2 && Math.abs(yst[0])<0.2 && Math.abs(xst[anzahl-1])<0.2 && Math.abs(yst[anzahl-1])<0.2) {zufall()}
  102.  
  103. for (i=0; i<anzahl; i++) {
  104.  
  105. if (ns4up) {
  106.  
  107. document.layers["m"+i].left=x[i]
  108.  
  109. document.layers["m"+i].top=y[i]
  110.  
  111. }
  112.  
  113. if (ie4up) {
  114.  
  115. document.all["m"+i].style.pixelLeft=x[i]
  116.  
  117. document.all["m"+i].style.pixelTop=y[i]
  118.  
  119. }}
  120.  
  121. setTimeout("mt()",10)
  122.  
  123. }
  124.  
  125. function zufall() {
  126.  
  127. if (ns4up) {
  128.  
  129. mx=breite*Math.random()+pageXOffset
  130.  
  131. my=hoehe*Math.random()+pageYOffset
  132.  
  133. }
  134.  
  135. if (ie4up) {
  136.  
  137. mx=breite*Math.random()+document.body.scrollLeft
  138.  
  139. my=hoehe*Math.random()+document.body.scrollTop
  140.  
  141. }
  142.  
  143. speedx1=Math.random()*10+1
  144.  
  145. speedy1=Math.random()*10+1
  146.  
  147. speedx2=Math.random()*10+1
  148.  
  149. speedy2=Math.random()*10+1
  150.  
  151. }
  152.  
  153. </script>
  154. </BODY>
  155. </HTML>

zxz 20.02.2011 00:36
Predmet:Predhodna posjeta

PreuzmiIzvorni kôd (Text):
  1. <HTML>
  2. <HEAD>
  3. <META NAME="generator" CONTENT="toniarts easyhtml v.2.4">
  4. <TITLE>Title of your page</TITLE>
  5. <SCRIPT LANGUAGE = "JavaScript">
  6. <!-- Begin Script
  7. var expDays = 30;
  8. var exp = new Date();
  9. exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
  10.  
  11. function When(info){
  12.         // When
  13.                 var rightNow = new Date()
  14.                 var WWHTime = 0;
  15.                 WWHTime = GetCookie('WWhenH')
  16.  
  17.                 WWHTime = WWHTime * 1
  18.  
  19.                 var lastHereFormatting = new Date(WWHTime);  // Date-i-fy that number
  20.                 var intLastVisit = (lastHereFormatting.getYear() * 10000)+(lastHereFormatting.getMonth() * 100) + lastHereFormatting.getDate()
  21.                 var lastHereInDateFormat = "" + lastHereFormatting;  // Gotta use substring functions
  22.                 var dayOfWeek = lastHereInDateFormat.substring(0,3)
  23.                 var dateMonth = lastHereInDateFormat.substring(4,10)
  24.                 var hours = "" + lastHereFormatting.getHours()
  25.                 var year = lastHereFormatting.getYear()
  26.                 if (year < 1000) year+=1900
  27.                 var minutes = "" + lastHereFormatting.getMinutes()
  28.                 if (minutes.substring(0,1) == minutes){
  29.                         minutes = "0" + minutes
  30.                 }
  31.                 var WWHText = dayOfWeek + ", " + dateMonth + " " + year + " at " +  hours + ":" + minutes// display
  32.  
  33.                 SetCookie ("WWhenH", rightNow.getTime(), exp)
  34.  
  35.         return WWHText;
  36. }
  37.  
  38. function Count(info){
  39.         var psj=0;
  40.         // How many times
  41.                 var WWHCount = GetCookie('WWHCount')
  42.                 if (WWHCount == null) {
  43.                         WWHCount = 0;
  44.                 }
  45.                 else{
  46.                         WWHCount++;
  47.                 }
  48.                 SetCookie ('WWHCount', WWHCount, exp);
  49.  
  50.  
  51.         return WWHCount+1;
  52. }
  53.  
  54.  
  55.  
  56. function set(){
  57. //      VisitorName = prompt("Who are you?", "Nada");
  58. //      SetCookie ('VisitorName', VisitorName, exp);
  59.         SetCookie ('WWHCount', 0, exp);
  60.         SetCookie ('WWhenH', 0, exp);
  61. }
  62.  
  63. function getCookieVal (offset) {
  64.         var endstr = document.cookie.indexOf (";", offset);
  65.         if (endstr == -1)
  66.                 endstr = document.cookie.length;
  67.                 return unescape(document.cookie.substring(offset, endstr));
  68. }
  69.  
  70. function GetCookie (name) {
  71.         var arg = name + "=";
  72.         var alen = arg.length;
  73.         var clen = document.cookie.length;
  74.         var i = 0;
  75.         while (i < clen) {
  76.         var j = i + alen;
  77.         if (document.cookie.substring(i, j) == arg)
  78.                 return getCookieVal (j);
  79.                 i = document.cookie.indexOf(" ", i) + 1;
  80.                 if (i == 0) break;
  81.         }
  82.         return null;
  83. }
  84.  
  85. function SetCookie (name, value) {
  86.         var argv = SetCookie.arguments;
  87.         var argc = SetCookie.arguments.length;
  88.         var expires = (argc > 2) ? argv[2] : null;
  89.         var path = (argc > 3) ? argv[3] : null;
  90.         var domain = (argc > 4) ? argv[4] : null;
  91.         var secure = (argc > 5) ? argv[5] : false;
  92.         document.cookie = name + "=" + escape (value) +
  93.         ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
  94.         ((path == null) ? "" : ("; path=" + path)) +
  95.         ((domain == null) ? "" : ("; domain=" + domain)) +
  96.         ((secure == true) ? "; secure" : "");
  97. }
  98.  
  99. function DeleteCookie (name) {
  100.         var exp = new Date();
  101.         exp.setTime (exp.getTime() - 1);
  102.         // This cookie is history
  103.         var cval = GetCookie (name);
  104.         document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
  105.  
  106. }
  107. //  End Script -->
  108. </SCRIPT>
  109.  
  110. </HEAD>
  111. <BODY>
  112. <script>
  113. if (Count()==1){
  114. document.write("Ovo je prva posjeta")
  115. When()
  116. }
  117. else if (Count()>1)
  118. document.write("Zadnja posjeta je bila: <b>" + When() +"</B>.")
  119. </script>
  120.  
  121. </BODY>
  122. </HTML>

zxz 27.02.2011 02:18
Predmet:Upozorenje

Upozorenja.
PreuzmiIzvorni kôd (Text):
  1. <HTML>
  2. <HEAD>
  3. <META NAME="generator" CONTENT="toniarts easyhtml v.2.4">
  4. <TITLE>Title of your page</TITLE>
  5. </HEAD>
  6. <BODY>
  7. <div style="text-align:center;padding:10px;">
  8. <h1>iCentar</h1>
  9. <script type="text/javascript">
  10. alert('dobro dosli na iCentar');
  11. </script>
  12. <p><a href="JavaScript:self.close();">Izlaz</a></p>
  13. </div>
  14. </BODY>
  15. </HTML>

zxz 27.02.2011 02:30
Predmet:Drop down lista

Kombo izbor linka.
PreuzmiIzvorni kôd (Text):
  1. <HTML>
  2. <HEAD>
  3. <META NAME="generator" CONTENT="toniarts easyhtml v.2.4">
  4. <TITLE>Title of your page</TITLE>
  5. </HEAD>
  6. <BODY>
  7. <script language="javascript" type="text/javascript" >
  8. function izaberi(x){
  9.  
  10. if (document.form1.jumpmenu.value != "null") {
  11.         if (document.form1.jumpmenu.value != "http://www.icentar.ba") {
  12.                 alert('Pozdrav. Vidimo se uskoro!');
  13.                 }
  14.         document.location.href = x
  15.         }
  16. }
  17. </script>
  18. <form name="form1">
  19. <select name="jumpmenu"
  20. onChange="izaberi(document.form1.jumpmenu.options[document.form1.jumpmenu.options.selectedIndex].value)">
  21. <option>izaberi...</option>
  22. <option value="http://www.google.ba">Google</option>
  23. <option value="http://www.icentar.ba">iCentar</option>
  24. <option value="http://www.colorpicker.com">Boje</option>
  25. <option value="http://www.freebyte.com/operatingsystems/">Besplatni Op. Sistemi</option>
  26. <option value="http://mamo-net.de/forum.php">Mamo</option>
  27. </select>
  28. </form>
  29. </BODY>
  30. </HTML>

zxz 27.02.2011 02:40
Predmet:Isto samo iz fajla dropdoen list

Isti primjer samo java kod zapisan u eksterni fajl.
Oba fajla moraju biti u istom direktoriju.
Java fajl mora se zvati extjava.js ili popravite u hatml fajlu:

Java fajl:
PreuzmiIzvorni kôd (Javascript):
  1. function izaberi(x){
  2.  
  3. if (document.form1.jumpmenu.value != "null") {
  4.         if (document.form1.jumpmenu.value != "http://www.icentar.ba") {
  5.                 alert('Pozdrav. Vidimo se uskoro!');
  6.                 }
  7.         document.location.href = x
  8.         }
  9. }

Html fal iz koga pokrecemo:
PreuzmiIzvorni kôd (HTML):
  1. <META NAME="generator" CONTENT="toniarts easyhtml v.2.4">
  2. <TITLE>Title of your page</TITLE>
  3. </HEAD>
  4. <script type="text/javascript" src="extjava.js"></script>
  5. <form name="form1">
  6. <select name="jumpmenu"
  7. onChange="izaberi(document.form1.jumpmenu.options[document.form1.jumpmenu.options.selectedIndex].value)">
  8. <option>izaberi...</option>
  9. <option value="http://www.google.ba">Google</option>
  10. <option value="http://www.icentar.ba">iCentar</option>
  11. <option value="http://www.colorpicker.com">Boje</option>
  12. <option value="http://www.freebyte.com/operatingsystems/">Besplatni Op. Sistemi</option>
  13. <option value="http://mamo-net.de/forum.php">Mamo</option>
  14. </form>
  15. </BODY>
  16. </HTML>

zxz 27.02.2011 02:45
Predmet:Document. write

Naredba document. write.
PreuzmiIzvorni kôd (Text):
  1. <HTML>
  2. <HEAD>
  3. <META NAME="generator" CONTENT="toniarts easyhtml v.2.4">
  4. <TITLE>Title of your page</TITLE>
  5. </HEAD>
  6. <BODY>
  7. <script type="text/javascript">
  8. <!--
  9. try
  10. {
  11. document.write("My bank balance is $" + myBankBalance);
  12. }
  13. catch(err)
  14. {
  15. document.write("Ovoje je jedan tekst");
  16. document.write(".... Ovo je nastavak teksta");
  17. }
  18. //-->
  19. </script>
  20. </BODY>
  21. </HTML>

zxz 27.02.2011 20:20
Predmet:Promjena boje teksta

Izmjena boje teksta
PreuzmiIzvorni kôd (Text):
  1. <HTML>
  2. <HEAD>
  3. <META NAME="generator" CONTENT="toniarts easyhtml v.2.4">
  4. <TITLE>Title of your page</TITLE>
  5. </HEAD>
  6. <BODY>
  7. <script type="text/javascript">
  8. function changeColor(){
  9.   var newColor = document.getElementById('colorPicker').value;
  10.         document.getElementById('colorMsg').style.color = newColor;
  11. }
  12. </script>
  13. <p id="colorMsg">Odaberi boju teksta</p>
  14. <select id="colorPicker" onchange="JavaScript:changeColor()">
  15. <option value="#000000">Black</option>
  16. <option value="#000099">Blue</option>
  17. <option value="#990000">Red</option>
  18. <option value="#009900">Green</option>
  19. </select>
  20. </BODY>
  21. </HTML>