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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

submit, close popup and update parent

Status
Not open for further replies.

ifntech

Programmer
Nov 4, 2004
80
US
I need the code to use on a popup for an insert or update page to.
On popup
When you hit submit.
It either updates or inserts the record.
Then closes the popup.
Then refreshes the window or layer you came from.

thanks
 
Just create a normal insert/update page. Then have that go to another page that has the close window and refresh code below
Code:
onLoad="opener.location='whatever.htm';self.close()"

Just add that into the body tag and off you go

[Peace][Pipe]
 
This doesn't have the intended affect I needed.
Let me clarify.

I have a list then I want to add a note to the record on the list.
I have a link that says ADD NOTE.
This then popups an insert page.
I then enter my note.
Then when I hit the ADD or Submit button I want it to insert the record, close the popup and then refresh the list page I still have open.

The response when added instantly closes the popup and goes to the whatever.htm page I put in there.
I want the code to occur when I hit the submit not on the open.

I'm also using the built in server behaviors in Dreamweaver MX so something that works with them would be preferable.

Thanks again,
Dan
 
Dont put that code into the same page as your insert/update. create a new page with that code in and Go To this new page after doing your insert.

[Peace][Pipe]
 
Thanks for the help that worked.

One issues is you loose all string variables from the original page any easy way to use it like a history back and then refresh so I don't have to always know the prior variables.

Also I have to make a temp page for every page I want to do this for.
Have you ever used a variable or table to save the prior page and string variables.

Dan
 
You could use session variables (high server load) cookies (user may have them turned off) or you could just keep adding them to the url and use javascript to read them and keep them being passed about.

[Peace][Pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top