Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Webmaster Zone > Web Development
Register

Reply
 
LinkBack Thread Tools
Old 24.07.2002, 01:38   #1
Младенец
 
Join Date: 07 2002
Location: [email protected]
Posts: 1
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Exclamation POMO}|{ITE LYUDI DOBRYE!!!

KTO ZNAET KAK SDELAT' CHTOBY KARTINKI NA SAYTE GRUZILIS' DO ZAGRUZKI STRANICY!!!
}|{ELATEL'NO NA <<JAVASCRIPTE>>!!!
ZARANEE SPASIBO!!!
Reply With Quote
Old 24.07.2002, 02:22   #2
Профессор
 
Join Date: 01 2002
Location: New York, USA
Posts: 2,938
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Post

problema s MouseOver knopkami?
Reply With Quote
Old 24.07.2002, 02:40   #3
Студент
 
Join Date: 06 2002
Location: Yerevan
Posts: 258
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Post

Sodral so svoego site-a:
Code:
  <SCRIPT language=&quot;JavaScript&quot;>
     var browserOK = false;
     var pics;
  </SCRIPT>
  <SCRIPT language=&quot;JavaScript1.1&quot;>
     browserOK = true;
     pics = new Array();
  </SCRIPT>
  <SCRIPT LANGUAGE=&quot;JavaScript&quot;>
  <!--
      var objCount = 0;

      function preload(name, first, second) {
        if (browserOK) {
          pics[objCount] = new Array(3);
          pics[objCount][0] = new Image();
          pics[objCount][0].src = first;
          pics[objCount][1] = new Image();
          pics[objCount][1].src = second;
          pics[objCount][2] = name;
          objCount++;
        }
      }

      function on(name){
        if (browserOK) {
          for (i = 0; i < objCount; i++) {
            if (document.images[pics[i][2]] != null)
               if (name != pics[i][2]) {
                  document.images[pics[i][2]].src = pics[i][0].src;
               } else {
                  document.images[pics[i][2]].src = pics[i][1].src;
               }
          }
        }
      }

      function off(){
        if (browserOK) {
           for (i = 0; i < objCount; i++) {
             if (document.images[pics[i][2]] != null)
                document.images[pics[i][2]].src = pics[i][0].src;
           }
        }
      }
      preload(&quot;Home&quot;, &quot;Images/Home.gif&quot;, &quot;Images/Homeb.gif&quot;);
      preload(&quot;DBranes&quot;, &quot;Images/DBranes.gif&quot;, &quot;Images/DBranesb.gif&quot;);
	  preload(&quot;ArmUni&quot;, &quot;Images/ArmUni.gif&quot;, &quot;Images/ArmUnib.gif&quot;);
	  preload(&quot;Misc&quot;, &quot;Images/Misc.gif&quot;, &quot;Images/Miscb.gif&quot;);
	  preload(&quot;About&quot;, &quot;Images/Aboutp.gif&quot;, &quot;Images/Aboutb.gif&quot;);
  //-->
  </SCRIPT>
Eto do body, v head-e.
A v body, gde kartinki:
Code:
	 	 <a href=&quot;index.htm&quot; onMouseOver=on(&quot;Home&quot;) onMouseOut=off()><img name=&quot;Home&quot; src=&quot;Images/Home.gif&quot; width=&quot;83&quot; height=&quot;34&quot; alt=&quot;Home&quot; border=&quot;0&quot; align=&quot;&quot;></a>
	 	    <a href=&quot;dbranes.html&quot; onMouseOver=on(&quot;DBranes&quot;) onMouseOut=off()><img name=&quot;DBranes&quot; src=&quot;Images/DBranes.gif&quot; width=&quot;127&quot; height=&quot;34&quot; alt=&quot;DBranes&quot; border=&quot;0&quot; align=&quot;&quot;></a>
	 	    <a href=&quot;armuni.html&quot; onMouseOver=on(&quot;ArmUni&quot;) onMouseOut=off()><img name=&quot;ArmUni&quot; src=&quot;Images/ArmUni.gif&quot; width=&quot;244&quot; height=&quot;34&quot; alt=&quot;ArmUni&quot; border=&quot;0&quot; align=&quot;&quot;></a>
	 	    <a href=&quot;misc.html&quot; onMouseOver=on(&quot;Misc&quot;) onMouseOut=off()><img name=&quot;Misc&quot; src=&quot;Images/Misc.gif&quot; width=&quot;71&quot; height=&quot;34&quot; alt=&quot;Misc&quot; border=&quot;0&quot; align=&quot;&quot;></a>
	 	    <a href=&quot;about.html&quot; onMouseOver=on(&quot;About&quot;) onMouseOut=off()><img name=&quot;About&quot; src=&quot;Images/Aboutp.gif&quot; width=&quot;84&quot; height=&quot;34&quot; alt=&quot;About&quot; border=&quot;0&quot; align=&quot;&quot;></a>
Have fun
Reply With Quote
Old 24.07.2002, 08:47   #4
Студент
 
Join Date: 03 2002
Location: [ Surrealistical World ]
Posts: 312
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Post

Po-moemu Dreamweaver had a standard Javascript function for that thing...
Posmotri tam.
Reply With Quote
Old 24.07.2002, 15:33   #5
Школьник
 
Join Date: 04 2002
Location: Vanadzor
Posts: 227
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Post

ete mouseover nkarner@ kich en karas nayev senc anes.

Code:
<script language=&quot;javascript&quot;>
var tmp1 = new Image();
tmp1.src = 'a_over.gif';
var tmp2 = new Image();
tmp2.src = 'b_ober.gif';

function ChImg(a, i) {
 document.images.a.src = i;
}
</script>

<img src=&quot;a.gif&quot; onmouseover=&quot;ChImg('a','a_over.gif')&quot;
 onmouseout=&quot;ChImg('a','a.gif')&quot; name=&quot;a&quot;>
<img src=&quot;b.gif&quot; onmouseover=&quot;ChImg('b','b_over.gif')&quot;
onmouseout=&quot;ChImg('b','b.gif')&quot; name=&quot;b&quot;>
Reply With Quote
Old 24.07.2002, 19:03   #6
¡no pasaran!
 
dolphin's Avatar
 
Join Date: 03 2002
Location: localhost
Age: 35
Posts: 540
Downloads: 0
Uploads: 0
Reputation: 13 | 4
Talking

2 Eddi:

mne jutko ponravilsja etot moment:

Code:
 <SCRIPT language=&quot;JavaScript&quot;>
     var browserOK = false;
     var pics;
  </SCRIPT>
  <SCRIPT language=&quot;JavaScript1.1&quot;>
     browserOK = true;
....
var browserOK = false; a potom srazu browserOK = true; .... a dal'she vezde
if (browserOK) {

krutaja proverka OK-nosti browsera, osnovannaja na language="JavaScript1.1" , chto skazat'....

ne prosche bylo zagnat' ves' blok v : SCRIPT language="JavaScript1.1", raz avtor scripta tak svjato verit v sposobnost' browsera ponjat', kakuju imenno versiju JavScript on [browser] podderjivaet??!

__________________
[ que fors aus ne le sot riens nee ]
Reply With Quote
Old 25.07.2002, 18:05   #7
Guest
 
Posts: n/a
Downloads:
Uploads:
Post

Dreamweaver's standart code:
Code:
<script language=&quot;JavaScript&quot;>
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf(&quot;#&quot;)!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
</script>

<body onLoad=&quot;MM_preloadImages('img.gif')&quot;>
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 23:16.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.