Myself, Sajal Soni, working as a IT professional in one of the reputed firm in our field. I have completed my Engineering in Computers descipline.
I usually deals with development of Web based Applications. I always like to work in complex RDBMS Applications, RIA Applications, Web 2.0 stuff and Open sources like Joomla, Drupal and WordPress of course.
Please find some helpful and informational content on this site, As I promise to provide you some of the valuable information on different technologies.
C ya soon, Happy Blogging!!
Hi Sajal Soni,
I was just reading a post by Arafat Rahman about Submitting HTML form to pop up window on http://arafatbd.net/post-item/27/submit-html-form-to-pop-up-window/ . I just couldn’t understand how it works no matter how carefully I try to look but I see from your comment that you already had it working.
Can you tell me what the … should look like or when & where do I call the js function openWindow? I would really appreciate your help.
Please post your answers here to me or mail me on asteway.negash@gmail.com or myhomi@gmail.com
Dear Asteway,
Most important part in your form code is,
target=”popupWin” in the form tag. When you define your tag, please specify target=”POPUP_WINDOW_NAME”. POPUP_WINDOW_NAME is the name of popup window which you should open when some one clicks on the submit button.
So, When you click on submit button, it will submit the form to pop up window which is having “popupWin” name.
Process is like this,
i) Specify target attribute in your tag.
ii) Define submit handler (simple submit button function) like below.
function openWindow(url, wname) {
window.open(url, wname);
return true;
}
iii) When you click on submit button, it will call openWindow function, which will open the window with name equal to wname (in our case it will be popupWin), like
< input type=submit onclick="return openWindow('thank-you.php', 'popupWin'); "
you should have print $_GET to see form is submitted
I have emailed you the example, since wordpress is stripping the html tags
Thank you so much, it works perfectly.
Glad it worked!!