December 2nd, 2012, 12:39 PM
I have a page with multiple items generated by php. There is a button for the user to add notes to a record which does a window.open to a little popup to add notes.
On this notes page the form submits back to the parent parent page and the window closes.
So obviously it's something else I can't figure it out.
Also, for those that recommend a modal, the parent page is a "feed" and refreshes every 30 seconds so any form must be separated from it.
Name the parent page:
Link from parent page to popup:
Form on edit page to submit back to parent page:
<a href='#' onclick=\"window.open('customernotes.php?lead_id=$lid&fname=$fname&lname=$lname&cusstatus=$cusstatus&id=$id&cusnotes=$cusnotes','win$lid','width=400,height=300,resizeable=no,menubar=no,scrollbars=no,addressbar=no');\" class='eeditnotes' style='font-size:11px;font-weight:bold;color:white;'>Edit my notes</a>
Remember, this all works perfectly except when you click the button a second time for only that particular record no pop-up window comes up. All records do.
form method=POST action='productdisplay.php?id=$id' target='pd' onSubmit='window.close();'>
December 2nd, 2012, 12:53 PM
Coffee kicked in. Realized I hadn't encoded my URL's. Punctuation causing problems.
December 2nd, 2012, 04:50 PM
Congratulations on figuring it out and thanks for telling us what the solution was.