windows.open问题 [英] windows.open problem

查看:137
本文介绍了windows.open问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的页面上有一个链接.单击后会打开一个弹出窗口.
在该窗口中,我有一个grid.i,它从用户那里获得了所选行的值,然后该值显示在具有链接的计程车框中的上一页中.
现在我的问题是弹出窗口只能打开一次,而且从gridview中获得的值也不容易获得.

我该怎么办?

问候,
Amol



I have a Link in my page.On click of which one pop up window opens up.
in that window i havea grid.i get the value of the selected row from the user and then this value is shown in the preivious page in a taxt box which has the link.
Now my problem is the pop up window only opens once.and also the value from the gridview is not easyily recieved.

What whud i do??

Regards,
Amol

推荐答案

本文应为您提供帮助:
在子窗口关闭时通过AJAX(ASP.NET 2.0)对父页面进行部分更新-有条件地 [ ^ ]

您需要使用Javascript从子页面更新父页面.
This article should help you:
Partial update of parent page via AJAX (ASP.NET 2.0) on close of a child window - conditionally[^]

You need to update parent page from child page using Javascript.


Amol,

如果可能的话,为什么不创建用户控件而不是弹出窗口.并使用样式(position:absolute)显示控件以浮动控件,并在网格的click事件上使用以下代码设置原始页面文本框-

Amol,

If possible why don''t you create a user control instead of the popup. And show the control using styles (position:absolute) to float the control and on the click event of the grid set the original page textbox, using the code like -

((TextBox)Page.FindControl("textbox1")).Text = "your value";



而且,如果您不想使用该控件,而又不想使用该窗口.窗口实例名称可能存在问题,每次打开新窗口时都要更改窗口实例名称.像在
中操纵并为"winname"使用不同的值



And also if you don''t want the control, and want to use the window. There may be issue with the window instance name, change the window instance name each time you open a new window. Like manipulate and use different value for ''winname'' in

winname = "win"+<some unique of your own logic>;
window.open(url,winname);



并在子窗口中使用opener.document.getElementById()方法设置父窗口字段.



And use the opener.document.getElementById() method in the child window to set the parent window fields.


这篇关于windows.open问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆