Changing Form Action in IE

    Date: 05/01/05 (Web Development)    Keywords: php, browser, html, java, web

    i'm sorry, my mistake. i had an input with the name "action" and it was confusing the browser. if you ever run into a problem like this, check your s names ;)




    Hya!

    I'm working on a feature for my website that needs me to change a form action with javascript.
    It's actually pretty easy to achieve this with Firefox, but not in IE. Since i'm not turning my back on IE, eventhough i hate the browser, i really wanted to get this thing to work cross-browser.. for the user's sake. ;)

    Is it possible?


    an example, working on firefox

    
    function preview( id ) {
    
        // get form element
        var frm_obj = window.document.getElementById( id );
    
    
        // open window
        var w = window.open( "loading.html", "preview", "width=500,height=350,scrollbars=yes" );
    
    
        // change form attributes
        frm_obj.target = "preview";
        frm_obj.action = "preview.php";
    
    
        // hey ho, let's go!
        frm_obj.submit();
    
        // bring window up (could be open already)
        w.focus();
        
    }
    
    



    oh, and i've tried using setAttribute as well. no results.

    thanks in advance. ;)

    Source: http://www.livejournal.com/community/webdev/193312.html

« business plan writing tips || Dreamweaver help. »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home