Results 1 to 6 of 6

Thread: Switch content bug: can't find the problem!

  1. #1
    Join Date
    Jan 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Switch content bug: can't find the problem!

    Hi,

    I am using a rewritten version of the Switch Content script II which shows all divs initially contracted. The problem is that when I put a form with more than one input fields in the switchable div, it is no longer possible to submit the form by hitting the enter key.
    The problem only occurs in internet explorer and not in Firefox!

    You can see my problem over here:
    http://home.student.uva.nl/alexander...contentbug.htm

    Has anyone any idea. You would help me alot!

    Thanks, Alexander
    Last edited by Alexandervandongen; 01-11-2006 at 06:21 PM.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Works for me in all the browsers I tried it in, save Konqueror, where the entire script was unworkable.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jan 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    Works for me in all the browsers I tried it in, save Konqueror, where the entire script was unworkable.
    The script works fine for opening and closing divs, but it prevents me from submitting the form on this page
    ( http://home.student.uva.nl/alexander...contentbug.htm ) by hitting enter. The problem occurs only in internet explorer and not in Firefox.

    Any ideas???

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Yeah, Twey doesn't do Windows so, he is out in left field on this one. Try this script in the head:

    Code:
    <script type="text/javascript">
    function ieSubmit(e, el){
    if (document.documentElement.filters){
    	if (e.keyCode=='13'){
    	el.submit()
    	return false;
    	}
    }
    }
    </script>
    and this code for your form:

    Code:
    <div id="sc1" class="switchcontent">
    <b>find telephone number:</b>
    <form onkeydown="return ieSubmit(event, this);" name="tel" target="_blank" method="get" action="http://www.nationaletelefoongids.nl/ntlist.asp">
    looking for <input type="text" accesskey="t" name="bname" class="zoekendubbelvoorbeeld" value=" Jansen">
     in <input type="text" name="city" class="zoekendubbelvoorbeeld" value=" Leiden">
    <input type="image" src="knoppen/zoeken.gif" width="8" height="9" border="0">
    </form>
    </div>
    Last edited by jscheuer1; 01-11-2006 at 08:46 PM. Reason: simplify script
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Quote Originally Posted by John
    Twey doesn't do Windows so, he is out in left field on this one.
    I actually tried installing Windows in qemu just so I could use IE to test these things, but then found out that my Windows install disk was battered beyond repair, and made horrible grinding noises in my disk drives.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Jan 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It works! John, you are my hero! You not only helped me, but a lot of my visitors too.

    Thanks!

    Alex

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •