site doesn't work on IE

Discussion in 'Scripts' started by nomav6, Sep 3, 2004.

to remove all ads.
  1. nomav6

    nomav6 New Member

    Messages:
    18
    I need help :eek: when I click the submit button while on IE it doesn't work (although it works fine on FF) the site is http://www.autocheck1.com/credit.html please dont enter in information just click the submit button and it should take you striaght to the form to fill out, oh and please over look the design of the site its crap but I'm just trying to get all the code to work right now. Any suggestions as to why it doesn't work on IE?
     
  2. ian

    ian Administrator Staff Member

    Messages:
    2,153
    Did you use a pre-written script?
    If so, which one?
    btw, there is a slight error in your text
     
  3. Chroder

    Chroder New Member

    Messages:
    194
    Your form is set up all wrong.

    HTML:
    <form action="emailForm2.cfm" method="post">
    <input type="text" name="initails">
    <input type="submit" name="Submit" value="Submit">
    </form>
    And you have a link surrounding a button, you can't do that. If you want the button to go to emailForm1, then just change the form action. Don't use a link.
     
  4. nomav6

    nomav6 New Member

    Messages:
    18
    that code is going to take it past the other form that Im trying to go to which is emailform1.html, I want them to enter their initails, and when they hit submit it takes them to a different form to fill out and then when they submit that one then I want it to go to emailform2.cfm, sorry if all this sounds confussing but this is my first try at doing forms. thanks for the help so far, I think I'm just going to add the initails to the other form until I can figure out a way to do it.
     
  5. Chroder

    Chroder New Member

    Messages:
    194
    The link won't submt anything though, so there's not even a point in that form to begin with. That's why I'm kinda confused...
     
  6. nomav6

    nomav6 New Member

    Messages:
    18
    I wanted the first one to send it to the last part but going to the 2nd part (its hard to explain but doesn't really matter :cool: ), I agree that theres no point in it, but thats how they wanted it done so I tried and I told them that I'll keep trying but for now that its going to be left out.
     
  7. Chroder

    Chroder New Member

    Messages:
    194
    lol okay :p
     
  8. nomav6

    nomav6 New Member

    Messages:
    18
    ok, another question about forms(like I said Im new to forms and looking to learn a lot) I want to have a check box on it, and if the check box isn't checked I want the rest of the form greyed out, but when checked the rest will now be open for input, can anyone help me on this, btw I've been doing most of this in dreamweaver, anyone got any tips for me?
     
  9. Chroder

    Chroder New Member

    Messages:
    194
    You'll need to use Javascript for that. I'll help tomorrow when I wake up, it's late now ;)
     
  10. ian

    ian Administrator Staff Member

    Messages:
    2,153
    Would be easier to make the check box as a compulsory field and unless they check the box, the form will display an error message asking them to confirm that field which they have left blank. Thats the way most forms handle it.
     
  11. Chroder

    Chroder New Member

    Messages:
    194
    I just re-read your post, I thought you meant it was for some of the form. Like, some optional part that when the checkbox was unchecked the users are not supposed to pass over it.

    If it's like an 'agree to all terms' type thing, then it'd be better to just have it validated with the rest of the form (I assume that's what the ColdFusion script is).

    But incase you still want it:
    Code:
    <html>
    <head>
        <title> New Document </title>
        <script language="javascript">
        [b]function togglePart(part, what)
        {
            if (document.getElementById)
                var tags = document.getElementById(part).getElementsByTagName('*');
            else if (document.all)
                var tags = document.all[part].all.tags('*');
    
            if(!tags)
                return false;
            
            for(var i = 0; i < tags.length; i++)
            {
                if(what == 'enable')
                    tags[i].disabled = false;
                else
                    tags[i].disabled = true;
            }
    
            return true;
        }[/b]
        </script>
    </head>
    <body>
    
    <form>
    Test <input type="text" name="test1" /><br />
    Test <input type="text" name="test2" /><br />
    Test <input type="text" name="test3" /><br />
    
    Yes/no<input type="checkbox" name="yes_no" value="yes" checked="checked" [B]onclick="if(this.checked) togglePart('[color=#3333FF]form_parts[/color]','enable'); else togglePart('[color=#3333FF]form_parts[/color]','disable');"[/B] />
    <div [b]id="[color=#3333FF]form_parts[/color]"[/b]>
        <fieldset>
            <legend>Some form fields</legend>
            Test <input type="text" name="test4" /><br />
            Test <input type="text" name="test5" /><br />
            Test <input type="text" name="test6" /><br />
            Test <input type="chechbox" name="test7" /><br />
            Test <input type="chechbox" name="test8" /><br />
            Test <input type="radio" name="test9" value="1" />-1 <input type="radio" name="test9" value="2" />-2<br />
        </fieldset>
    </div>
    </form>
    
    </body>
    </html>
    Just stick all the things you want disabled in a div with an ID, and attach the onclick to the checkbox like I've done.
     

Share This Page