Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.open(), form...,submit...,process...,close window & refresh

Status
Not open for further replies.

josel

Programmer
Oct 16, 2001
716
US
Howdy!

I almost asked and detailed my problem right on the subject. ;-)

OK, the scenario:
From PageA link to open a popup (PopUp) window
PopUp presents end-user (USER) with neat simple form
USER submits form
PopUp shows message and give USER option to close window

So far, no problem (I am so proud of myself). What I want to do is onSubmit="window.close()" & refresh original page thus loading the information just submited within PopUp form.

To see what I am working with, feel free to visit
... Try adding a new question and see what happens. Perhaps, this way you will get a better picture of what I am looking to do.

Thanks;



Jose Lerebours



KNOWLEDGE: Something you can give away endlessly and gain more of it in the process! - Jose Lerebours
 
Interestingly enough, I had just opened the CF forums looking for almost exactly the same code, only I am starting from scratch. Could you post a sample of what you have to get me started? Basically I want to have the user click on a link in a table to make an assignment for that cell (like a date picker), have it open another window to select what data to enter in that cell, save it to the DB, then update the original page.

This sounds very close to what you want to do, so any assistance would be greatly appreciated!

Thanks,
MG
 
Hello MorganGreylock!

I am getting this done by using JS. All I am using is:

Code:
<script>
//Popup Window Script
//By JavaScript Kit ([URL unfurl="true"]http://javascriptkit.com)[/URL]
//JavaScript tutorials and over 400+ free scripts

function popAddFAQ(){
var popurl="/addFAQ.cfm"
winpops=window.open(popurl,"","width=610,height=520,")
}
</script>

My link looks like this:
Code:
<a href="javascript:popAddFAQ()">Submit New FAQ!</a>

Notice that the function popAddFAQ() opens the window invoking addFAQ.cfm page (this is done dynamically using <cfoutput> commands).

Once the window is active, it behaves just like any other page. Anything you serve, will be served in this window. So, when my action page is served, I am able to stay within the window and proceed as needed (except of course, for what I am looking for).

To learn more about popup windows and stuff see


Jose Lerebours


PS: In trying to find the samples I followed, I think I came across what I need here:



KNOWLEDGE: Something you can give away endlessly and gain more of it in the process! - Jose Lerebours
 
Thanks a lot Jose, that was a big help... I guess I didn't think about using Javascript. I was in a Cold Fusion frame of mind.

Thanks again,
MG
 
Try something like this

< a HREF="javascript:window.opener.location='/faq.cfm';self.close();>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top