Pass Variable to Pop-up window

Hello, I will try to give a detailed description of what I am looking to do...Hopefully someone can steer me in the right direction.

I have a .asp page that returns results from a database.  Basically, it is a bunch of short statements.  Each 'field' in the database is a short statement.  There are approx 10 short statements in each Query that is returned on this page.

Example: page returns this type of information

Statement1: blah blah blah blah

Statement2: blah blah blah blah

Statement3: blah blah blah


Now what I would like to do, is to have the user be able to click on the statement details for each statement and have a pop-up window open up where they can be presented with the text in a textbox.  From there, they will be able to modify the text as they see fit. Then, close the pop-up window box and have the original page return the new results.

Can someone help me with this ?  I am sure that this is possible, but i have yet to figure out how.

Thank you in advance for your help
BanBear
BanbearAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arantiusCommented:
0
RoonaanCommented:
Why using a difficult popup kind of mechanism and not just use a textfield in the firstplace?
0
BanbearAuthor Commented:
Thanks for the reply's.... The text is from the database.

You see, the user is selecting from several different already pre-setup responses.  The user selects the 'response plan' that fits their needs.  It will come with a prefilled text, however, they will have the option to modify the text as necessary.  

What I would like to do, is to have the pop-up window show the pre-filled text in a textbox, then the user can make the changes as they see fit.  Once they make their changs, they will click the "close window" button and that will return them to the parent window.  The parent window will now display the new edited text.

make sense ?
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

RoonaanCommented:
Easiest would be when each text has an associated unique id at database level. You would then just have some popup which is called like popupedit.php?editid=UNIQUE_ID or popupedit.asp?editid=UNIQUE_ID.

popupedit then reads the text from database, and does the writeback to the database.

Often this just involves a <form method="post"> at the popup. When you receive a submitted form you would just output an additional javascript block which says:
<script type="text/javascript">window.opener.location.href = window.opener.location</script>
This forces the parent window to reload after some new value has been inserted into the database.

-r-

0
BanbearAuthor Commented:
i have increased the points value to see about getting some much needed assistance.


thanks
0
prsupriyaCommented:
Hi!
As your statement text is not too long, you can pass the text to the pop up window like this.

<form name="frm1" method="post">
<a href="popwin.xxx?st=1&stext=blah1 blah1 blah1 blah1" target="_blank">Statement1:</a> blah1 blah1 blah1 blah1<bR><bR>

<a href="popwin.xxx?st=2&stext=blah2 blah2 blah2 blah2"  target="_blank">Statement2:</a> blah2 blah2 blah2 blah2<bR><bR>

<a href="popwin.xxx?st=3&stext=blah3 blah3 blah3 blah3"  target="_blank">Statement3:</a> blah3 blah3 blah3 blah3<bR><bR></form>

In popwin.xxx you can write

<form action="popwin.xxx" method="post">
      <input type="text" value="url.stext" name="st1"><br>
      <input type="hidden" value="stid" name="url.st">
      <input type="submit" value="Submit" name="submit">
</form>

Insert the updated value into the database with the posted stid as a reference id and at the end of the page write <script> window.opener.document.location.reload();
self.close();</script> to refresh the main window.

Hope this helps.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Internet Marketing

From novice to tech pro — start learning today.