How can I open the new window after submit() finish

This is a discussion on "How can I open the new window after submit() finish" within the JavaScript Forum section. This forum, and the thread "How can I open the new window after submit() finish are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Feb 5th, 2007, 07:37
New Member
Join Date: Feb 2007
Location: Beijing
Age: 27
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
How can I open the new window after submit() finish

There is a 'save' button, and hope after user clicking it, the page save all the form's property value, then rediect to another page or open a popup window.
But, sometimes, b'cas the action have a little bit slow, so before action finished, the new window was opened and form's property are lost. How can I resovle it. How can I open the new window after submit() finish?

My script is:

function saveData(){
document.forms[0].mode.value = 'Save';
document.forms[0].submit();
}

function saveBtnOnclick()
{
if (confirm("Please save the data first.")){
saveData();
return true;
}else{
return false;
}

var newwin = null;
var newwinURL = "<%=appContext%>/do/....";
newwin = window.open(newwinURL, "addNewContact", "width=800,height=500,scrollbars=yes,toolbar=no,bo rder=0,status=0");
newwin.focus();
}
Reply With Quote

  #2 (permalink)  
Old Feb 5th, 2007, 21:56
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: How can I open the new window after submit() finish

What is the reason for redirecting to a new window after the form data is submitted?
Reply With Quote
Reply

Tags
javascript

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Submit options and open results in a new window xshane JavaScript Forum 2 May 21st, 2008 10:23
Open another new window from javascript window thehermitage JavaScript Forum 10 Jan 27th, 2008 19:42
Change open in new window to open in same window nsr500rossi JavaScript Forum 2 Jan 18th, 2008 14:13
[SOLVED] open new window from main window AdRock Other Programming Languages 1 Nov 1st, 2007 02:45
Open a new window pokerskatershark JavaScript Forum 4 Mar 17th, 2006 19:25


All times are GMT. The time now is 04:26.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43