• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

javascript popup window

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
there is a reqirement in my current project where
we need to diplay a poppup survey page for every
10th customer hitting the site. iam using cookies
in the servlets. can anybody tell me what could be
the better approach of using the javascript in the jsp code. i mean, whether javascript.window.open or any other specific way of doing it.can we do anything in javascript for making the user not to be able to use the regular
site unless he cancels or uses the popup window.
thanks in advance
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like you are now trying to push business rules to the client side, so I would say "No".
Actually I would say "You may end up finding a way to do it at the client side, but it would be a poor design and would likely cause you problems later on".
I would suggest using a Model-View-Controller architecture at the server side, and using the Controller to decide whether to display the page the client requested or the survey.
The advantage here is that regardless of whether they reload the page or close the browser and start again, the server knows they haven't filled the survey and can keep sending it to them.
DOM
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic