Passing values between windows

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

Hi, Here is what I am looking to do:

You have a form where you are entering data, and so far everyone agrees it owuld be nice to have a built in calculator for that value, as there is always soemthing to add up. (different type accounts cacluate stuff differently).

Well I would like it so that they can click on a link called "calculator" and it pop up a new window where they can use the calculator based on their account. Then when they are done, they click a "save" button or something, and that closes that window, and automatially places the code back into the form's textbox on the original page.

I have it where it can open the new window with the calculator, and when they click save it takes the value and copies it to clipboard and then closes the window, but they still have to paste it in the original form.

I would prefer to do this all nice and pretty with CSS and layers, that way if they hit calculate again, technically all the values they entered into the calculator should still be there. But I would settle for doing this with actually opening a new window and passing the value.

In either case, I need to find a good exmple of this somewhere. (I learn best from examples Wink

If anyone has suggestions on a site they have seen that does something similar to this, I would greatly appriciate it!.

-Greg

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

Ok, I think I came across what I needed in the final post on this thread: http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20186800.html

It used the showModalDialog() function. Anyone know what all cross browser compatibility this has? Something just IE?

-Greg

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.