Jump to content

Timmie

Members
  • Posts

    7
  • Joined

  • Last visited

Timmie's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I've found a workaround for the bug in IE that I posted a few days ago. What happens is: if you have more than one area for an image map that change the map for the image, only the first works and the rest will crash IE.Below is and example code (you can use any .gif, just rename it to anygif.gif).The top half of the image is one area and the bottom half is another. Click the top half and the area changes to a rectangle in the center of the image. Click that and the areas change back. Clicking the bottom half of the area crashes IE. Remove the comment markers from the script and no more crash!BTW: Anyone know how to report this bug to Bill? (like it would do any good). <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <title>IE bug Example</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script type="text/javascript"> function switch1() { /*document.getElementById( 'img01' ).style.display = "none";*/ document.getElementById( 'img01' ).useMap = "#map1a"; /*document.getElementById( 'img01' ).style.display = "block";*/ } function switch2() { document.getElementById( 'img01' ).useMap = "#main_map"; } </script></head><body><img alt="image 01" id="img01" src="anygif.gif" usemap="#main_map" border="0" width="300" height="300" ><map id="main_map" name="main_map"> <area alt="area01" shape="rect" coords="0, 0, 299, 149" href="JavaScript:switch1()" /> <area alt="area02" shape="rect" coords="0, 150, 299, 299" href="JavaScript:switch1()" /></map><map id="map1a" name="map1a"> <area alt="area03" shape="rect"coords="100, 100, 200, 200" href="JavaScript:switch2()" /></map>
  2. Timmie

    IE Crasher

    Here's the HTML<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head> <title>test</title> <link rel="stylesheet" type="text/css" href="tbird.css"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script type="text/javascript" src="tbird.js"></script></head><BODY TEXT="#000080"><img id="fr01" src="images/tbird_01.gif" usemap="#main_map" border="0", "width="653", height="491"><map id="main_map" name="main_map"> <area shape="rect"coords="224, 194, 440, 226" href="java script:switchit(0)" /> <area shape="rect"coords="224, 243, 397, 275" href="java script:switchit(1)" /></map><map id="map1a" name="map1a"> <area shape="rect"coords="100, 100, 200, 200" href="java script:switchit(2)" /></map><map id="map1b" name="map1b"> <area shape="rect"coords="100, 100, 200, 200" href="java script:switchit(2)" /></map><br></body></html>and here's the javascriptadd_scr_no = 0;view_scr_no = 0;old_map = "";function switchit( n ){ switch( n ) { case 0: document.getElementById( 'fr01' ).useMap = "#map1a"; break; case 1: document.getElementById( 'fr01' ).useMap = "#map1b"; break; case 2: document.getElementById( 'fr01' ).useMap = "#map1b"; break; }}When I click on the second area in the first map, it crashes IE but runs fine in FF. I have a very simiar page that works with no problem. If I remove the first area then it works. I'm baffled. Is there any explanation for this?
  3. This is the sort of thing I was looking for. That particular article though uses a function only available in IE. Is there anything that will work in Firefox too? I doesn't need to copy the text from the web page itself as I'll be creating the sting from various inputs on the page. So to rephrase the question: can you copy a string to the clipboard from any browser?
  4. In a Java Script can you create a string and then copy it to the clipboard so it can be pasted into another application?
  5. Can I assume from this that nohref is not supported by current browsers?
  6. In my HTML code I use images with areas to create links. The areas call JavaScript which changes the source of the image. When the source changes I want to be able to disable and enable certain areas. I've tried doing this by setting "nohref" but the script doesn't recognize the code. Can this be done and if so, what is the proper syntax?
×
×
  • Create New...