• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Window Focus

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have what I think is an interesting problem.
I'm submitting a form via email. After the form is submitted I need to open a new widow with a small thank you message in it and I need to redirect the page with the form to the home page of the website.
It would seem that all I need to do is open the new Window using the onSubmit listener of the form and include a redirection of the parent in the new Window. The problem is, is that internet explorer pops up a warning message about sending info over the web. This gives the focus to the form window and the Thank You window is no longer visible. How can I prevent this?
Also, a better way to do this would to only have the thank you message window open if the form is actually mailed. Is there a way to do that?
Thanks again,
Brian Podolny
 
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the action on the form? Is it a mailto:? If so, that can cause problems and IE will give you that warning. I have seen some browsers do some other funny things when you use a mailto: as the form's action. I would go away from that and try something different like JMail or SendMail, or CDONTS. That way it doesn't even involve your mail client, it uses the server to send the mail. Then you can have the action go to a page that does the send, and then on that page, if the mail was sent, you can pop-up a thank-you page, and have that page, redirect the parent to the home like you wanted. JMail is a nice little tool that I have used before to do something like that.
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi bill,
Can u tell what is "JMail" and where I can get the information about that
Rgds
Ram
 
bill bozeman
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JMail, from what I can remember about it, I used it about a year ago, is a Java application used to send mail. I used it with ASP and you can find some good info on it here:
http://www.15seconds.com/component/pg002042.htm
I haven't used it in a while, and I am not sure how to use it with JSP or something like that, but I would think that would be doable. I would take a look here and follow the links to see if you can find anything out.
Bill
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know if this will work in this particular scenario but instead of popping up the new window when onSubmit is fired call the function that pops up the new window when the page unloads...for eg the page with the form should have a body tag like <body onUnload="popup()">
and the onSubmit just navigates to the home page. The user will still have the warning pop up but the new window will not pop up until after the warning has been returned by the user.
ofcourse if you have your own webserver or you can access cgi scripts on the server there are a lot of freeware mail forwarding software available
manav
 
Good night. Drive safely. Here's a tiny ad for the road:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic