problem with getting the value from the Child Form

Hello,

   i Have one Dropdownlist and Button on my Child Window and i want to get the selectedvalue of this dropdrown in my Parents window on the click of button and also i want to closed the Child window. Here i writedown the code below.

Parent Window link 

<

input name="txtAirportCode" type="text" runat="server" class="formStyle1b" id="txtAirportCode" />

<a href="#" onclick="window.open('Airport.aspx?text=txtAirportCode,null,'width=800,height=400,left=270,top=180')">Change Airport </a>

 

and in my Child Window ('Airport.aspx)

<

asp:DropDownList ID="ddlAirport" runat="server" />

<asp:Button ID="btnSave" runat="server" Text="Select" OnClick="btnSave_Click" />

Now  function ( btnSave_Click) in my code behind...

protected void btnSave_Click(object sender, EventArgs e)

{

if (Request.QueryString["text"] != "")

{

string strScript = "<script>window.opener.document.forms(0)" + Request.QueryString["text"].ToString() + ".value = '";

strScript +=

this.ddlAirport.SelectedItem.Text;

strScript +=

"';self.close()";

strScript +=

"</" + "script>";

RegisterClientScriptBlock(

"anything", strScript);

}

}

 

So Please help me to get the value of dropdown from the child window to Parent window and also i wnat to close the child window.

 Thanks...

---SPP


SPP
0
SPPatel
5/8/2007 12:53:37 AM
asp.net.client-side 24353 articles. 1 followers. Follow

0 Replies
743 Views

Similar Articles

[PageSpeed] 2

Reply:

Similar Artilces:

problem with getting the value from the Child Form #2
Hello,    i Have one Dropdownlist and Button on my Child Window and i want to get the selectedvalue of this dropdrown in my Parents window on the click of button and also i want to closed the Child window. Here i writedown the code below. Parent Window link  <input name="txtAirportCode" type="text" runat="server" class="formStyle1b" id="txtAirportCode" /> <a href="#" onclick="window.open('Airport.aspx?text=txtAirportCode,null,'width=800,height=400,left=270,top=180')">Change Airport </a>   and in my Child Window ('Airport.aspx) <asp:DropDownList...

Getting Value from Client-side InputBox to .net variable
hi, im doing a login page for our timekeeping. Since there's no msgbox available on asp.net, im doing it dynamically via javascript. How do i Get the value frm a dynamically written javascript (such as inputbox) to a .net variable? here's the logic of my program, user logs in hits the button and sub-routine Login will be fired, if user is late -- call Check_Late Sub, this is whre the client-side script was built -- then after that i wanted to be able to get the value from an inputbox. '// if button login clicked Sub Login(Sender As Object, E As EventArgs) .......

how to get value from client side script Prompt window to a session var in .net
hi guyz, i hav a problem with getting a value from a client-side inputbox to a session var in .net. is this possible? however, when i click submit button this is the code that's triggered. dim sb as New System.Text.StringBuilder sb.append("<script language=" & """" & "vbscript" & """" & ">") sb.append(vbcrlf) sb.append(vbcrlf) sb.append("do while xLate =" & """" & """") sb.append(vbcrlf) '//prompt window, val...

How to get the Client side values in server side code.
Hi all, i have a proble i need to get the client side javascript values in C# code at server side. how can i pass those values? i am using version 1.1, i kno thatwe can use callback events mechnisam in 2.0 or ajax ,apart from that how we can pass? My problem is i need to stop the execution of the code based on after reciving values from the client   any ideas please???   Million thanks RamCheersRam MCP Hello Ram, a common approach is from javascript set an hidden field, then issue a postback. On the server-side, handle the post-back. Feel free to go deeper in your que...

Problem passing value client-side to server-side
I have a page that calls a pop-up while passing an encrypted value via a query string. The value is encrypted on the parent client-side in javascript so it needs to be decrypted client-side as well. This decryption occurs on closing the child (popup) and I am at a loss of when and how I should get this value to the server-side. On the popup you just want to process server side code? Anytime you can access for example the raw url:string raw = Page.Request.RawUrl;If you need to access any values on the client side you can access the url using javascript. Another idea is to, on the code beh...

Getting hidden variable value from server side in client side
hi,        I am struck in problem. I have a hidden field in my form and i am setting some value in that.         Now i wnt to use this value from client side but i m not able to retrieve it. All i am getting there is an object.         I feel the hidden field is not able to hold that value.         <input type="hidden" id="hdnVar" runat="server" />         in code behind      ...

Postback on Parent Form from Child Form client side javascript
I have 2 different .aspx files that require the input of a stock code. The stock code field on each form is defined as follows:- <INPUT id="txtStockCode" type="text" maxLength="30" name="txtStockCode" runat="server"> Next to the field on each form I have a clickable image defined as follows:- <IMG id="imgLookupStockItem" onclick="window.open('../frmLookup.aspx?Object=StockCodes')" src="../images/binoc.ico" name="LookupStockItem"> So when the user clicks on the binoculars image f...

Problem accessing server side array values from javascript client side function
i faced the following problem ..i have an array that store the values of a resultset row under the server side coding.How do i retrieve them under my client side javascript function.I wrote the following coding under my client side function and it got an error.BSCStr is an array storing data from a resultset row which i did under the server side coding. From client side function: addr=addr + "&C" + i + "=" + <%=BSCStr[i]%>; First of all, you can't mix server-side and client-side code. The reason is that the protocol that is used to communicate betwee...

Problem accessing server side array values from client side javascript function
i faced the following problem ..i have an array that store the values of a resultset row under the server side coding.How do i retrieve them under my client side javascript function.I wrote the following coding under my client side function and it got an error.BSCStr is an array storing data from a resultset row which i did under the server side coding. From client side function: addr=addr + "&C" + i + "=" + <%=BSCStr[i]%>;...

How to get value from client side
in my program I want to send a value to my modal popup, how can I do that? Thanks lyha Is it what you are looking for?http://forums.asp.net/thread/1618616.aspx Anish DevasiaMCP,MCAD---------------------------------------------------...

Client Side Get Value
I am trying to retrieve the current value of a textbox from my code behind and assign it to a variable. Currently I am using something like   dim id as new string  id = txtbox1.text.toString()  When I am loading the page I am checking for a cookie then putting the value of the cookie in the txtbox1. Currently when I use the code above it gets the value that was put in there by the cookie. Is there a way to retrieve the value if the user changes what the value is of that textbox? I know in Javascript there is  txtbox1.value But I am having trouble taking the value ...

Getting values from child form?
I have a few inputs for UserID, and when the user click on "Find", a child window will pop up. After selecting the UserID in the child window, how can I pass the value back to the parent form? some of my codes... <script language="JavaScript"> function openMe(URL) {   window.open(URL,"","width=350,height=400,status=yes,toolbar=no,menubar=no,scrollbars=yes"); } </script> <input id="txtApprover1" type="text" name="txtApprover1"/> <a href="javascript:openMe('Search_ID.aspx?control=txtApprover1');"><img style="WIDTH: 55px; HEIGHT: 15px" height...

pls help: how to get client-side HTML "text field" value from a server side button
i copy some javascript from somewhere so user can choose pick up a date from a calendar and display the date onto a HTML text field. I have no knowledge in writing client side script(i.e. write code in html) can i write some code in a server-side button to get the value in the HTML text field??? i tried: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click textbox1.text = document.getElementById("htmltext").value End Sub but "document" is highlighted, and say isn't declar yet. and...

How can I set client side values as server side values?
Hi, Can anyone tell me how I can get client side values such as document.referrer, navigator.appName etc... into server side scripts? There are some client side values I'd like to set as session vars and insert into the db? How do I go about this? Thanks for any pointers Davlon PS (I'm using powersite 7.1.0.300) Pass them as page parameters, e.g., http://myserver/myurl?document.referrer=whatever&navigator.appName=yadayada Then, in your server-side script, just loop through the document.value array and get these values. -- pbm_hopethishelps, Roy Kie...

Web resources about - problem with getting the value from the Child Form - asp.net.client-side

Is–ought problem - Wikipedia, the free encyclopedia
The is–ought problem in meta-ethics as articulated by Scottish philosopher and historian David Hume (1711–76) is that many writers make claims ...

iOS 9.2 ‘might’ fix the blackout problem some iPad Pros have, says Apple
... iOS Devices Check out 9to5Mac for more breaking coverage of iOS Devices . What do you think? Discuss "iOS 9.2 ‘might’ fix the blackout problem ...

Apple suggests iOS 9.2 will fix unresponsive iPad Pro problem
... by pressing and holding the Sleep/Wake and Home button for 10 seconds, until the Apple logo appears. With the release of iOS 9.2, that problem ...

FBI Director: Silicon Valley’s encryption is a “business model problem”
... attacks in Paris and California. Today, FBI director James Comey has suggested that Silicon Valley isn't faced with a serious technical problem, ...

Has Spotify found the perfect solution to its Adele problem?
It's official: Taylor Swift called Spotify's bluff . On Tuesday, The Wall Street Journal reported that Spotify is planning to allow some artists ...

Sure, he's a problem. But not so much that they can't make the best of it.
Sure, he's a problem. But not so much that they can't make the best of it. by digby Here's a little reminder about where the GOP is really heading ...

The FBI director just gave a striking example of how much of a problem encryption has become
... serious the issue has become. At a Senate Judiciary Committee hearing on Wednesday, FBI Director James Comey said encryption is a "big problem" ...

VW: CO2 emissions problem far smaller than suspected
Company says "slight deviations" were found in nine variants of VW brand models, including the Jetta, Golf and Passat

The Big Problem With Star Wars, According To Francis Ford Coppola
Cinema Blend The Big Problem With Star Wars, According To Francis Ford Coppola Cinema Blend Even though he had nothing to do with the actual ...

Can Cisco fix workplace video problem?
Cisco has spent decades building products for IT managers and engineers. It's now trying to adopt a consumer mentality.

Resources last updated: 12/10/2015 1:57:53 PM