473,803 Members | 3,899 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"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 1552
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="displa yForm();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="displa yForm();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*@discussion s.microsoft.com a écrit dans le message de
news:A6******** *************** ***********@mic rosoft.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
2312
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
1248
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 aiming for. I need a control or form to pop up over the form, with input focus, without allowing the parent control to appear unfocused. It would be better to go by example, so think of the context/main menu, the drop-down from a combo box, and a...
3
5221
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 use opener.location.reload() to refresh the parent window. Most of the time this works fine, but one parent in particular always asks if we want to refresh the window (re post the form data), and I get that "retry / cancel" dialog box.
2
2315
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 date can be chosen. This replicates the date-picker control except that it has other checks in it (my user control also has the ability for other data types with other "popups" for validation).... The problem is that if the user control is at...
3
25493
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 leads me to believe it is javascript. Does anyone have an ideas on how I can do this or an example/tutorial? They use it on Invision Power Boards Thanks
7
8477
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
4683
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 target="_blank". But what for button ? So, each time new popup window should be open. My code is as following :
1
2055
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
2256
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 want to put the status desc in the column, just the number, but I want the user to be able to roll over the value and have the description popup in a <div> Clearly this is client side, but thought there might be an easy way to do it.
0
9700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10546
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10310
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10068
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.