javascript popup using struts

2

2rajesh.b

I have a page which calls an Action in the standard way.
However in some situations, ie as a result of logic executed in my
Action class, I need to
generate a popup window on top of the page before proceeding. Is it
possible to do this from within my action?
 
M

Manish Pandit

Hi,

A solution you could consider is that put an attribute in the request
in the action, and on the page you're forwarding to, check for that
attribute and in the body.onLoad display a popup based on that
attrbute. Your JSP will need to check for the attribute to render the
body onload tag conditionally.

Normally popups are either a result of end user interaction (clicking a
link) or are event driven (body onload..or something of similar
nature).

-cheers,
Manish
 
A

Andrew Thompson

Manish Pandit wrote:
....
Normally popups are either a result of end user interaction (clicking a
link) or are event driven (body onload..or something of similar
nature).

Historically they were usually the result of web site makers
that delivered content from advertisers.

'Pop-up ads'.

Because end users hated Pop-up ads with a vengeance,
there are now a slew of ways to kill pop-ups, from configuration
settings in browsers, to firewalls and security software that
will screen (and edit) incoming HTML, to browser plug-ins
that kill or control pop-ups.

Any web application based on pop-ups will
a) have a high failure rate
b) present a continual maintenance burden

I suggest instead. Don't hava a web-app. rely on pop-ups -
don't have a web app. produce pop-ups. When the user's
data has a validation error, simply disable the 'submit'
button and highlight the field.

Andrew T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top