|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
how can i refresh window from another by just clicking button
thank u all for help |
|
#2
|
||||
|
||||
|
JavaScript
I don't think this is possible using ASP...
you should probably be looking for Client side Javascript to do something like that. I hope this is of any help |
|
#3
|
|||
|
|||
|
Yes you can refresh another window using client side scripting ie. Javascript or vbscript
All you have to do is name you windows. You have to name the windows when you open them in script. Then you reference one window from another. The following show that you can only refresh the page from the page that opens the window, or you have to ask the window that opened the window to change via a function. I guess this is for security reasons. The following code opens two windows and one child changes the href of the other with the help from the parent. The parent olso changes the href of one of its children. This can of course be used to refresh asp pages as well. parent.html Code:
<html>
<head>
<title></title>
<script language="javascript">
var win2;
function change(href){
win2.location.href = href;
}
</script>
</head>
<body>
<form>
<input type="hidden" value="8" name="y">
<input type="button" value="open1" onclick="win1=open('one.htm','title1','width=200,height=200');">
<input type="button" value="open2" onclick="win2=open('http://www.yahoo.com','title2','width=200,height=200')">
<input type="button" value="change1" onclick="win1.document.location.href='http://www.google.com'">
</form>
</body>
</html>
one.htm Code:
<html>
<head>
<title></title>
</head>
<body>
<form>
<input type="button" value="change2" onclick="opener.change('http://www.google.com');">
</form>
</body>
</html>
Here is an alternative version of one.htm I don't exactly know how you want to activate the refresh. Do you consider an <a> tag a button? Code:
<html>
<head>
<title></title>
</head>
<body>
<form target="title2" action="http://www.tucows.com">
<input type="button" value="change2" onclick="opener.change('http://www.google.com');">
<input type="submit" value="change2b">
</form>
<a href="http://www.tucows.com" target="title2">click</a>
</body>
</html>
__________________
-- ngibsonau Last edited by ngibsonau : February 27th, 2003 at 12:20 AM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > refresh window from another one |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|