473,414 Members | 1,688 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

"Popup" window

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

Feb 28 '07 #1
6 1531
Hi,

Guy wrote:
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
Feb 28 '07 #2
Thanks.

I suppose the DIV option and "To have a safe site in case ..." are two
different options?

When using DIV I suppose then putting it fe near a field where one would
like selecting info?

"Laurent Bugnion [MVP]" wrote:
Hi,

Guy wrote:
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
Feb 28 '07 #3
Hi,

Guy wrote:
Thanks.

I suppose the DIV option and "To have a safe site in case ..." are two
different options?
No.The example of link I provide displays the DIV if JavaScript is
enabled. If JavaScript is disabled, it redirects to a HTML page, where
the user can enter his information anyway. So this is safe: It's
comfortable if JavaScript is enabled, less comfortable if it's disabled,
but it works in both cases.
When using DIV I suppose then putting it fe near a field where one would
like selecting info?
I am not sure exactly what you mean. The idea is to put the fields into
the DIV. The DIV is hidden. User clicks the link --the DIV is
displayed (it's like a pop-up, but inline). User fills the fields and
submit the form.

If JavaScript is off, DIV is not displayed. User is redirected to static
HTML form. User fills the fields and submit.

Does it help?

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
Feb 28 '07 #4
normally you both display and move the popup. if you have selects
(dropdowns) then you need to use a floating iframe, or hide them (as
they will show thru the div).

-- bruce (sqlwork.com)
Laurent Bugnion [MVP] wrote:
Hi,

Guy wrote:
>Thanks.

I suppose the DIV option and "To have a safe site in case ..." are two
different options?

No.The example of link I provide displays the DIV if JavaScript is
enabled. If JavaScript is disabled, it redirects to a HTML page, where
the user can enter his information anyway. So this is safe: It's
comfortable if JavaScript is enabled, less comfortable if it's disabled,
but it works in both cases.
>When using DIV I suppose then putting it fe near a field where one
would like selecting info?

I am not sure exactly what you mean. The idea is to put the fields into
the DIV. The DIV is hidden. User clicks the link --the DIV is
displayed (it's like a pop-up, but inline). User fills the fields and
submit the form.

If JavaScript is off, DIV is not displayed. User is redirected to static
HTML form. User fills the fields and submit.

Does it help?

Laurent
Feb 28 '07 #5
thx.
its more or less clear.
but since I only want selecting a name, ... from the inline "popup", I
suppose, in case JS is not enabled in a user's browser the alternative html
page makes less sense?

Guy
"Laurent Bugnion [MVP]" wrote:
Hi,

Guy wrote:
Thanks.

I suppose the DIV option and "To have a safe site in case ..." are two
different options?

No.The example of link I provide displays the DIV if JavaScript is
enabled. If JavaScript is disabled, it redirects to a HTML page, where
the user can enter his information anyway. So this is safe: It's
comfortable if JavaScript is enabled, less comfortable if it's disabled,
but it works in both cases.
When using DIV I suppose then putting it fe near a field where one would
like selecting info?

I am not sure exactly what you mean. The idea is to put the fields into
the DIV. The DIV is hidden. User clicks the link --the DIV is
displayed (it's like a pop-up, but inline). User fills the fields and
submit the form.

If JavaScript is off, DIV is not displayed. User is redirected to static
HTML form. User fills the fields and submit.

Does it help?

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
Mar 1 '07 #6
You can also find help with the Ajax SDK if you want to use JavaScript stuff
without coding it and with the possibility to use it as server controls :
http://ajax.asp.net/ajaxtoolkit/

Ornette.

"Guy" <Gu*@discussions.microsoft.coma écrit dans le message de
news:A6**********************************@microsof t.com...
thx.
its more or less clear.
but since I only want selecting a name, ... from the inline "popup", I
suppose, in case JS is not enabled in a user's browser the alternative
html
page makes less sense?

Guy
"Laurent Bugnion [MVP]" wrote:
>Hi,

Guy wrote:
Thanks.

I suppose the DIV option and "To have a safe site in case ..." are two
different options?

No.The example of link I provide displays the DIV if JavaScript is
enabled. If JavaScript is disabled, it redirects to a HTML page, where
the user can enter his information anyway. So this is safe: It's
comfortable if JavaScript is enabled, less comfortable if it's disabled,
but it works in both cases.
When using DIV I suppose then putting it fe near a field where one
would
like selecting info?

I am not sure exactly what you mean. The idea is to put the fields into
the DIV. The DIV is hidden. User clicks the link --the DIV is
displayed (it's like a pop-up, but inline). User fills the fields and
submit the form.

If JavaScript is off, DIV is not displayed. User is redirected to static
HTML form. User fills the fields and submit.

Does it help?

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
Mar 2 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: P-O | last post by:
Hi! I want to open the "Find" window in MSIE to allow a user to find text on the page they are looking at (Ctrl+F). Any sggestions for the easiest possible way? /P-O
0
by: yotaxp | last post by:
Hello, everyone. I've been trying to get a popup editor going for a control I'm working on. I don't mean a design-time editor for properties, though that would be a good example of what I'm...
3
by: dhnriverside | last post by:
Hi peeps I'm developing an intranet application which uses a main window and various popups created with javascript ( window.open() ). When the user saves what they are doing in the popup, i...
2
by: Simon Verona | last post by:
I have a problem, best explained by example. I have a usercontrol which contains a text box and a button. If the button is clicked then the calender control is displayed as a "popup" so that a...
3
by: bdog4 | last post by:
I've seen on some php forums that they use some type of popup box that I assume is javascript to display a animated gif/flash when you do a quick edit. My popup blocker does not detect it so I...
7
by: rob c | last post by:
Hi Does anyone know what triggers a "popup blocker"? I'm going to be opening some sub-windows from my main page and don't want to get caught in a blocker. Thanks Rob
1
by: ranabhavin2 | last post by:
Hi, on button click I want to open new window each time. Currently when I m click on button second time then my new window is replaced with my original window. We can do it in hyperlink by ...
1
by: beydtha | last post by:
Is there any code to get rid of such Popup block message ,,,,,,,,,,, that are shown at the time of openning a web site. would u plz help me to have such code ... ?
1
by: Larry Bud | last post by:
Is there a slick way to add rollover info popup when someone rolls over a particular column for a particular row in a GridView? For example, I have a "status" column, which ranges 1-5. I don't...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.