This page has been robot translated, sorry for typos if any. Original content here.

1 Is it possible to have the gif in the IE loaded, but not in the NN. If it is possible, then how to do it.
2 I want to make the first page of the site beautiful, so that there is a picture, and its different parts are related to HTML files. and when you hover over the bound area in the center, a certain pattern appears. How to do this tell me?
3 The menu is made using Java (onmouseover and onmouseout), the problem is that the images that should be crawled in onmouseover are loaded only when they are moused on them, but you need to make sure that they are loaded together with the page
4 Help me make a running line for Netscape into a Java script.
5 I urgently need a java: when I hover over one header (picture), I see two new pictures that are in different places, i.e. on the one hand the picture, and in another place the description of this picture.
6th Tell me how in JavaScript to change the title of the browser window for Netscape? document.title for some reason does not work for it
7th The script opens the popup and focus is passed to it, how to do the reverse?
8 : ^ D
9 Is there a script that determines the size of the user's viewer (well, there is 640x480, etc.)?
10 How to preload images (hyphas)
eleven : as soon as the user presses the button 'Back' in the browser, he again gets to index.htm, which immediately sends it back. It turns out that the page does not allow the user to leave it. How to deal with this?
12 How to make the page open not with the specified width and height, but in the full window?
13 Use different pictures for different resolutions. Find the width of the screen:
14 There is a script with which to make pop-up. Those. The user closed the browser window, after which a new preset window appears. And whether it is possible to set the time after which the second window should open. Can I open several pop-ups at different times?
15 What script is needed so that he recognizes the screen extension and then, depending on these values, passed certain values ​​to the frame size parameters?
16 Need a script (preferably with explanations) for calculating prices
17th How to create so that "BOTTOM" was sitting just below, despite the size of the window under the "BOTTOM" I have a look here is such a text:
18 And how to set the order of loading pictures, and it turns out that the banners of search engines are leaning forward my menus?
19 How can I do to direct on some drawing, for example, on the forehead of a person standing on his head and so that he starts spinning.
20 How to use JavaScript to "force" the window to open in full screen, regardless of the resolution?
21 How can I cache a picture using JavaScript?
22 How can I change the text on the page containing the Java applet? Can somehow use JavaScript or VBScript? The place on the page where the text should change is known, but beforehand it is known what to change it for?
23 When you hover the cursor, the picture 1.gif changes to the picture 2.gif Clicking the mouse on the picture (1.gif or 2.gif) navigating the hyperlink to the page
24 You need a script to "kill" the frame and the consequences of its closing.
25 I have a website. The site is created with frames. What should I do if I go to one of the pages without a frame? Is there any JavaScript that throws to the home page with this page?
26th A site with frames, say 3 frames. How to make that when clicking on a link the content of more than one frame changes, and 2-3?


Question:
Is it possible to have the gif in the IE loaded, but not in the NN. If it is possible, then how to do it.
-------------------------------------------------- ---------------------------------
Answer:
Well it can be simply not included in the page if the browser is Netscape:
  <script>
 browser_name = navigator.appName;
 browser_version = parseFloat (navigator.appVersion);

 if (browser_name == "Netscape") {roll = 'true';}

 if (roll == 'false') {
 document.write ("<img src = 'xxx.gif'>");
 }
 </ script> 

Answer sent by Valery Papushin
Put in a link to the gif-ku backslash, IE will load, and NN will leave an empty space.

Answer sent by DoctorGenius service
Yes it is possible. On the page of the site you need to put a script, which, depending on the browser, will load a specific html page.
1.htm for Explorer
2.htm for Netscape
3.htm for other browsers.
 <script language = "JavaScript">
 <! -
 if (navigator.appName == "Netscape") window.location.href = "1.htm";
 else if (navigator.appName == "Microsoft Internet Explorer")
  window.location.href = "2.htm";
 else window.location.href = "3.htm";
 // ->
 </ script> 

The answer was sent by Komlev Michael
Write a script to VBScript (because NN it does not support the pictures there will not) True I do not know how it will be on VBScript, a counterpart to JavaScript:
 <script>
 document.write ("<IMG SRC = gif.jpg ALT = gif1>")
 </ script> 
or through document.images You only need to learn VBScript :)


Question:
I want to make the first page of the site beautiful, so that there is a picture, and its different parts are related to HTML files. and when you hover over the bound area in the center, a certain pattern appears. How to do this tell me?
-------------------------------------------------- ---------------------------------
Answer:
This is done very simply in the "FrontPage" program. Click on the "Image Toolbar" panel with a button with a rectangle, a circle or a broken line (it all depends on how you want to select the object to be referenced on it - rectangular, circular, or you want to define the borders yourself). Select the area in the figure where you want to link. Pops out the window. In the window that is signed "URL:" write a link to go to. Described intricately, but if you try in practice - immediately figure it out.

The answer was sent by Komlev Michael
Through MAP.
<MAP name = Map0_about> <AREA coords = 10,0,122,14 href = "/click?http://www.site.ru/html/about/about_main.htm" shape = RECT target = _top> <AREA coords = 10,16,128,28 href = "/click?http://www.site.ru/html/about/about_finances.htm" shape = RECT target = _top> <AREA coords = 131,16,203,28 href = "/ click ? http: //www.site.ru/html/about/about_press.htm "shape = RECT target = _top> </ MAP>

Answer sent by Sasha Cutter
It is necessary to make a picture compound: the main insert in the middle (so beautiful), and the rest to the soul you like ... When you hover on any of the pictures - the main changes when you remove the mouse from the picture - the main becomes the same - I think you wanted it so. You should use this script:
 <script language = "JavaScript">
 if (navigator.appVersion.indexOf ("2.")! = -1)
 {check = false;  }

 if ((navigator.appVersion.indexOf ("3.")! = -1) &&
  (navigator.appName.indexOf ("Explorer")! = -1))

 {check = false;  }
 else {check = true;  }

 im1ch = new Image ();
 im1ch.src = "1.gif";
 im1chon = new Image ();
 im1chon.src = "2.gif";

 function imon (name)
 {document ["change"]. src = eval (name + "chon.src");  }

 function imoff (name) {document ["change"]. src = eval (name + "ch.src");  }

 NN3 = true;

 function on (name)
 {if (check == true) {imon (name);}}

 function off (name)
 {if (check == true) {imoff (name);}}
 </ script>
Where first is the browser version checked (will the script work), then the description of the picture and the one that replaces it (im1 and im1chon), and then the replacement script itself ... You can insert pictures as many as you like (im2, im3, .. imn ...), but you need to call them like this ...
<img SRC = "main.gif" NAME = "change">
<a href = "/ click? http: // _ go, like requested_" onMouseOver = "on ('im1')"; onMouseOut = "off ('im1')">
<img SRC = "1.gif" NAME = "im1" BORDER = "0"> </a>
The first line is the original image, with the name change (see the script), then it will be added. (such you can do a lot by analogy) ... That's all :)


Question:
The menu is made using Java (onmouseover and onmouseout), the problem is that the images that should be crawled in onmouseover are loaded only when they are moused on them, but you need to make sure that they are loaded together with the page
-------------------------------------------------- ---------------------------------
Answer:
by the fact that on channels with a narrow bandwidth, the following picture is obtained: I bring mice to the menu item, and the picture that should pop out in onmouseover, climbs only after 3-5 seconds.

The answer was sent by Andrei R. Sirvutis
Place the following script between the <head> tags. </ Head>
 <script language = "JavaScript">
 <! -
 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
  if (a [i] .indexOf ("#")! = 0) {d.MM_p [j] = new Image;  d.MM_p [j ++]. src = a [i];}}
 }
 // ->
 </ script>
And then the construction of this kind:
<BODY onLoad = "MM_preloadImages ('pic1.gif', 'pic2.jpg')">
All. Your images will be loaded in advance and when you hover the cursor on the object and, therefore, the onMouseOver trigger will be immediately shown. The only point - the visitor, in principle, should wait for the completion of loading the page and pictures. Otherwise, the situation described in the question


Question:
Help me make a running line for Netscape into a Java script.
-------------------------------------------------- ---------------------------------
Answer:
Here is a script that works in Netscape Communicator 4.51 and in Internet Explorer 4 In addition, you can insert links into this running line.
  <script language = "JavaScript1.2"> / *
 Cross browser marquee script-
 ї Dynamic Drive (www.dynamicdrive.com)
 For full source code, installation instructions,
 100's more DHTML scripts, and Terms Of
 Use, visit dynamicdrive.com
 * /
 // Specify the marquee's width (in pixels)
 var marqueewidth = 330
 // Specify the marquee's height (in pixels, pertains only to NS)
 var marqueeheight = 20
 // Specify the marquee's scroll speed (larger is faster)
 var speed = 6
 // Specify the marquee contents
 var marqueecontents = '<font face = "Arial"> <strong> <big> Creeping line.  You can also <a href="/click?http://"> Insert links. </a> Your text ....... </ big> </ strong> </ font> '
 if (document.all)
 document.write ('<marquee scrollAmount =' + speed + '
  style = "width: '+ marqueewidth +'"> '+ marqueecontents +'   ')
 function regenerate () {
 window.location.reload ()
 }
 function regenerate2 () {
 if (document.layers) {
 setTimeout ("window.onresize = regenerate", 450)
 intializemarquee ()
 }
 }
 function intializemarquee () {

 document.cmarquee01.document.cmarquee02.document.write (
  '<nobr>' + marqueecontents + '</ nobr>')
 document.cmarquee01.document.cmarquee02.document.close ()
 thelength = document.cmarquee01.document.cmarquee02.document.width
 scrollit ()
 }
 function scrollit () {
 if (document.cmarquee01.document.cmarquee02.left> = thelength * (- 1)) {
 document.cmarquee01.document.cmarquee02.left- = speed
 setTimeout ("scrollit ()", 100)
 }
 else {
 document.cmarquee01.document.cmarquee02.left = marqueewidth
 scrollit ()
 }
 }
 window.onload = regenerate2
 </ script>
 <ilayer width = & {marqueewidth};  height = & {marqueeheight};  name = "cmarquee01">
 <layer name = "cmarquee02"> </ layer>
 </ ilayer>



Question:
I urgently need a java: when I hover over one header (picture), I see two new pictures that are in different places, i.e. on the one hand the picture, and in another place the description of this picture.
-------------------------------------------------- ---------------------------------
Answer:
Here's the script:
 <script language = "JavaScript">
 if (navigator.appVersion.indexOf ("2.")! = -1)
 {check = false;  }
 if ((navigator.appVersion.indexOf ("3.")! = -1) &&
  (navigator.appName.indexOf ("Explorer")! = -1))
 {check = false;  }
 else {check = true;  }

 im1ch = new Image ();
 im1ch.src = "1.jpg";
 im1chon = new Image ();
 im1chon.src = "2.jpg";
 im1 = new Image ();
 im1.src = "1_1.jpg";
 im1on = new Image ();
 im1on.src = "1_2.jpg";
 function imon (name)
 {document ["change"]. src = eval (name + "chon.src");  }
 document [name] .src = eval (name + "on.src");
 function imoff (name) {document ["change"]. src = eval (name + "ch.src");  }
 document [name] .src = eval (name + ".src");
 NN3 = true;

 function on (name)
 {if (check == true) {imon (name);}}

 function off (name)
 {if (check == true) {imoff (name);}}
 </ script>
And here is the challenge:
<a href = "/ click? http: // !!!" onMouseOver = "on ('im1')"; onMouseOut = "off ('im1')">
<img SRC = "1.jpg" NAME = "im1" BORDER = "0"> </a> <br> <img "1_1.jpg" NAME = "change">



Question:
Tell me how in JavaScript to change the title of the browser window for Netscape? document.title for some reason does not work for it
-------------------------------------------------- ---------------------------------
Answer:
Most likely in any way, because the document.title in NN is read-only. You can also try:
 <HTML>
 <HEAD>
 <title> ttt </ title>
 </ HEAD>
 <BODY>
 <form>
 <script>
 function changeTitle (newTitle)
 {
  document.write ("<title>");
  document.write (newTitle);
  document.write ("</ title>");
 }
 </ script>
 <input type = "text" name = "txtTitle">
 <input type = "submit" value = "Change title"
 onClick = "changeTitle (document.forms [0] .txtTitle.value)">
 </ form>
 </ BODY>
 </ HTML> 
But such a design does not work correctly. There are no other ways.


Question:
The script opens the popup and focus is passed to it, how to do the reverse?
-------------------------------------------------- ---------------------------------
Answer:
  <Script Language = "JavaScript">
 Artel = window.open ("Frame2.htm", "Artel",
 "Width = 500, Height = 160, Toolbar = 0, Location = 0",
 "Status = 0, Menubar = 0, Scrollbars = 0, Resizable = 0");
 //
 focus ();
 </ Script>



Question:
: ^ D
-------------------------------------------------- ---------------------------------
Answer:
: ^ D


Question:
Is there a script that determines the size of the user's viewer (well, there is 640x480, etc.)?
-------------------------------------------------- ---------------------------------
Answer:
 <script language = "JavaScript">
 var height = 0;
 var width = 0;

 if (self.screen) {// for NN4 and IE4
  width = screen.width
  height = screen.height
 }
 else if (self.java) {// for NN3 with enabled Java
  var jkit = java.awt.Toolkit.getDefaultToolkit ();
  var scrsize = jkit.getScreenSize ();
  width = scrsize.width;
  height = scrsize.height;
 }
 </ script>
 </ head>
 <body>
 <script language = "JavaScript">
 <! -
 if (width> 0 && height> 0) {
  document.writeln ('Your resolution:', width, 'x', height)
 } else {
  document.writeln ('I do not know your permission \\ I')
 }
 // ->
 </ script>

The answer was sent by Litvinov Roman
A script that, in accordance with the user's screen resolution, sends to the corresponding page!
 <head>
 <script language = "JavaScript">
 <! -
 var height = 0;
 var width = 0;

 if (self.screen) {// for NN4 and IE4
 width = screen.width
 height = screen.height
 } else if (self.java) {// for NN3 with enabled Java
 var jkit = java.awt.Toolkit.getDefaultToolkit ();
 var scrsize = jkit.getScreenSize ();
 width = scrsize.width;
 height = scrsize.height;
  }
 // ->
 </ script>
 </ head>
 <body>
 <script language = "JavaScript">
 <! -
 if (width == 800 && height == 600) {
  location.href = "800x600.htm"}
 else if (width == 640 && height == 480) {
  location.href = "640x480.htm"}
 else {location.href = "unknown.htm"}
 // ->
 </ script>
 </ body>



Question:
How to preload images (hyphas)
-------------------------------------------------- ---------------------------------
Answer:
and then, when HeMouseOver, do both the replacement of the image and the status line, and when HeMouseAut - restore the image (status bar)? This is done with the help of function - I know that. And the value of the status line varies (window.status = document.title - this is understandable). It is not clear only with the drawings.

Answer sent by DoctorGenius service
Here is a script that will replace the picture and the inscription in the status bar when you hover the mouse. If the mouse is removed, everything will return as it was.
This part of the script is placed between the <HEAD> tags ... </ HEAD>
 <script language = "javascript1.1">
 <! -
 firstimage = new Image ()
 firstimage.src = "p1.gif"
 secondimage = new Image ()
 secondimage.src = "p2.gif"
 // ->
 </ script>
 <script>
 <! -
 function filter (imagename, objectsrc) {
 if (document.images)
 document.images [imagename] .src = eval (objectsrc + ". src")
 }
 // ->
 </ script>
This part of the script is placed between <BODY> ... </ BODY>
<a href = "/ click? http: //" onmouseover = "filter ('a', 'secondimage'); window.status = 'Link description in status bar'; return true;" onmouseout = "filter ('a', 'firstimage'); window.status = ''; return true;">
<img src = "p1.gif" name = "a" border = 0> </a>


Question:
: as soon as the user presses the button 'Back' in the browser, he again gets to index.htm, which immediately sends it back. It turns out that the page does not allow the user to leave it. How to deal with this?
-------------------------------------------------- ---------------------------------
Answer:
My index.htm page looks like this:
 <script> if (browser == InternetExplorer) document.location.href = "page_add_IE.htm";
 if (browser == NetscapeNavigator) document.location.href = "page_to_NN.htm";
 document.location.href = "page_add_all_other_browsers.htm";
 </ script> 
The script works fine: as soon as the user under IE comes to the page, he immediately gets on the "page_ under_IE.htm"

Answer sent by YURIK
Do a separate login button For example: Few finish your script.
 <script>
  function vhod () {
  if (browser == InternetExplorer) document.location.href = "page_add_IE.htm";
 if (browser == NetscapeNavigator) document.location.href = "page_to_NN.htm";
 document.location.href = "page_add_all_other_browsers.htm";
 }
 </ script>
 <A HREF="#" onClick="vhod()"> Login </a>
So you will have another page for banners and counters.

Answer sent by Andrej R. Sirvutis
As far as I know, pressing the "Back / Back" button, for example, in the Explorer, is equivalent to clicking on the javascript link: history.back ()
Try to beat this transition. Or use onUnload (), but then you should consider what will work in any case, even when navigating through another link from the current page.


Question:
How to make the page open not with the specified width and height, but in the full window?
-------------------------------------------------- ---------------------------------
Answer:
There is the following script: 001 = window.open ("file: /// c: /s/sb_bb001.htm", "001", "left = 0, top = 0, width = 730, height = 480, scrollbars = yes , resizeable = yes ");

The answer was sent by Alexander Tsehelnikov
Instead of writing values: for width = <script> screen.width </ script>, for height = <script> screen.height </ script>. Should work like a horse! :)


Question:
Use different pictures for different resolutions. Find the width of the screen:
-------------------------------------------------- ---------------------------------
Answer:
 <script>
 x = screen.width;  // here generally it is necessary to calculate width of a window -
 // minus the width of the scrollbar, because  the window may not be fully
 // deployed ...
 if (x> 750) document.write ('<img src = "1024.gif width ="' + x + '">');
 // although it is not a rulez to stretch or compress a picture ...
 else document.write ('<img src = "800.gif width ="' + x + '">');
 </ script>
two pictures because stretching 750 px to 1000 or compressing 1000 to 640 - is also not beautiful. and generally compress / stretch - ugly


Question:
There is a script with which to make pop-up. Those. The user closed the browser window, after which a new preset window appears. And whether it is possible to set the time after which the second window should open. Can I open several pop-ups at different times?
-------------------------------------------------- ---------------------------------
Answer:
Answer was sent by Rustem Samatov
setTimeout (popup (), 200); // execute the function popup (); with a delay of 200 milliseconds. ie by unLoad = setTimeout (.... and all taxis :) but this is a very bad tone


Question:
What script is needed so that he recognizes the screen extension and then, depending on these values, passed certain values ​​to the frame size parameters?
-------------------------------------------------- ---------------------------------
Answer:
 Use this script.
 <script language = "JavaScript">
 <! -
 if (self.screen) {
 width = screen.width
 height = screen.height
 }
 else if (self.java) {
 var jkit = java.awt.Toolkit.getDefaultToolkit ();
 var scrsize = jkit.getScreenSize ();
 width = scrsize.width;
 height = scrsize.height;
 } else {
 width = height = 'x'
 }
 if (width == 640)
 {document.write ('<FRAMESET cols = 20%, 80%> <FRAME src = "menu.htm">
 <FRAME name = display src = "firstpage.htm"> </ FRAMESET> ');  }
 else if (width == 800)
 {document.write ('<FRAMESET cols = 50%, 50%> <FRAME src = "menu.htm">
 <FRAME name = display src = "firstpage.htm"> </ FRAMESET> ');  }
 else if (width == 1024)
 {document.write ('<FRAMESET cols = 10%, 90%> <FRAME src = "menu.htm">
 <FRAME name = display src = "firstpage.htm"> </ FRAMESET> ');  }
 else if (width == 1280)
 {document.write ('<FRAMESET cols = 30%, 70%> <FRAME src = "menu.htm">
 <FRAME name = display src = "firstpage.htm"> </ FRAMESET> ');  }
 else {document.write ('<FRAMESET cols = 40%, 60%> <FRAME src = "menu.htm">
 <FRAME name = display src = "firstpage.htm"> </ FRAMESET> ');  }
 // ->
 </ script>



Question:
Need a script (preferably with explanations) for calculating prices
-------------------------------------------------- ---------------------------------
Answer:
  Create a form with drop-down menus
 <form name = "choisecomp" style = "padding: 0; margin: 0; border: 0">
 <select name = "MB" onChange = "javascript: _calculate ()">
 <option value = "0" selected> none </ option>
 <option value = "100"> MB Gygabyte PII ($ 100) </ option>
 <option value = "200"> MB Gygabyte PIII ($ 200) </ option>
 </ select> <BR>
 <select name = "Processor" onChange = ".........
 ...... </ select> <BR>
 <select name = "RAM" onChange = ".........
 ...... </ select> <BR>
 ............................
 <input type = "text" name = "summarn">
 </ form>

 and the function _calculate () which will count.

 function _calculate () {
 var comp = new Array ("MB", "Processor", "RAM", .........);
 var summa = 0;
 for (i = 0; i <comp.lenght; i ++) {
 if (document.choisecomp.comp [i] .selected) {
 summa = summa + document.choisecomp.comp [i] .value;
 }
 }
 document.choisecomp.summarn.value = summa;
 }



Question:
How to create so that "BOTTOM" was sitting just below, despite the size of the window under the "BOTTOM" I have a look here is such a text:
-------------------------------------------------- ---------------------------------
Answer:
I can suggest a variant on JavaScript, if it is suitable use%)! you enter it between <head> and </ head>
  <style>
  #divBottom {position: absolute;  font-family: arial, helvetica;
  height: 20;  width: 100;  font-size: 12pt;  font-weight: bold}
  </ style>
  <script language = "JavaScript1.2">
  var gright = 220 // indents to the right and bottom
  var gbottom = 40
  var n = (document.layers)?  1: 0;
  var ie = (document.all)?  1: 0;

  function makeObj (obj, nest) {
  nest = (! nest)?  '': 'document.' + nest + '.'
  this.css = (n)?  eval (nest + 'document.' + obj): eval (obj + '. style')
  this.moveIt = b_moveIt;
  }
  function b_moveIt (x, y) {
  this.x = x;  this.y = y
  this.css.left = this.x
  this.css.top = this.y
  }
  var pageWidth, pageHeight
  function Init () {
  oTest = new makeObj ('divBottom')
  pageWidth = (ie)? document.body.offsetWidth-4: innerWidth;
  pageHeight = (ie)? document.body.offsetHeight-2: innerHeight;
  checkIt ()
  onresize = resized
  if (ie) window.onscroll = checkIt;
  }
  function checkIt () {
  if (ie) oTest.moveIt (document.body.scrollLeft + pageWidth-gright,
  document.body.scrollTop + pageHeight-gbottom)
  else if (n) {
  oTest.moveIt (window.pageXOffset + pageWidth-gright,
  window.pageYOffset + pageHeight-gbottom)
  setTimeout ('checkIt ()', 20)
  }
  }
  function resized () {
  pageWidth = (ie)? document.body.offsetWidth-4: innerWidth;
  pageHeight = (ie)? document.body.offsetHeight-2: innerHeight;
  if (ie) checkIt ()
  }
  onload = Init;
  if (n || ie) document.write ('<div id = "divBottom"> So who's the site
 did? </ div> ')
  </ script>
after that should head close, like everything!


Question:
And how to set the order of loading pictures, and it turns out that the banners of search engines are leaning forward my menus?
-------------------------------------------------- ---------------------------------
Answer:
Use the Preload script (the code below). It will download pictures when called, and then, when requesting pictures, they will be shown, and banners will be loaded in the usual order.
  <head> <script language = "JavaScript"> <! -
 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  </ script>
 </ HEAD>
 <BODY onLoad = "MM_preloadImages ('pic1.gif', 'pic2.jpg')">
 ...
 <body>
I hope, it is understandable. If it does not work, then try to put this script on the page from where you go to the page with banners.


Question:
How can I do to direct on some drawing, for example, on the forehead of a person standing on his head and so that he starts spinning.
-------------------------------------------------- ---------------------------------
Answer:
The simplest thing is to use an animated picture (anim.gif) and a static one with the first frame animated (stat.gif).
Let the image be described as <img src = "stat.gif" onmouseover = "JustDoIt (this, 'anim.gif')" onmouseout = "JustDoIt (this, 'stat.gif')">
and the function looks like this:
function JustDoIt (obj, src) {obj.src = src; }
But this is without pre-loading, i.e. when you hover over a picture there will be a request to the animated server, which will slow down the work and smudge the impression.
Pre-loding is carried out next. code, the cat. is inserted before <body>:
 <script>
 var cash = 0;
 if (document.images) {
  var ImgList = new Array ();

  ImgList [0] = new Image ();
  ImgList [0] .src = "stat.gif";

  ImgList [1] = new Image ();
  ImgList [1] .src = "anim.gif";

  cash = 1;
 }
 </ script>
Checking for the presence of document.images cuts off the use of old browsers, the cat. do not support the Images object (IE3 for example)
Then our function will look like a trace. way:
  function JustDoIt (obj, src, x)
 {if (cash == 1) obj.src = ImgList [x] .src;
  else obj.src = src;
 } 
and the description of the picture will change to
<img src = "stat.gif" onmouseover = "JustDoIt (this, 'anim.gif', 1)" onmouseout = "JustDoIt (this, 'stat.gif', 0)">


Question:
How to use JavaScript to "force" the window to open in full screen, regardless of the resolution?
-------------------------------------------------- ---------------------------------
Answer:
Hence, the system is simple
<script language = "JavaScript"> window.moveTo (0,0);
window.resizeTo (screen.availWidth, screen.availHeight)
</ script>
And that's it! Insert it yourself somewhere in the page


Question:
How can I cache a picture using JavaScript?
-------------------------------------------------- ---------------------------------
Answer:
If I understood the problem correctly. Something like
if (document.images) {
var ImgList = new Array ();
ImgList [0] = new Image ();
ImgList [0] .src = "stat.gif";
ImgList [1] = new Image ();
ImgList [1] .src = "anim.gif";
}
and then apply not by the name of the desired picture, but the assignment is done as
obj.src = ImgList [x] .src;


Question:
How can I change the text on the page containing the Java applet? Can somehow use JavaScript or VBScript? The place on the page where the text should change is known, but beforehand it is known what to change it for?
-------------------------------------------------- ---------------------------------
Answer:
Answer from Andrei.
Write on the page in the place where the text will be inserted, the following:
<script language = "javascript" src = "myscript.js"> </ script>
Create a myscript.js file and write the desired text into it, which you can then change:
document.write ("Text");
You can create several functions with different texts, and then call up different ones with ye; ysvb texts according to the script


Question:
When you hover the cursor, the picture 1.gif changes to the picture 2.gif Clicking the mouse on the picture (1.gif or 2.gif) navigating the hyperlink to the page
-------------------------------------------------- ---------------------------------
Answer:
Generally speaking, you can do a little differently. When you hover over 1.gif, the picture changes to 2.gif And then, when the mouse clicks, the hyperlink is triggered. When the mouse leaves the picture, the image is restored (this can and should not be done, if not required).
 <HTML> <HEAD>
 <script language = "JavaScript">
 <! -
 function MM_swapImgRestore () {//v3.0
  var i, x, a = document.MM_sr;  for (i = 0; a && i <a.length && (x = a [i]) && x.oSrc; i ++)
 x.src = x.oSrc;
 }
 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 ("#")! = 0) {d.MM_p [j] = new Image;  d.MM_p [j ++]. src = a [i];}}
 }
 function MM_findObj (n, d) {//v3.0
  var p, i, x;  if (! d) d = document;  if ((p = n.indexOf ("?"))> 0 && parent.frames.length) {
  d = parent.frames [n.substring (p + 1)]. document;  n = n.substring (0, p);}
  if (! (x = d [n]) && d.all) x = d.all [n];  for (i = 0;! x && i <d.forms.length; i ++)
 x = d.forms [i] [n];
  for (i = 0;! x && d.layers && i <d.layers.length; i ++)
 x = MM_findObj (n, d.layers [i] .document);  return x;
 }
 function MM_swapImage () {//v3.0
  var i, j = 0, x, a = MM_swapImage.arguments;  document.MM_sr = new Array;
 for (i = 0; i <(a.length-2); i + = 3)
  if ((x = MM_findObj (a [i]))! = null) {document.MM_sr [j ++] = x;  if (! x.oSrc)
 x.oSrc = x.src;  x.src = a [i + 2];}
 }
 // -> </ script> </ HEAD> <BODY onLoad = "MM_preloadImages ('1.gif', '2.gif')">
 <P ALIGN = "CENTER">
 <img name = "Image1" alt = "Text" border = "0" src = "1.gif"
 onMouseOut = "MM_swapImgRestore ()"
 onMouseOver = "MM_swapImage ('Image1', '', '2.gif', 1)">
 </ P> </ BODY> </ HTML>
Answer from Shico.
Here is the simplest design without preloads and everything else. It works very well, only make drawings less weight.
<a href="xlam.htm"> <img src = "xlam1.gif" WIDTH = "120" HEIGHT = "24" alt = "XLAM" border = "0" onMouseover = "this.src = 'xlam2.gif '"onMouseout =" this.src =' xlam1.gif '"> </a>
Everywhere everything works the same way and no additional functions.


Question:
You need a script to "kill" the frame and the consequences of its closing.
-------------------------------------------------- ---------------------------------
Answer:
The meaning is this:
There is a page, the content of which I can not change (its code is below). It loads the page of my site http://mysite.ru into the window. When the window is closed or another link is loaded, a new window with advertising pops up on top of the frame (_top). Here's how to get rid of it?

Answer from Andrej R. Sirvutis.
 <script>
 if (parent.frames [0]) {
 top.location.href = "/click?http://mysite.ru";
 }
 </ script> 
This script will "kill" someone else's frame and open your site in this window. True window with advertising can still appear, tk. in the calling file a script is written to open a new window when unloading. Without it, this may not work.

Answer 2 If you need to kill a frame, here it is:
 <script language = "JavaScript" type = "text / javascript">
 setTimeout ("changePage ()", 3000);

 function changePage () {
 if (self.parent.frames.length! = 0)
 self.parent.location = document.location;
 }
 </ script>
By the way, the code from Gordon McComb.


Question:
I have a website. The site is created with frames. What should I do if I go to one of the pages without a frame? Is there any JavaScript that throws to the home page with this page?
-------------------------------------------------- ---------------------------------
Answer:
I suggest a very simple script that should be placed in the HEAD section or, at any rate, before the BODY section. Let's say you have two identical horizontal frames. The file 1.htm (some menu) is downloaded to the top one, and 2.htm to the bottom one. Place the following script at the beginning of the 2.htm file:
 <script>
 if (top.frames.length == 0) {
 document.write ("" <frame name = 'q1' src = '#'> "+
 "<frame name = 'q2' src = '#'>" +
 "</ frameset>")
 top.frames [0] .location.href = '1.htm'
 top.frames [1] .location.href = '2.htm'
 }
 </ script>
The first step is to check if there are frames at the beginning. If already exists, then the contents of the current file (2.htm) are loaded. If there are no frames initially, then they are immediately drawn. And after a moment it is indicated which files are loaded in them.
You can specify the explicit names of frames frames ['q1'], frames ['q2'] as indexes for the frames [] array. Well, for the first frame, you can immediately enter the source <frame name = 'q1' src = '1.htm'>, does not matter.

Answer from Andrej R. Sirvutis.
 <script language = "JavaScript">
 if (self.parent.frames.length == 0)
 self.parent.location = "index_main.htm";
 </ script> 
If the current page is not loaded into the frame, then the index_main.htm page is called. Place between <head> and </ head>.

Reply from Victor.
This script when you open the page on which it is placed on the whole screen will produce text (when you load this page in a frame this text will certainly be absent):
It is better to look with the control frame
<SCRIPT LANGUAGE = "JavaScript"> <! - if (self.parent.frames.length == 0) document.writeln ("It's better to look at the <A HREF = \\" index.htm \\ "> control < / A> "); // -> </ SCRIPT>


Question:
A site with frames, say 3 frames. How to make that when clicking on a link the content of more than one frame changes, and 2-3?
-------------------------------------------------- ---------------------------------
Answer:
Write a java script.
on the buttons:
 onClick = "javascript: _change (your reference number)"
 //those.  on the first button - 1, on the second - 2, ...
 // when you click on the 1st button, all the defined
 // in the script, the frames are replaced by the path to linkX_1.htm,
 // click on the second one to linkX_2.htm, etc.
 function _change (numLink) {
 linkArray1 = new Array ("link1_1.htm", "link1_2.htm", ....);
 linkArray2 = new Array ("link2_1.htm", "link2_2.htm", ....);
 // and so on by the number of frames, where link1_1 is the first
 // the changed reference in the 1st frame.
 name_of_frame1.location = eval ('http://mysite.com/' +
 linkArray1 [numLink]);
 name_of_frame2.location = eval ('http://mysite.com/' +
 linkArray2 [numLink]);
 // Again by the number of frames that can be changed
 } 

Answer from Andrej R. Sirvutis.
Use the onClick event handling.
<a target="frame2" href="page2.htm" onclick="parent.frame3.location.href='page3.htm'"> Link </a>
This design will load the "page2" page "page2.htm" into the frame and simultaneously "frame3" frame the page "page3.htm".