eGospodarka.pl
eGospodarka.pl poleca

eGospodarka.plGrupypl.comp.wwwSubmit formularza w IE8 › Re: Submit formularza w IE8
  • Data: 2009-06-06 12:55:17
    Temat: Re: Submit formularza w IE8
    Od: porneL <n...@p...net> szukaj wiadomości tego autora
    [ pokaż wszystkie nagłówki ]

    On Sat, 06 Jun 2009 01:16:53 +0100, Marek <m...@s...interia.pl>
    wrote:

    > obj.action="?xxx=zzz";
    >
    > To odczyt tego pola będzie zaskakująco inny:
    >
    > http://domena/katalog/nazwapliku.php?xxx=yyy
    >
    > IE8 dopisał sobie sam nazwę pliku do URL. Podsumowując: gdy pole action
    > jest puste
    > to dwie poniższe operacje w JS dla IE8 nie są sobie równoważne:
    >
    > save=obj.action;
    > obj.action=save+"?xxx=zzz";
    >
    > oraz
    >
    > obj.action="?xxx=zzz";
    >
    > gdyż save nie zawiera pustego stringu mimo iż action jest pusty. Super
    > pop... co?

    No super, że *poprawili buga* i twój kod sypie się na *prawidłowym* DOM.

    <form action=""> vs form.action powinno zachowywać się analogicznie do <a
    href=""> vs a.href i wygląda na to, że IE8 to wreszcie robi poprawnie.

    Jeśli chcesz niezmienioną wartość atrybutu, to używaj getAttribute().


    http://www.whatwg.org/specs/web-apps/current-work/mu
    ltipage/forms.html#dom-fs-action

    > The action, method, enctype, and target DOM attributes must reflect the
    > respective content attributes of the same name.

    http://www.whatwg.org/specs/web-apps/current-work/mu
    ltipage/infrastructure.html#reflecting-content-attri
    butes-in-dom-attributes

    > If a reflecting DOM attribute is a DOMString attribute whose content
    > attribute is defined to contain a URL, then on getting, the DOM
    > attribute must resolve the value of the content attribute relative to
    > the element and return the resulting absolute URL


    --
    http://pornel.net
    this.author = new Geek("porneL");

Podziel się

Poleć ten post znajomemu poleć

Wydrukuj ten post drukuj


Następne wpisy z tego wątku

Najnowsze wątki z tej grupy


Najnowsze wątki

Szukaj w grupach

Eksperci egospodarka.pl

1 1 1

Wpisz nazwę miasta, dla którego chcesz znaleźć jednostkę ZUS.

Wzory dokumentów

Bezpłatne wzory dokumentów i formularzy.
Wyszukaj i pobierz za darmo: