Hi,
On a Page I want a user can select (a)name(s) from a so called "popup" window
as well as selecting a date from a "popup" calendar.
I found some examples by using JavaScript. But my question is can this also
be achieved (and how) without JavaScript, and is it advisable (not using
JavaScript in case its possible)?
Thanks
Guy
Except when you target very thin clients (like mobile web browser, for
example), it is more or less safe to rely on JavaScript to enhace your
site's functionalities. To be 100% safe, however, you should always plan
an alternative solution.
About your specific problems: In general, we try to avoid pop-ups,
because the public dislikes them, and because they can be blocked. The
alternative is in general using an absolutely positioned DIV, which you
show/hide using JavaScript.
To have a safe site in case JavaScript is disabled, you could do
something like this:
<a href="nojs.html" onclick="displayForm();return false;">Display</a>
This way, if JavaScript is off, the browser will navigate to the page
"nojs.html", where you present the user with a standard HTML form with a
submit button. If JavaScript is on, the HREF will be ignored (thanks to
the "return false", and the function displayForm will be executed,
allowing the user to enter his data without having to wait for a postback.
HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog:
http://www.galasoft-LB.ch
PhotoAlbum:
http://www.galasoft-LB.ch/pictures
Support children in Calcutta:
http://www.calcutta-espoir.ch