passing parameter to a popup window without using querystring

J

Joe Abou Jaoude

hi,
I have a search page im asp.net. the user enter the criterias in
textboxes and dropdownlists and on submit i want the results to be
displayed in a popup window.

so the easy way is to pass the criterias in a querystring to the new
window. but if it's possible i don't want to use query string.

in asp, i could use the folowing:
i open a temporary blank window, on load I take the values of the search
page using the window.opener and submit them to the server.
Unfortunately this can't be done in asp.net coz window.opener isn't
working.
so is there a way to do that ? or the only way is to pass the parameters
in a querystring ?

thx.
 
L

lallous

Hello,

I never tried that, however give it a shot and tell me how it works:

1)make a search button on your page w/ type = submit
2)onclick of that button do the following:
// create the pop-up window
// make sure you give it a name
window.open("searchresult.asp", "targetSearchResult",
"width=400,height=300");
// adjust your forms target and action as:
mysearchform.target = 'targetSearchResult';
mysearchform.action = 'searchresult.asp';
mysearchform.submit();


That way, you have pre-created a pop-up window w/ no purpose; later you
submitted the search queries (via POST method if you don't want queries)
into that pre-opened window with your height/width.

Hope that helps,
Elias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top