470,625 Members | 2,106 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,625 developers. It's quick & easy.

Need some pop-up javascript/php help

Is there a technique for this?

Take a standard order-entry. You have your "header" info with the PO number,
and Tax rate, etc. and then you have one to many item lines. Currently I do
it all on one screen, but this is a PITA when an order has a lot of items as
it results in a lot of server-trips as well as scroling.

Everything is written in PHP.

What I'd like to do is have the "add new line item" and the "edit line item"
buttons create a pop-up where the user can enter, say up to ten times per
screen (that part is easy). Then when they click the submit button, the pop
closes and the bottom screen (with the PO number and Tax rate, etc.) gets
updated with line items.

I'm an accomplished PHP coder but my html and my javascript are not at the
same level. Is there some "magic" out there that makes all of this easy? Is
there some javascript that will close the pop, close the under-window, and go
back to server where I can update a database and re-direct the user to a new
(i.e. updated) order-entry screen.

The only alternative I know of would be to instruct the user with a "Please
Press the Recalc Button On Main Screen After This Pop-Up Closes" message.
But that seems so lame.

Thanks for any ideas, links, examples, etc.

Jul 17 '05 #1
1 1625
"Al C." <no*************@adams-blake.no.spam.com> wrote in
Thanks for any ideas, links, examples, etc.

theres lots of javascript for stuff like this. just do a google search on
accessing and passing form variables betwen windows. example: on the child
popup, if you want to pass a value to a form on the parent, use

window.opener.document.parentformname.formboxname. value = value;
value on the child window could be


if you want to do alot of these, have the newvalue form in the popup. on
clicking a button, or a simple text link with javascript funtion as the
link, use onclick to call a function that will pass the values in the form
as shown above.
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Roy Smith | last post: by
1 post views Thread by spencer | last post: by
2 posts views Thread by John Hoge | last post: by
15 posts views Thread by Stig Brautaset | last post: by
11 posts views Thread by Vijay Kumar R Zanvar | last post: by
25 posts views Thread by Nicholas Parsons | last post: by
7 posts views Thread by Scott | last post: by
20 posts views Thread by merrittr | last post: by
reply views Thread by Gabriel Genellina | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.