Is it possible refresh page in another frame

  • Thread starter Thread starter AndrewV
  • Start date Start date
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.
 
simple html 101.

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

-- bruce (sqlwork.com)
 
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.
 
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
 
Great advices, I got it to work now. Really appreciate it Bruce, Ajay,
Kevin. Have a great day guys.
 
Back
Top