HTML Parameters
(Using "?" or hash "#" with
docuemnt.URL and window.location.href)
Example of using Parameters (Parms) via the URL when loading an
HTML Page.
Examples
- Reading Html Parameters.
- document.URL vs window.location.href
- document.URL
With IE 5 & 6, if you launch a local url (file:///)
the parms are NOT seen using document.URL,
however if you use the "#" (aka hash mark) to reference
a bookmark or anchor they will show using
document.URL. If you launch via a web server, then
both (? & #) will work. I think Netscape works
differently. I'm not sure why IE behaves this way
with local url's.
- window.location.href
Doesn't seem to have the problem that document.URL has
with IE 5 & 6.
- Reading Html Parameters using ? -
Parameters - example of reading the HTML parameters and
using them in JavaScript.
Ex: <a href="ex_htmlparm_readparms.htm?parm1=Hello&parm2=World&parm3=Testing
info." target="_blank">Reading Html Parameters
using ?</a>
- Reading Html Parameters using # -
Bookmarks & Anchors - example of reading the HTML
parameters and using them in JavaScript.
Ex: <a href="ex_htmlparm_readparms.htm#parm1=Hello&parm2=World&parm3=Testing
info." target="_blank">Reading Html Parameters using #</a>
- Passing Html Parms to another Html page in a new window.
- Pass Html Parms - example of an HTML
page that reads the parms, launches another and then
launches another HTML page passing the HTML parms to that
page.