Is it possible refresh page in another frame

A

AndrewV

I have an html page that has 2 frames ("input" and "result"). In the "input"
frame, there is a text box and a button. User enters an id in the text box,
then click on the button. In the click event, I would like to call an
asp.net page, and passing in the text box value as a query string parameter
(http://mysite/mypage.aspx?id=x) and display the result in the "result"
frame. I couldn't find a way to do it. Please give me some pointer on how to
accomplish this.

Thanks very much in advance.
 
B

bruce barker

simple html 101.

<form target="result" action="mypage.asp">
<input type=text name="x">
<input type=submit value="press">
</form>

-- bruce (sqlwork.com)
 
K

Kevin Spencer

In a frameset, on the client side, you can refer to the other frames in
JavaScript by referring to the parent window and its frames Collection. So,
you can manipulate any other frame from a given frame with something like:

window.parent.frames("FrameName") or window.parent.frames(0)

and work with the document that way. For example, you could do what you're
saying by:

window.parent.frames("FrameName").location = "/someURL.aspx?this=that";

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
A

ajaymehra

You can do it on the client side by using Javascript.
On your button click event you can call a JScript function that will d
something like this

window.parent.result.location.href = "resultspage.aspx?"
[textboxinformation to be passed]

Ajay


*I have an html page that has 2 frames ("input" and "result"). In th
"input"
frame, there is a text box and a button. User enters an id in th
text box,
then click on the button. In the click event, I would like to cal
an
asp.net page, and passing in the text box value as a query strin
parameter
(http://mysite/mypage.aspx?id=x) and display the result in th
"result"
frame. I couldn't find a way to do it. Please give me some pointer o
how to
accomplish this.

Thanks very much in advance.

ajaymehr
 
A

AndrewV

Great advices, I got it to work now. Really appreciate it Bruce, Ajay,
Kevin. Have a great day guys.
 

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top