![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
While visiting the apple.com page, I noticed an unusual form behavior that seems pretty nice, but looking at the source (below) it is unclear how it works. Is there a tutorial that explains it? Thanks. div id="ppu-checker" form id="ppu-check-form" onsubmit="return false;" method="get" action="http ://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/wa/RSLID" p /p><div id="ppu-input-container" class="psearch nonsafari"><label input name="ppu-postal-code" maxlength="" size="10" class="psearch nonsafari" va lue="Zip code" id="ppu-postal-code" type="text"><span id="ppu-input- container-re set"></span></label></div script type="text/javascript" // <![CDATA[ dojo.require("apple.widget.PrettySearchField"); var ppuinputcontainerObj = new apple.widget.PrettySearchField( { inputId: "ppu-postal-code", containerId: "ppu-input-container", resetIconId: "ppu-input-container-reset", maxLength: "5", results: "", placeholder: "Zip code", autosave: "" } ); // ]] /script |
#3
| |||
| |||
|
|
test9991014 (AT) yahoo (DOT) com wrote: While visiting the apple.com page, I noticed an unusual form behavior that seems pretty nice, but looking at the source (below) it is unclear how it works. Is there a tutorial that explains it? Thanks. div id="ppu-checker" form id="ppu-check-form" onsubmit="return false;" method="get" action="http ://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/wa/RSLID" p /p><div id="ppu-input-container" class="psearch nonsafari"><label input name="ppu-postal-code" maxlength="" size="10" class="psearch nonsafari" va lue="Zip code" id="ppu-postal-code" type="text"><span id="ppu-input- container-re set"></span></label></div script type="text/javascript" // <![CDATA[ dojo.require("apple.widget.PrettySearchField"); var ppuinputcontainerObj = new apple.widget.PrettySearchField( { inputId: "ppu-postal-code", containerId: "ppu-input-container", resetIconId: "ppu-input-container-reset", maxLength: "5", results: "", placeholder: "Zip code", autosave: "" } ); // ]] /script The CDATA lines have been commented out. |
#4
| |||
| |||
|
|
In article <v7idnRjDA9OhXL3VnZ2dnUVZ_jGdnZ2d (AT) giganews (DOT) com>, sheldonlg <sheldonlg> wrote: test9991014 (AT) yahoo (DOT) com wrote: While visiting the apple.com page, I noticed an unusual form behavior that seems pretty nice, but looking at the source (below) it is unclear how it works. Is there a tutorial that explains it? Thanks. div id="ppu-checker" form id="ppu-check-form" onsubmit="return false;" method="get" action="http ://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/wa/RSLID" p /p><div id="ppu-input-container" class="psearch nonsafari"><label input name="ppu-postal-code" maxlength="" size="10" class="psearch nonsafari" va lue="Zip code" id="ppu-postal-code" type="text"><span id="ppu-input- container-re set"></span></label></div script type="text/javascript" // <![CDATA[ dojo.require("apple.widget.PrettySearchField"); var ppuinputcontainerObj = new apple.widget.PrettySearchField( { inputId: "ppu-postal-code", containerId: "ppu-input-container", resetIconId: "ppu-input-container-reset", maxLength: "5", results: "", placeholder: "Zip code", autosave: "" } ); // ]] /script The CDATA lines have been commented out. It may be a WebObjects thing? Not sure, as I've never actually poked into WebObjects, but Apple certainly has... |
#5
| |||
| |||
|
|
Gus Richter <gusrichter (AT) netscape (DOT) net> writes: In XHTML, Script and Style element contents must be wrapped within a CDATA marked section to avoid expansion of entities < and & as start of These characters can also be encoded by other well-known means without »CDATA«. |
#6
| |||
| |||
|
|
XHTML _will_ expand the entities. Javascript does _not_ want them expanded. The CDATA marked sections will _avoid_ expansion of the entities in the XHTML document _within the CDATA marked sections_. |
#7
| |||
| |||
|
|
While visiting the apple.com page, I noticed an unusual form behavior that seems pretty nice, but looking at the source (below) it is unclear how it works. Is there a tutorial that explains it? Thanks. |
|
script type="text/javascript" // <![CDATA[ |
![]() |
| Thread Tools | |
| Display Modes | |
| |