473,499 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

script code not working while passing value from popup to opener page

1 New Member
I want to display fields(row) selected from grid in popup window to textboxes in Opener window.

I have written code as follows :

Main Opener window

Expand|Select|Wrap|Line Numbers
  1.  protected void Button1_Click(object sender, EventArgs e)
  2.         {
  3.  
  4.             Response.Write("<script>popUp=window.open('SearchUser.aspx?master=NONSAP_ApplMaster&PAGETYPE=textbox&emp_id=" +  txtEmpID.ClientID + "&emp_name=" + txtEmpName.Text.Trim() + "&postBack=false','popupuser','width=165,width=600,height=400,left=250,top=150,scrollbars=yes');</script>"); 
  5.  
  6.         }
  7.  
popup window:


Expand|Select|Wrap|Line Numbers
  1. protected void grdUserList_RowDeleting(object sender, GridViewDeleteEventArgs e)
  2.         {
  3.             string s1 = "";
  4.             string s2 = "";
  5.             s1 = "<script>window.opener.document.getElementById('" + txtEmpID + "').value='" + grdUserList.Rows[e.RowIndex].Cells[1].Text + "';</script>";
  6.          + grdUserList.Rows[e.RowIndex].Cells[2].Text;
  7.             s2 = "<script>window.opener.document.getElementById('" + txtEmpName + "').value='"  + grdUserList.Rows[e.RowIndex].Cells[2].Text + "';window.close();</script>";
  8.                       // Response.Write("<script>alert('HiddenField !')</script>");
  9.             Page.RegisterStartupScript("ClientScript", s1);
  10.             Page.RegisterStartupScript("ClientScript", s2);
  11.         }
  12.  
plz help me out i hve spent one day to solve this but still it is not working.
Nov 10 '08 #1
1 1417
acoder
16,027 Recognized Expert Moderator MVP
Rather than posting the server-side code, post the generated client-side JavaScript and HTML code.
Nov 10 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
4329
by: Raju V.K | last post by:
can I use javascript and PHP in the following manner to create a pop-up window: <--- in <head> </head> <script language=javascript> function popup(folder1, file1) {...
11
2806
by: Wentink | last post by:
Does anybody have a simple script that let's me popup a picture from a thumbnail? The ones i found are all very very complicated and messy in the source... Thanks, Tintin
1
2614
by: Martin John Brindle | last post by:
Is it possible to return a value from a popup window? I really need something that can do this and the behaviour of the createpopup method is perfect except i can't work out how to return a value....
4
10479
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...
4
1904
by: louise raisbeck | last post by:
I have this scenario (simplified) function addnewdata () { check for partial match already in db for information entered by user if (partialmatch succeeds) { open new window aspx page (using...
1
2208
by: billy | last post by:
Ok, here's the situation... I have a user control that contains two textboxes (one for a from date/time and one for a to date/time) and two image buttons. The user control itself is supposed to...
2
2316
by: sangram | last post by:
i need a javascript for popup window and how to pass value to that new window from old window .
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7178
Oralloy
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,...
0
7390
tracyyun
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...
1
4919
isladogs
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...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3103
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
302
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.