1 Is it possible to have the gif in IE loaded, but not in 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 navigated by mice, and 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 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 out 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 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 recognized 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 mean this text like this:
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 make him start 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 closing it.
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 IE loaded, but not in 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 it is necessary 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, analogue in 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 where the soul likes ... 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 (whether the script will 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 images as many as you like (im2, im3, .. Imn ...), but you need to call them ...
<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 - the original image, with the name change (see the script), then add. (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, and 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 fall out in onmouseover, climbs only after 3-5 seconds.

The answer was sent by Andrey 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 a construction of the following 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 trigger onMouseOver will be immediately shown. The only point - the visitor, in principle, should wait for the completion of the loading of 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 streaming 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 // varify 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 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 is sent to the corresponding page in accordance with the user's screen resolution!
 <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 over 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_post_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_post_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, clicking 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 out 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 to stretch 750 px to 1000 or compress 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 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 recognized 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 mean this text like this:
-------------------------------------------------- ---------------------------------
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 on 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 made the site there? </ 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 make him start spinning.
-------------------------------------------------- ---------------------------------
Answer:
The simplest thing is to use the animated picture (anim.gif) and the 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! Put it 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 do not refer to the name of the desired picture, and 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 multiple 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 closing it.
-------------------------------------------------- ---------------------------------
Answer:
The sense is this:
There is a page, the contents 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 uploaded 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 in a moment it is indicated which files are loaded in them.
You can specify the explicit names of frames frames ['q1'], frames ['q2'] as indices of 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 display text (when this page is loaded in the frame, this text will of course 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 will be replaced by the path to linkX_1.htm,
 // click on the second one on 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 page "page2.htm" into frame "frame2" and simultaneously "frame3" page "page3.htm" page.