AJAX :: Running Client Script To Read TextBox Value From PopupControl Extender
Oct 1, 2010
I used PopupControl Extender to display row details from a gridview, and need to update the two textboxes, but the changed value in the textboxes did not get picked up when click the update button on the popup window, so I need to get client side javascript to read the new changed value from these text boxes. However, I tried a few way, none worked for me, not sure what is wrong.
1. Add a javascript function in the .aspx file and use onclientclick of the linkbutton control to call the function, I got error of "Microsoft JScript runtime error: Object required".
<script language="javascript" type="text/javascript">
function newTextValue(textbox)
{
var text = document.getElementById("TextBox1").Value;
alert(text);
}
</script)
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("GalleryTemplateName") %>' Height="20px" Width="230px"
style="text-align: left"></asp:TextBox>
<asp:LinkButton ID="LinkButton2" runat="server" Font-Bold="True" CommandArgument='<%# Eval("GalleryTemplateId") %>'
oncommand="LinkButton2_Click" OnClientClick="newTextValue(this)" >Update</asp:LinkButton>
2. Use ScriptManager.RegisterClientScriptBlock in the aspx.cs file, :
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "changevalue", "alert(document.getElementById('TextBox1').value);", true);
but the alert window did not showup, that means the client javascript did not run? I just use an alert window to test to see if the textbox value is picked up. Note, I used Ajax Toolkit PopupControl Extender, all codes are in an update panel.
My ajaxcontrol toolkit is working fine.But when i add animation tag into it like this.Now when i execute the browser is waiting for some thing and my IDE(visual studio 2008) is asking for a cs file.How to make this file?
I have a grid view that is inside a popupcontrol extender. shown when clicked on a textbox or written something. when the textbox is shown i cannot use up and down arrow keys to move down or up and select a row when pressed enter or tab. I have searched thoroughout the forum not finding the solution or finding that is not working for me!
I have some aspx pages where I was using a date picker. I changed the date picker with AJAX calendarextender which I can pop by clicking on the associated textbox when I am viewing this page on the server itself. But on the client PC I can't pop the calendar. This textbox and calendarextender are created in a gridview.
I am devloping asp.net application.I am devloping in network so i have installed AJAX toolkit on server but the problem is its not running on client.its perfactly running on Server
I can't figure this one out. The pop up works data comes from web service and fades away pretty well in FireFox. In IE 8 the box has no width and you only see anything happening if the box below bottom of page showing you a vertical scrol bar as confirmation. [Code]....
I have a usercontrol on my page. The user control contains an ajax updatepanel with a listbox in it. There is also a PopupControlExtender that is tied to that panel so when the user clicks on something the popup shows. That is all working fine except when my page initially loads I briefly see all the listbox items and then they go away.
I have used ajax tab panel extender in my application and its working in my all major browsers()ie,firefox chrom etc) But in our client machine that is not working(Only in chrom browser).
I am not sure about writing the method in the web service. I'm trying to select the client names from sql server, then storing them into an arraylist. Finally, returning the array of names. This is my code:
I have the calendar extender to popup a calendar when I click in the textbox and works fine. Then I added the maskededit extender so I can make sure they enter the date right. But when i run it, only the maskededit extender is wokring although both are attached.
i am using autocomplete extender for three textbox.i want to pass the first two textbox value as a parameter to the webservice.How to do it using javascript?
I have a text box embedded in a wizard control and I want to use the ajax calender extender to populate the textbox in the wizard, but the extender does not find the text box.
I am creating a popup control . In the popup panel I am going to show a gridview, which has some values and user can select one of them. After user select a value I want to pass it to a textbox on the page.How I can read the value of a given column and pass to the textbox?