1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

displaying blocks for cross-browser use

Discussion in 'Web Design & Development' started by fizzle, Jan 26, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. fizzle

    fizzle Thread Starter

    Joined:
    Jun 22, 2005
    Messages:
    23
    I am trying to do a simple version of something that I saw on Foxton's website:

    http://newyork.foxtons.com/search?s...cation_ids=3004

    (from the map, if you click on Queens, it causes a list of neighborhoods to appear)

    I tested that, and it works in IE, Mozz and Firefox.

    So, I tried to make a simplified version that would perform the same task, but when I test it in IE, I recieve a warning in the toolbar that says, "To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer. Click here for options..."

    my simple version only uses javascript (as does Foxton's site), but the Foxton site does not generate that same warning.

    What gives ???

    Here is my dopey code, just so you can see what IE is barking about.
    I have already provided a link to Foxton's site (above). No barks from IE on that one.

    I would just like to accomplish this very simple task without causing IE any undue stress.
    Any help would be appreciated.


    <HTML>
    <HEAD>

    <script language ="javascript">

    function d1()
    {
    document.all.div1.style.display = 'block';
    document.all.div2.style.display = 'none';
    document.all.div3.style.display = 'none';
    }

    function d2()
    {
    document.all.div1.style.display = 'none';
    document.all.div2.style.display = 'block';
    document.all.div3.style.display = 'none';
    }

    function d3()
    {
    document.all.div1.style.display = 'none';
    document.all.div2.style.display = 'none';
    document.all.div3.style.display = 'block';
    }

    </script>

    </HEAD>

    <BODY>
    <div style="position:absolute; left:200px; top:50px;">
    <div id="div1" STYLE="display: none">DIV 1 text</div>
    <div id="div2" STYLE="display: none">DIV 2 text</div>
    <div id="div3" STYLE="display: none">DIV 3 text</div>
    </div>

    <div style="position:absolute; left:300px; top:300px;">
    <input type="radio" name="r1" onClick="d1();">
    <input type="radio" name="r1" onClick="d2();">
    <input type="radio" name="r1" onClick="d3();">
    </div>

    </body>
    </HTML>

    *** btw, I changed the title of this thread from: displaying blocks for cross-browser use (that was probably a pretty crappy description of the problem :D )
     
  2. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    I think it really depends on your security settings. It works just fine in both browsers on my PC.
     
  3. fizzle

    fizzle Thread Starter

    Joined:
    Jun 22, 2005
    Messages:
    23
    <headscratch>

    Really???

    (your talking about my code, right?)

    I don't get it. I haven't done anything to alter my settings.
    I also tested it on my laptop (which I did not alter settings on either).
    Same deal on that one.

    It's just basic javascript.
    The Foxton's site uses elaborate javascript, and yet I do not get the same type of warning in the information bar.
    Doesn't seem to make sense.

    </headscratch>
     
  4. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    Are you running it from localhost when you are testing it?
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - displaying blocks cross
  1. JiminSA
    Replies:
    1
    Views:
    1,140
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/437495

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice