.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Change active tab in Ajax tab container using javascript

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :ASP.Net
I have been using the ajax tab control. I need to change the active tab index of the tab container through javascript. Can please anyone tell me how can i do it Cheers Sohail Sayed

View Complete Post

More Related Resource Links

Ajax Enabled Gridview using JavaScript in ASP.NET

Before explaining the article, I would like to thank all readers who read my article and voted for it. Your appreciation for my article gives me strength to write more good articles. Hope in future I will get your valuable comments and suggestions. Now I won't waste your time and come back to the topic. I have written this article on 'Ajax Enabled Gridview Using JavaScript in ASP.NET'. In this article, I will show you how to make a Gridview using a simple HTML table, JavaScript and XML HTTP for Ajax call without using any ASP.NET control.

Using Code

GridView Javascript Click Row and Ajax

This article shows 2 common tasks with the ASP.NET GridView: Binding a List (generic) of objects as DataSource and on clicking a row, getting the values of the selected row by a javascript function. In the example a List with User-objects is displayed. On clicking a row containing the data of a User-object, the Id of the object is used to get the address of the user by an Ajax-call and display it in a details-field.

Re-positioning an HTML container with javascript onresize with a Master page.


I have an HTML <div> container that I float to the right of a gridview.  When the browser window is maximized, it looks fine.  When minimized, the gridview positions below the floating container and most of the data is pushed off the bottom of the browser - you have to scroll down to see it.

If I position the floating container above the gridview it looks fine in a minimized window, but looks real bad when maximized.

What I want to do is use a javascript: onresize event to re-position the floating container up or down depending on the window.inner.width AND do it with a Master/Content page structure AND do it for only the one page where needed.

I can capture the onresize event and display the window dimensions but haven't figured-out how to do it with a Content page that still uses the Master page.  I think I'm having a very "thick" week...

- Tinker


ASP.NET Proxy Page - Used for Cross Domain Requests from AJAX and JavaScript

The article ASP.NET Proxy Page - Used for Cross Domain Requests from AJAX and JavaScript was added by Aamir Hasan on Thursday, August 19, 2010.

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn't allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull content

dropdownlist javascript change items


I can't find solution for this problem for very long time:

I have dropdownlists in Gridview. I need to dinamicly change content of dropdown on client with javascript. Ok, I know to do that. But the problem is when I send data to server changes in dropdownlist does not see. On server I have  old items. How can I change items in dropdown on client with javascript and than see that items on sever when postback data?


MVC with Javascript/AJAX scenario



I'm a rookie with Javascript/Ajax and I was hoping someone could provide an code example or advice of the following scenario:

1.  User clicks a button on the view

2.  Display a message "Waiting to be processed".  (Currently using Javascript)

3.  Execute the action method to retrieve some data.  (Call made from the Javascript)

4.  Return the same view.

5.  Open up a new browser window with a URL that was obtained from the action method.

How do I open a new browser window automatically after the action method is complete?  I was previously making the following call (Process.Start(http://www.yahoo.com);) in the action method but I'm running into issues with it.  I'd like to use Javascript/Ajax.


If it helps this the javascript code that is run when the button is clicked:

function runReportMessage() {
    document.getElementById("runReport").innerHTML = "Running the report. Please wait";
    document.getElementById("btnRun2").disabled = "

change form target from javascript


Salam to all,

in my page, i have an iframe which have a src for another page,

the inner page have a Forms, buttons.. ..etc. the target for the form in the inner page is "self"

i need to run a javascript code from the parent page to change the  inner page form target to posted the values in a Blank window.

how can i do that ?


Change RadMaskedTextBox value via javascript

Hi All,I am using RadMaskedTextBox in my web page. I am trying to set its value through javascript. It works ok if i hard-code control name (i.e. rtHours11_1) in the script as following: var radMaskedTextBox1 = window["<%= rtHours11_1.ClientID %>"]; radMaskedTextBox1.SetValue("00:00"); But I want to set the control name dynamically as this function will be called for many controls on the page. Can someone help me to modify it in the way that it will accept the control name dynamically as following: function InitilizeMe(thisCtrl) { var radMaskedTextBox1 = window["<%= thisCtrl.ClientID %>"];  radMaskedTextBox1.SetValue("00:00"); } Thanks in advance for your help.Regards.

how do i use javascript to change values of controls inside a gridview

i have 2 labels (lblRate,lblTotal) and a textbox (txtQuantity) in a itemtemplate of a gridview.I want to calculate the products of rate and quantity and show it in Total as the textbox loses focus...i cant use textchanged because i dont want the page to postback.How do i use javascript to achieve this??Please Help Urgently....<asp:TemplateField HeaderText="Rate">                <ItemTemplate>                    <asp:Label ID="lblRate" runat="server" Text='<%# Eval("Rate") %>' />                </ItemTemplate>            </asp:TemplateField> <asp:TemplateField HeaderText="Quantity">                <ItemTemplate>                    <asp:TextBox ID="txtQty" runat="server" />                </ItemTemplate>&

Trap Selected Index change event of listbox using Javascript.

Hi All, This is reagarding listbox selection. I have a list box with multi select option. I want to trap the selected index change event of Listbox through javascript. Item of list box can be selected using Click of mouse and also the keyboard up down key with shift. I tried onclick event to bind the javascript function. It works fine if I select by mouse, but it doesen't work for up/down key of keyboard. Thanks, Naveen

How to access ServerSide control Value in Javascript changed by Ajax

Hello,I have a Textbox whose value is been changed using ServerSide code (AJAX based - Partial postback) and now I want to access that changed value in JavaScript. Please suggest me that how can I access that value.document.getElementByID is displaying old value.Things work fine with full postback but are creating above issue with Partial Postback.Thanks, in Advance....

Silverlight media player change source and play from javascript

I am having trouble accessing an embedded Silverlight 2 media player in an aspx page from Javascript and was hoping someone might offer some insight on what's going on. What I want to do is fire a javascript event on the client when a button is pressed to change the Silverlight media player media source and then play the newly selected file. I found what seemed like a pretty straightforward example on the silverlight.net site that looked like this:<%@ Page Title="" Language="VB" MasterPageFile="~/master.master" AutoEventWireup="false" CodeFile="Test.aspx.vb" Inherits="Test" %> <%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls" TagPrefix="asp" %> <asp:Content ID="Content1" ContentPlaceHolderID="Middle" Runat="Server"> <asp:MediaPlayer ID="Media1" runat="server" Height="240px" Width="320px"> </asp:MediaPlayer> <button id="Button1" onclick="onPlay()" type="button">Play</button> <script type="text/javascript"> function onPlay() { try { var player = $find("ctl00_Middle_Media1"); player.set_mediasource("example.mp3");

ASP.NET AJAX and javascript

I have DropDownList "DropDownList1" that have to items 1-displayTextbox1 that display textbox "TextBox1" using javascripts.2- removeTextbox1  that remove textbox "TextBox1" using javascripts.This javascript function is OnSelectedIndexChange. This function call when the DropDownList1 item change using below code on Page_Load void. protected void Page_Load(object sender, EventArgs e) { DropDownList1.Attributes.Add("onChange", "return OnSelectedIndexChange();"); }   The code of OnSelectedIndexChange is :<script type="text/javascript"> function OnSelectedIndexChange() { var iDDL= document.getElementById("DropDownList1"); var iTextBox1= document.getElementById("TextBox1"); var iDDLSelectedValue = iDDL.options[iDDL.selectedIndex].value; if (iDDLSelectedValue == "displayTextbox1") { iTextBox1.style.display = "block"; } else { iTextBox1.style.display = "none"; } } </script>   Complete code : The asp cage is :<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W

How to change a value in the usercontrol through javascript

Hello,   I am trying to create a modalpopup user control using ModalPopup extender from the AjaxToolkit and a usercontrol, so that I could show a modal popup window on several pages, simply using the single user control. It will be shown whenevr a button is clicked and certain amount of work is done on the server side, say a "Save" button is clicked, the data is successfully saved in the database and then the modalpopu is shown. The website also has a master page. The title and the content has to be changed, depending upon which button on which page is clicked, or wheter the save was successful or not. I am having problem in changing them through code. I tried to use ScriptManager.RegisterClientScriptBlock to send the title and content values and try to execute a javascript on the master page, but the two controls on the user control come as null when I try to access them from js using the getElementById method. The following is the code:The usercontrol: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ModalPopup.ascx.cs" Inherits="Modal.Controls.ModalPopup" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <div> <asp:Button ID="Button1" style="display:none" runa

change URL using javascript, but URL doesnt change

I want to redirect a user to an url after he clicks a checkbox using javascript.I succeed at doing that using this code:<input id="partylocation" type="checkbox" onclick="javascript:location.href='www.domain.com/?q=party';" />HOWEVER: the URL remains the same! I need the URL to change accoding to the new domain.I also tried:<input id="partylocation" type="checkbox" onclick="javascript:window.location='www.domain.com/?q=party';" />

Dynamic Javascript in Ajax Partial View

I have a partial view which uses Ajax.ActionLink to perform paging.  The AjaxOptions in the link identify the update target (a div on the main view) and some javascript to run OnSuccess (in the partial view).  The javascript must be in the partial view since there is some information in the partial view required to properly wire up the jQuery in the javascript.  This isn't working as expected.  The sample below is the minimum code to duplicate the behavior I am seeing: Controller: private static int count; // // GET: /Home/ public ActionResult Index() { ViewData["Test"] = count++; return View(); } [HttpPost] public ActionResult TestPartial() { ViewData["Test"] = count++; return PartialView(); } View:  <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Index</title> <script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script> <script

Impact of change of the cn attibute in the Active directory

Hello, Is there an impact in SharePoint applications (MOSS 2007, with workflows, alerts, ect.) if the content of cn attribute is changed in the Active directory?  We received a note from our infrastructure team that asked us to assess the impact on our applications if they modify the cn attribute of users and groups.   For instance, my name is currently displayed as Name, FirstName - Division / Division (in French).  The new display would remove the comma and the dash.  Would I need to revisit all my SharePoint Designer workflows?    Other impacts ? thanks for any help you may provide.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend