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

Passing values to a new window and back again

Status
Not open for further replies.

pspringer

Programmer
Feb 21, 2001
3
US
Hello! I will try to explain this as clearly as possible. I have a window that is currently open, when a user types in a value and clicks on the 'find' button this pops up a new window and displays possible matches all with radio buttons. Now my problem is when the user clicks on the radio button and hits the 'accept' button, the window closes, but I can't seem to pass the (radio)selection value back to the original window. I want to use this value to do queries from my database. Here's the function that closes the window...
<SCRIPT LANGUAGE=vbscript>
function closewindow()
dim value
dim i
for i=0 to document.all.item(&quot;BlockMatch&quot;).length-1
if document.all.item(&quot;BlockMatch&quot;,i).checked=true then
value=document.all.item(&quot;BlockMatch&quot;,i).value
window.opener.document.all.item(&quot;FoundBlock&quot;).value=value
exit for
end if
next
window.close
end function
</script>

Right now I have FoundBlock as a hidden field in the original window. I hope this make some sense. Thanks for any help!!!
 
Hi there

pass the items through the querystring then it will be easy to acccessw them

Regards
Abhishek Unicorn11
abhishek@tripmedia.com

[red]Luck is not chance, it's toil; fortune's expensive
smile is earned.[red]
 
Well, I thought passing this through to the query string would be the most simplified way of passing my values back, but how do I do that when using window.opener?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top