javascript

    Date: 08/30/05 (Web Development)    Keywords: php, html, xml, java

    I shall start by saying that I really don't know much at all about javascript.

    I'm trying to send my xhtml as application/xhtml+xml wherever possible, which means I need well formed xml or I get lots of lovely errors.
    I'm usually a validation nut, so this hasn't been a problem with most stuff. However, I have several fanlistings on my site which use a script called phpfanbase.

    I've spent lots of time converting its html to xhtml, and removing lots of silly tables etc. Now the only thing stopping it from validating/being well formed is this bit of javascript:


    function submitonce(theform){
    //if IE 4+ or NS 6+
    if (document.all||document.getElementById){
    //screen thru every element in the form, and hunt down "submit" and "reset"
    for (i=0;ivar tempobj=theform.elements[i]
    if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
    //disable em
    tempobj.disabled=true
    }
    }
    }


    Can anyone explain what this does? If it's nothing too important then I'm just going to delete it I think.
    thanks :)

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

« PHP web question || Horizontal Scroll Bars »


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