Hello,
I have a custom control that is used to select a location from a list
of locations. When put on the page it creates an asp:textbox (used to
display the name of the location), a hidden field (which stores the
primary key of the location from the DB) and an image button. When you
click the image button a popup is created that allows you to select an
item from a complex screen (tabbed interface, etc).
The important thing is that when you have selected the location you
wish and click on the "Select" button in the popup it tries to call
_doPostBack on the Parent Window and then close itself. This works
fine as long as you have some form elements on the page the "force"
asp.net to put the __doPostBack function on the page. But, if you
don't have these items then __doPostBack is not created on the page,
and the child window fails by trying to call a parent method that
doesn't exist.
I need a way to force the "parent" page to create the __doPostBack
method whether it thinks it needs it or not.
I looked into GetPostBackClientEvent, but I don't think I can use it
since I am in a child window.
Any suggestions?
Thanks.
--Nathan 3 7388
I am using RegisterClientScriptBlock
and in it I use window.opener.document.forms[0].submit();
this will allow the parent window to post back.
"Nathan Burleson" <na*************@yahoo.com> wrote in message
news:fc**************************@posting.google.c om... Hello,
I have a custom control that is used to select a location from a list of locations. When put on the page it creates an asp:textbox (used to display the name of the location), a hidden field (which stores the primary key of the location from the DB) and an image button. When you click the image button a popup is created that allows you to select an item from a complex screen (tabbed interface, etc).
The important thing is that when you have selected the location you wish and click on the "Select" button in the popup it tries to call _doPostBack on the Parent Window and then close itself. This works fine as long as you have some form elements on the page the "force" asp.net to put the __doPostBack function on the page. But, if you don't have these items then __doPostBack is not created on the page, and the child window fails by trying to call a parent method that doesn't exist.
I need a way to force the "parent" page to create the __doPostBack method whether it thinks it needs it or not.
I looked into GetPostBackClientEvent, but I don't think I can use it since I am in a child window.
Any suggestions?
Thanks. --Nathan
I am using RegisterClientScriptBlock
and in it I use window.opener.document.forms[0].submit();
this will allow the parent window to post back.
"Nathan Burleson" <na*************@yahoo.com> wrote in message
news:fc**************************@posting.google.c om... Hello,
I have a custom control that is used to select a location from a list of locations. When put on the page it creates an asp:textbox (used to display the name of the location), a hidden field (which stores the primary key of the location from the DB) and an image button. When you click the image button a popup is created that allows you to select an item from a complex screen (tabbed interface, etc).
The important thing is that when you have selected the location you wish and click on the "Select" button in the popup it tries to call _doPostBack on the Parent Window and then close itself. This works fine as long as you have some form elements on the page the "force" asp.net to put the __doPostBack function on the page. But, if you don't have these items then __doPostBack is not created on the page, and the child window fails by trying to call a parent method that doesn't exist.
I need a way to force the "parent" page to create the __doPostBack method whether it thinks it needs it or not.
I looked into GetPostBackClientEvent, but I don't think I can use it since I am in a child window.
Any suggestions?
Thanks. --Nathan
Hello Ather,
Thanks for the quick response. However, in my case I can not just
submit the form as there may be Validators on the "parent" page. I did
find a solution for your future reference.
I perform the following call inside the container page which houses
the child control:
Page.GetPostBackClientEvent(LC1, "")
LC1 refers to the child control. This forces asp.net to put the
__doPostBack client javascript onto the page.
Thanks again for your help.
--Nathan
"Ather Ali Shaikh" <at*******@eintelligencesoft.com> wrote in message news:<#m**************@tk2msftngp13.phx.gbl>... I am using RegisterClientScriptBlock and in it I use window.opener.document.forms[0].submit(); this will allow the parent window to post back.
"Nathan Burleson" <na*************@yahoo.com> wrote in message news:fc**************************@posting.google.c om... Hello,
I have a custom control that is used to select a location from a list of locations. When put on the page it creates an asp:textbox (used to display the name of the location), a hidden field (which stores the primary key of the location from the DB) and an image button. When you click the image button a popup is created that allows you to select an item from a complex screen (tabbed interface, etc).
The important thing is that when you have selected the location you wish and click on the "Select" button in the popup it tries to call _doPostBack on the Parent Window and then close itself. This works fine as long as you have some form elements on the page the "force" asp.net to put the __doPostBack function on the page. But, if you don't have these items then __doPostBack is not created on the page, and the child window fails by trying to call a parent method that doesn't exist.
I need a way to force the "parent" page to create the __doPostBack method whether it thinks it needs it or not.
I looked into GetPostBackClientEvent, but I don't think I can use it since I am in a child window.
Any suggestions?
Thanks. --Nathan This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: HarveyB |
last post by:
I would like to generate non-modal popup windows from
ASP.Net code-behind. I have tried using Client Side
scripting like "function Test(){
window.open('test.htm',_blank,...
|
by: MEM |
last post by:
Hello,
I'd like to refresh the main or top most browser window from a child
window. Specifically, child popup A is opened by a main browser window
then child popup B is opened from within child...
|
by: Colin Graham |
last post by:
Hi guys,
Just a quickie here that i hope someone can help me with. Basically i
want stop the user from closing the popup window using the small x
button in the top right hand corner. Im aware...
|
by: Davey |
last post by:
I have a website which has a popup window (this only opens when the user
chooses to open it). In the popup window I have a <select> control which
lists a selection of "classes". Each class has a...
|
by: Nathan Burleson |
last post by:
Hello,
I have a custom control that is used to select a location from a list
of locations. When put on the page it creates an asp:textbox (used to
display the name of the location), a hidden...
|
by: Earl Teigrob |
last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
|
by: midnight_use_only |
last post by:
hi all,
quick question, how do you submit a form to a parent window from a
child popup window? i have the following and all online documentation
*suggests* that it should work but it does NOT:
...
|
by: adamredwards |
last post by:
I have a page with some form elements that are dynamically generated.
They are inserted into the dom by first cloning a node, changing the
values like name, and then inserted with insertBefore().
...
|
by: Jimmy |
last post by:
It is also possible for popup window to call function in main window
by using the opener property. Will "opener.someFunctionInMain(param1,
param2)" in the popup window work?
It's possible for...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |