Results 1 to 11 of 11

Thread: Code does not work in Internet Explorer, but it does in FireFox

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    4

    Code does not work in Internet Explorer, but it does in FireFox

    This is code allows for what is selected in Drop-Down boxes to appear in a text box next to it, if they select a second thing, it will also appear in that text box, it works in Firefox, but not Internet Explorer.

    <script>
    function addOption(x,x2) {
    sOption=document.getElementById(x2).value;
    sOptions=sOption.split("\n");
    if (sOption == '') {document.getElementById(x2).value=x+"\n";}
    else { if (sOptions.length > 1) {document.getElementById(x2).value=sOption+x+"\n";}
    else {document.getElementById(x2).value=sOption+"\n"+x+"\n";}
    }
    document.getElementById(x2).focus();
    }
    </script>

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Code does not work in Internet Explorer, but it does in FireFox

    What happens in IE?

  3. #3
    Hyperactive Member Disiance's Avatar
    Join Date
    Sep 2004
    Location
    Denver, CO
    Posts
    439

    Re: Code does not work in Internet Explorer, but it does in FireFox

    could you post the rest of the page's code too? I have MS's script debugger that alerts to any errors in code from IE.
    "I don't want to live alone until I'm married" - M.M.R.P

  4. #4

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    4

    Re: Code does not work in Internet Explorer, but it does in FireFox

    This is the code in use right now, when I tested it before I sent it , it worked in IE, but it does not seem to work when it is in actual use. Its copied from the actual page.

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta content="text/html; charset=ISO-8859-1"
    http-equiv="content-type">
    <title>coding</title>
    </head>
    <body>
    <script>
    function addOption(x,x2) {
    sOption=document.getElementById(x2).value;
    sOptions=sOption.split("\n");
    if (sOption == '') {document.getElementById(x2).value=x+"\n";}
    else { if (sOptions.length > 1) {document.getElementById(x2).value=sOption+x+"\n";}
    else {document.getElementById(x2).value=sOption+"\n"+x+"\n";}
    }
    document.getElementById(x2).focus();
    }
    </script>
    <select name="themes_select" id="themes_select"
    onchange="addOption(value,'themestextbox');">
    <option value="0"></option>
    <option value="20's Flapper/Gangster">20's
    Flapper/Gangster</option>
    <option value="40's Swing">40's
    Swing</option>
    <option value="50's Rock and Roll">50's
    Rock
    and Roll</option>
    <option value="60's Hippies/Woodstock">60's
    Hippies/Woodstock</option>
    <option value="70's Disco / Austin Powers">70's
    Disco /
    Austin Powers</option>
    <option value="Asian/Chinese/Japanese">Asian/Chinese/Japanese</option>
    <option value="Carnival">Carnival</option>
    <option value="Casino/Vegas">Casino/Vegas</option>
    <option value="Circus/Cirque">Circus/Cirque</option>
    <option value="Country Western">Country
    Western</option>
    <option value="Fairy Tale">Fairy
    Tale</option>
    <option value="Formal/Elegant">Formal/Elegant</option>
    <option value="Gothic Halloween">Gothic
    Halloween</option>
    <option value="Holiday">Holiday</option>
    <option value="Mardi Gras">Mardi
    Gras</option>
    <option value="Murder Mystery">Murder
    Mystery</option>
    <option value="Renaissance">Renaissance</option>
    <option value="Space/Futuristic">Space/Futuristic</option>
    <option value="Under the Sea">Under
    the Sea</option>
    </select>
    <font face="Arial"> <textarea name="themestextbox"
    cols="30" rows="3" wrap="virtual"
    id="themestextbox" tabindex="54"></textarea>
    </font>
    <div align="left"><label for="checkbox22"> <font
    face="Arial"> Music </font></label>
    </div>
    <font face="Arial">
    <select name="music_number" id="music_number"
    onchange="addOption(value,'musictextbox');">
    <option value="default" selected="selected">Select
    Number of Musicians</option>
    <option>Soloist</option>
    <option>Duo</option>
    <option>Trio</option>
    <option>Quartet</option>
    <option>Quintet</option>
    <option>Band</option>
    <option>Orchestra</option>
    <option>DJ
    / Emcee</option>
    <option>Other
    (Please type in)</option>
    </select>
    <br>
    <select name="music_select" class="multi" tabindex="53"
    onchange="addOption(value,'musictextbox');">
    <option value="default" selected="selected">Select
    Types of Music</option>
    <option>Blues</option>
    <option>Broadway</option>
    <option>Children's
    Music</option>
    <option>Classical</option>
    <option>Country</option>
    <option>Doo-wop</option>
    <option>Hip
    Hop</option>
    <option>Irish</option>
    <option>Jazz</option>
    <option>Karaoke</option>
    <option>Mariachi</option>
    <option>Motown</option>
    <option>Oldies</option>
    <option>Swing</option>
    <option>Pop/Rock</option>
    <option>R
    &amp; B</option>
    <option>Rap</option>
    <option>Reggae</option>
    <option>Renaissance</option>
    <option>Other
    (Please type in)</option>
    </select>
    </font>
    <font face="Arial"> <textarea name="musictextbox"
    cols="30" rows="3" wrap="virtual"
    id="musictextbox" tabindex="57"></textarea></font>
    <font face="Arial">Catering</font>
    <p>
    <select name="Catering1" id="Catering1"
    onchange="addOption(value,'cateringtext');">
    <option value="default">Menu</option>
    <option>Appetizers</option>
    <option>Main
    Course</option>
    <option>Side
    Dishes</option>
    <option>Dessert</option>
    <option>Miscellaneous</option>
    </select>
    <select name="Catering2" id="Catering2"
    onchange="addOption(value,'cateringtext');">
    <option value="default">Beverages</option>
    <option>Alcoholic</option>
    <option>Non
    Alcoholic</option>
    <option>Champagne/Wine</option>
    </select>
    <select name="Catering3" id="Catering3"
    onchange="addOption(value,'cateringtext');">
    <option value="default">Staff</option>
    <option>Waiters</option>
    <option>Bartenders</option>
    <option>Valet</option>
    <option>Coat
    Check</option>
    </select>
    <select name="Catering4" id="Catering4"
    onchange="addOption(value,'cateringtext');">
    <option value="default">Specialty
    Items &amp;
    Decor</option>
    <option>Lit
    Fabric Sweeps</option>
    <option>Flowers</option>
    <option>Linens</option>
    <option>Centerpieces</option>
    <option>Glow
    Tables</option>
    <option>Glow
    Bars</option>
    <option>Ice
    Sculptures with Luges</option>
    <option>Sparklers</option>
    <option>Balloon
    drop</option>
    <option>Confetti
    blast</option>
    </select>
    <select name="Catering5" id="Catering5"
    onchange="addOption(value,'cateringtext');">
    <option value="default">Equipment</option>
    <option>Tables</option>
    <option>Chairs</option>
    <option>Lounge
    /Couches</option>
    <option>Dance
    Floor</option>
    <option>Tents</option>
    <option>Bars</option>
    </select>
    <select name="Catering6" id="Catering6"
    onchange="addOption(value,'cateringtext');">
    <option value="default">Transportation</option>
    <option>Limos/Cars</option>
    <option>Horse
    and Carriage</option>
    <option>Bus</option>
    <option>Yacht/Boat</option>
    <option>Plane/Lear
    Jet</option>
    </select>
    </p>
    <textarea name="cateringtext" cols="30" rows="3"
    id="cateringtext"></textarea>
    <label for="checkbox33"><font face="Arial">
    Performer
    Skills</font></label>
    <font face="Arial">
    <select class="multi" name="performer_select"
    tabindex="59" onchange="addOption(value,'performertext');">
    <option value="default">Select
    Performer(s)</option>
    <option>Acrobat</option>
    <option>Balancing
    Act</option>
    <option>Belly
    Dancer</option>
    <option>Bubble
    Performer</option>
    <option>Caricaturist</option>
    <option>Clown</option>
    <option>Comedian</option>
    <option>Contortionist</option>
    <option>Costumed
    Character</option>
    <option>Dance
    Act</option>
    <option>Ethnic
    Dance</option>
    <option>Face
    Painter</option>
    <option>Fire
    Act</option>
    <option>Hypnotist</option>
    <option>Impersonator</option>
    <option>Juggler</option>
    <option>Mime
    Artist</option>
    <option>Model</option>
    <option>Psychic</option>
    <option>Product
    Demonstrator</option>
    <option>Puppeteer</option>
    <option>Stage
    Combat</option>
    <option>Stiltwalker</option>
    <option>Storyteller</option>
    <option>Ventriloquist</option>
    <option>Yo-Yo-Artist</option>
    </select>
    </font>
    <font face="Arial"> <textarea name="performertext"
    cols="30" rows="3" wrap="virtual"
    id="performertext" tabindex="60"></textarea></font>
    <label for="checkbox44"><font face="Arial">
    Novelty Items</font></label>
    <font face="Arial">
    <select class="multi" name="novelty_items_select"
    tabindex="62" onchange="addOption(value,'noveltyitemstext');">
    <option value="default">Select
    Novelty Item(s)</option>
    <option>Carnival
    Booths</option>
    <option>Carnival
    Rides</option>
    <option>Catering</option>
    <option>Food
    Carts</option>
    <option>Game
    Shows</option>
    <option>Inflatable
    Bouncers</option>
    <option>Multi-Media</option>
    <option>Party
    Favors</option>
    <option>Photography</option>
    <option>Pyrotechnics</option>
    <option>Sky
    Promotions</option>
    <option>Special
    Effects</option>
    <option>Tents</option>
    <option>Theme
    Decor</option>
    <option>Video
    &amp; Simulation Games</option>
    <option>Video
    Presentations</option>
    </select>
    </font>
    <font face="Arial"> <textarea name="noveltyitemstext"
    cols="30" rows="3" wrap="virtual"
    id="noveltyitemstext" tabindex="63"></textarea></font>
    <label for="checkbox55"> <font face="Arial">
    Behind
    the Scenes</font></label>
    <font face="Arial">
    <select class="multi" name="eventlogistics_select"
    tabindex="65" onchange="addOption(value,'eventlogisticstext');">
    <option value="default">Select
    Choice(s)</option>
    <option>Choreography</option>
    <option>Costumes</option>
    <option>Directors</option>
    <option>Event
    Consultation</option>
    <option>Event
    Coordinators</option>
    <option>Event
    Design</option>
    <option>Laser
    Light Shows</option>
    <option>Sound
    Equipment</option>
    <option>Staffing
    &amp; Logistics</option>
    <option>Staging</option>
    <option>Tents</option>
    <option>Theatrical
    Lighting</option>
    </select>
    </font>
    </body>
    </html>

  5. #5
    Hyperactive Member Disiance's Avatar
    Join Date
    Sep 2004
    Location
    Denver, CO
    Posts
    439

    Re: Code does not work in Internet Explorer, but it does in FireFox

    It's working for me.
    "I don't want to live alone until I'm married" - M.M.R.P

  6. #6

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    4

    Re: Code does not work in Internet Explorer, but it does in FireFox

    Yeah, it worked for me to , but when it is in use, it does not.

  7. #7
    Hyperactive Member Disiance's Avatar
    Join Date
    Sep 2004
    Location
    Denver, CO
    Posts
    439

    Re: Code does not work in Internet Explorer, but it does in FireFox

    can you give me a link to the "live" page.
    "I don't want to live alone until I'm married" - M.M.R.P

  8. #8

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    4

    Re: Code does not work in Internet Explorer, but it does in FireFox

    Sent you a private message.

  9. #9
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Code does not work in Internet Explorer, but it does in FireFox

    Send me a link to the live page too.

  10. #10
    Hyperactive Member Disiance's Avatar
    Join Date
    Sep 2004
    Location
    Denver, CO
    Posts
    439

    Re: Code does not work in Internet Explorer, but it does in FireFox

    I've responded to your PM Dudeman.
    "I don't want to live alone until I'm married" - M.M.R.P

  11. #11
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Code does not work in Internet Explorer, but it does in FireFox

    If you guys find a solution to the problem please post it here because it might be helpful to other people. Thanks.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

Posting Permissions

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



Click Here to Expand Forum to Full Width