Search Results

Search found 390 results on 16 pages for 'clientid'.

Page 4/16 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • get value of dynamiclly created radiobuttonlist

    - by Mark
    Hi All, I'm trying to get the value of a dynamically created radiobuttonlist via javascript to call a pagemethod. This is how I'm creating the rbl: rbl.Attributes["onclick"] = "javascript:preview('" + rbl.ID + "','" + rbl.ClientID + "');"; And this is the javascript: function preview(controlid, clientid) { var radio = document.getElementsByName(clientid); var answer = "k"; for (var ii = 0; ii < radio.length; ii++) { if (radio[ii].checked) answer = radio[ii].value; } PageMethods.SaveAnswer(controlid, answer); } The problem however is that I want to get the groupname of the radiobuttionlist so I can use getElementsByName, but i have no luck so far. Kind regards, Mark

    Read the article

  • How to load images and fragments dynamically in LiveCycle Designer forms?

    - by John
    Hi there. I've created a couple of shared templates (.xdp) which will be shared among several clients. Obviously, each client has their own logo and I'd like to set the logo upon form generation. I've managed to change the logo dynamically although I'm not sure if my approach is good. In the xml datasource I've got this element: <ClientID>SomeNumber</ClientId> In the form itself I set the image href with this javascript code: SomeHiddenTextField::calculate HeaderLogo.value.image.href = $record.ClientID + "_logo.jpg"; I've got the logos stored on the server in the same folder as the shared templates. Is this an alright approach to load logos dynamically? I've been trying to achieve the same dynamic behaviour with each client's footer fragment, but I have been unable to figure out how to load these on demand. I could make each footer fragment in to an image but I'd like to avoid it if possible.

    Read the article

  • why do i lose my hidden field value?

    - by user517406
    Hi, I have some hidden fields on my page, all of which work fine apart from one. I am setting the value in document.ready, before calling buildGrid() : $(document).ready(function() { $.ajax( { type: "POST", url: "/CDServices.asmx/GetWeekEndingDates", data: "{}", dataType: "json", contentType: "application/json; charset=utf-8", success: function(msg) { //store default dates in hidden fields $("#<%=hdnCurrentDate.ClientID%>").val(msg.d.CurrentDate); $("#<%=hdnLastWeekEndingDate.ClientID%>").val(msg.d.LastWeekEndingDate); } }); buildGrid(); }); Yet in buildGrid, the value in the hidden field is empty : function buildGrid() { alert($("#<%=hdnLastWeekEndingDate.ClientID%>").val()); I call other functions on button clicks where the hidden field value is picked up fine, why does the value disappear here?

    Read the article

  • How to retrieve ID of button clicked within usercontrol on Asp.net page?

    - by Shawn Gilligan
    I have a page that I am working on that I'm linking multiple user controls to. The user control contains 3 buttons, an attach, clear and view button. When a user clicks on any control on the page, the resulting information is "dumped" into the last visible control on the page. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" MasterPageFile="DefaultPage.master" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %> <%@ Register tagName="FileHandler" src="FileHandling.ascx" tagPrefix="ucFile" %> <asp:Content ID="Content1" ContentPlaceHolderID="Main" Runat="Server"> <asp:UpdatePanel ID="upPanel" UpdateMode="Conditional" runat="server"> <ContentTemplate> <table> <tr> <td> <ucFile:FileHandler ID="fFile1" runat="server" /> </td> <td> <ucFile:FileHandler ID="fFile2" runat="server" /> </td> </tr> </table> </ContentTemplate> </asp:UpdatePanel> </asp:Content> All file handling and processing is handled within the control, with an event when the upload to the file server is complete via a file name that was generated. When either button is clicked, the file name is always stored internal to the control in the last control's text box. Control code: <table style="width: 50%;"> <tr style="white-space: nowrap;"> <td style="width: 1%;"> <asp:Label runat="server" ID="lblFile" /> </td> <td style="width: 20%;"> <asp:TextBox ID="txtFile" CssClass="backColor" runat="server" OnTextChanged="FileInformationChanged" /> </td> <td style="width: 1%"> <%--<asp:Button runat="server" ID="btnUpload" CssClass="btn" Text="Attach" OnClick="UploadFile"/>--%> <input type="button" id="btnUpload" class="btn" tabindex="30" value="Attach" onclick="SetupUpload();" /> </td> <td style="width: 1%"> <%--<asp:Button runat="server" ID="btnClear" Text="Clear" CssClass="btn" OnClick="ClearTextValue"/>--%> <input type="button" id="btnClearFile" class="btn" value="Clear" onclick="document.getElementById('<%=txtFile.ClientID%>').value = '';document.getElementById('<%=hfFile.ClientID%>').value = '';" /> </td> <td style="width: 1%"> <a href="#here" onclick="ViewLink(document.getElementById('<%=hfFile.ClientID%>').value, '')">View</a> </td> <td style="width: 1%"> <asp:HiddenField ID="hfFile" runat="server" /> </td> </tr> </table> <script type="text/javascript"> var ItemPath = ""; function SetupUpload(File) { ItemPath = File; VersionAttach('<%=UploadPath%>', 'true'); } function UploadComplete(File) { document.getElementById('<%=txtFile.ClientID%>').value = File.substring(File.lastIndexOf("/") + 1); document.getElementById('<%=hfFile.ClientID%>').value = File; alert('<%=txtFile.Text %>'); alert('<%=ClientID %>') } function ViewLink(File, Alert) { if (File != "") { if (File.indexOf("../data/") != -1) { window.open(File, '_blank'); } else { window.open('../data/<%=UploadPath%>/' + File, '_blank'); } } else if (Alert == "") { alert('No file has been uploaded for this field.'); } } </script>

    Read the article

  • Validating the SharePoint InputFormTextBox / RichText Editor using JavaScript

    - by Jignesh Gangajaliya
    In the previous post I mentioned about manipulating SharePoint PeoplePicker control using JavaScript, in this post I will explain how to validate the InputFormTextBox contol using JavaScript. Here is the nice post by Becky Isserman on why not to use RequiredFieldValdator or InputFormRequiredFieldValidator with InputFormTextbox. function ValidateComments() {     //retrieve the text from rich text editor.     var text = RTE_GetRichEditTextOnly("<%= rteComments.ClientID %>");     if (text != "")     {         return true;     }     else     {         alert('Please enter your comments.');         //set focus back to the rich text editor.         RTE_GiveEditorFocus("<%= rteComments.ClientID %>");         return false;     }     return true; } <SharePoint:InputFormTextBox ID="rteComments" runat="server" RichText="true" RichTextMode="Compatible" Rows="10" TextMode="MultiLine" CausesValidation="true" ></SharePoint:InputFormTextBox> <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" OnClientClick="return ValidateComments()" CausesValidation="true" /> - Jignesh

    Read the article

  • Configure Oracle SOA JMSAdatper to Work with WLS JMS Topics

    - by fip
    The WebLogic JMS Topic are typically running in a WLS cluster. So as your SOA composites that receive these Topic messages. In some situation, the two clusters are the same while in others they are sepearate. The composites in SOA cluster are subscribers to the JMS Topic in WebLogic cluster. As nature of JMS Topic is meant to distribute the same copy of messages to all its subscribers, two questions arise immediately when it comes to load balancing the JMS Topic messages against the SOA composites: How to assure all of the SOA cluster members receive different messages instead of the same (duplicate) messages, even though the SOA cluster members are all subscribers to the Topic? How to make sure the messages are evenly distributed (load balanced) to SOA cluster members? Here we will walk through how to configure the JMS Topic, the JmsAdapter connection factory, as well as the composite so that the JMS Topic messages will be evenly distributed to same composite running off different SOA cluster nodes without causing duplication. 2. The typical configuration In this typical configuration, we achieve the load balancing of JMS Topic messages to JmsAdapters by configuring a partitioned distributed topic along with sharable subscriptions. You can reference the documentation for explanation of PDT. And this blog posting does a very good job to visually explain how this combination of configurations would message load balancing among clients of JMS Topics. Our job is to apply this configuration in the context of SOA JMS Adapters. To do so would involve the following steps: Step A. Configure JMS Topic to be UDD and PDT, at the WebLogic cluster that house the JMS Topic Step B. Configure JCA Connection Factory with proper ServerProperties at the SOA cluster Step C. Reference the JCA Connection Factory and define a durable subscriber name, at composite's JmsAdapter (or the *.jca file) Here are more details of each step: Step A. Configure JMS Topic to be UDD and PDT, You do this at the WebLogic cluster that house the JMS Topic. You can follow the instructions at Administration Console Online Help to create a Uniform Distributed Topic. If you use WebLogic Console, then at the same administration screen you can specify "Distribution Type" to be "Uniform", and the Forwarding policy to "Partitioned", which would make the JMS Topic Uniform Distributed Destination and a Partitioned Distributed Topic, respectively Step B: Configure ServerProperties of JCA Connection Factory You do this step at the SOA cluster. This step is to make the JmsAdapter that connect to the JMS Topic through this JCA Connection Factory as a certain type of "client". When you configure the JCA Connection Factory for the JmsAdapter, you define the list of properties in FactoryProperties field, in a semi colon separated list: ClientID=myClient;ClientIDPolicy=UNRESTRICTED;SubscriptionSharingPolicy=SHARABLE;TopicMessageDistributionAll=false You can refer to Chapter 8.4.10 Accessing Distributed Destinations (Queues and Topics) on the WebLogic Server JMS of the Adapter User Guide for the meaning of these properties. Please note: Except for ClientID, other properties such as the ClientIDPolicy=UNRESTRICTED, SubscriptionSharingPolicy=SHARABLE and TopicMessageDistributionAll=false are all default settings for the JmsAdapter's connection factory. Therefore you do NOT have to explicitly specify them explicitly. All you need to do is the specify the ClientID. The ClientID is different from the subscriber ID that we are to discuss in the later steps. To make it simple, you just need to remember you need to specify the client ID and make it unique per connection factory. Here is the example setting: Step C. Reference the JCA Connection Factory and define a durable subscriber name, at composite's JmsAdapter (or the *.jca file) In the following example, the value 'MySubscriberID-1' was given as the value of property 'DurableSubscriber': <adapter-config name="subscribe" adapter="JMS Adapter" wsdlLocation="subscribe.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata"> <connection-factory location="eis/wls/MyTestUDDTopic" UIJmsProvider="WLSJMS" UIConnectionName="ateam-hq24b"/> <endpoint-activation portType="Consume_Message_ptt" operation="Consume_Message"> <activation-spec className="oracle.tip.adapter.jms.inbound.JmsConsumeActivationSpec"> <property name="DurableSubscriber" value="MySubscriberID-1"/> <property name="PayloadType" value="TextMessage"/> <property name="UseMessageListener" value="false"/> <property name="DestinationName" value="jms/MyTestUDDTopic"/> </activation-spec> </endpoint-activation> </adapter-config> You can set the durable subscriber name either at composite's JmsAdapter wizard,or by directly editing the JmsAdapter's *.jca file within the Composite project. 2.The "atypical" configurations: For some systems, there may be restrictions that do not allow the afore mentioned "typical" configurations be applied. For examples, some deployments may be required to configure the JMS Topic to be Replicated Distributed Topic rather than Partition Distributed Topic. We would like to discuss those scenarios here: Configuration A: The JMS Topic is NOT PDT In this case, you need to define the message selector 'NOT JMS_WL_DDForwarded' in the adapter's *.jca file, to filter out those "replicated" messages. Configuration B. The ClientIDPolicy=RESTRICTED In this case, you need separate factories for different composites. More accurately, you need separate factories for different *.jca file of JmsAdapter. References: Managing Durable Subscription WebLogic JMS Partitioned Distributed Topics and Shared Subscriptions JMS Troubleshooting: Configuring JMS Message Logging: Advanced Programming with Distributed Destinations Using the JMS Destination Availability Helper API

    Read the article

  • How do I keep a table up to date across 4 db's to be used in SQL Replication Filtering?

    - by Refracted Paladin
    I have a Win Form, Data Entry, application that uses 4 seperate Data Bases. This is an occasionally connected app that uses Merge Replication (SQL 2005) to stay in Sync. This is working just fine. The next hurdle I am trying to tackle is adding Filters to my Publications. Right now we are replicating 70mbs, compressed, to each of our 150 subscribers when, truthfully, they only need a tiny fraction of that. Using Filters I am able to accomplish this(see code below) but I had to make a mapping table in order to do so. This mapping table consists of 3 columns. A PrimaryID(Guid), WorkerName(varchar), and ClientID(int). The problem is I need this table present in all FOUR Databases in order to use it for the filter since, to my knowledge, views or cross-db query's are not allowed in a Filter Statement. What are my options? Seems like I would set it up to be maintained in 1 Database and then use Triggers to keep it updated in the other 3 Databases. In order to be a part of the Filter I have to include that table in the Replication Set so how do I flag it appropriately. Is there a better way, altogether? SELECT <published_columns> FROM [dbo].[tblPlan] WHERE [ClientID] IN (select ClientID from [dbo].[tblWorkerOwnership] where WorkerID = SUSER_SNAME()) Which allows you to chain together Filters, this next one is below the first one so it only pulls from the first's Filtered Set. SELECT <published_columns> FROM [dbo].[tblPlan] INNER JOIN [dbo].[tblHealthAssessmentReview] ON [tblPlan].[PlanID] = [tblHealthAssessmentReview].[PlanID] P.S. - I know how illogical the DB structure sounds. I didn't make it. I inherited it and was then told to make it a "disconnected app."

    Read the article

  • How do I keep a table in sync across multiple SQL Databases?

    - by Refracted Paladin
    I have a Win Form, Data Entry, application that uses 4 seperate Data Bases. This is an occasionally connected app that uses Merge Replication (SQL 2005) to stay in Sync. This is working just fine. The next hurdle I am trying to tackle is adding Filters to my Publications. Right now we are replicating 70mbs, compressed, to each of our 150 subscribers when, truthfully, they only need a tiny fraction of that. Using Filters I am able to accomplish this(see code below) but I had to make a mapping table in order to do so. This mapping table consists of 3 columns. A PrimaryID(Guid), WorkerName(varchar), and ClientID(int). The problem is I need this table present in all FOUR Databases in order to use it for the filter since, to my knowledge, views or cross-db query's are not allowed in a Filter Statement. What are my options? Seems like I would set it up to be maintained in 1 Database and then use Triggers to keep it updated in the other 3 Databases. In order to be a part of the Filter I have to include that table in the Replication Set so how do I flag it appropriately. Is there a better way, altogether? SELECT <published_columns> FROM [dbo].[tblPlan] WHERE [ClientID] IN (select ClientID from [dbo].[tblWorkerOwnership] where WorkerID = SUSER_SNAME()) Which allows you to chain together Filters, this next one is below the first one so it only pulls from the first's Filtered Set. SELECT <published_columns> FROM [dbo].[tblPlan] INNER JOIN [dbo].[tblHealthAssessmentReview] ON [tblPlan].[PlanID] = [tblHealthAssessmentReview].[PlanID] P.S. - I know how illogical the DB structure sounds. I didn't make it. I inherited it and was then told to make it a "disconnected app." Go figure!

    Read the article

  • Data from a table in 1 DB needed for filter in different DB...

    - by Refracted Paladin
    I have a Win Form, Data Entry, application that uses 4 seperate Data Bases. This is an occasionally connected app that uses Merge Replication (SQL 2005) to stay in Sync. This is working just fine. The next hurdle I am trying to tackle is adding Filters to my Publications. Right now we are replicating 70mbs, compressed, to each of our 150 subscribers when, truthfully, they only need a tiny fraction of that. Using Filters I am able to accomplish this(see code below) but I had to make a mapping table in order to do so. This mapping table consists of 3 columns. A PrimaryID(Guid), WorkerName(varchar), and ClientID(int). The problem is I need this table present in all FOUR Databases in order to use it for the filter since, to my knowledge, views or cross-db query's are not allowed in a Filter Statement. What are my options? Seems like I would set it up to be maintained in 1 Database and then use Triggers to keep it updated in the other 3 Databases. In order to be a part of the Filter I have to include that table in the Replication Set so how do I flag it appropriately. Is there a better way, altogether? SELECT <published_columns> FROM [dbo].[tblPlan] WHERE [ClientID] IN (select ClientID from [dbo].[tblWorkerOwnership] where WorkerID = SUSER_SNAME()) Which allows you to chain together Filters, this next one is below the first one so it only pulls from the first's Filtered Set. SELECT <published_columns> FROM [dbo].[tblPlan] INNER JOIN [dbo].[tblHealthAssessmentReview] ON [tblPlan].[PlanID] = [tblHealthAssessmentReview].[PlanID]

    Read the article

  • How do I keep a table in Sync across 4 db's to be used in SQL Replication Filtering?

    - by Refracted Paladin
    I have a Win Form, Data Entry, application that uses 4 seperate Data Bases. This is an occasionally connected app that uses Merge Replication (SQL 2005) to stay in Sync. This is working just fine. The next hurdle I am trying to tackle is adding Filters to my Publications. Right now we are replicating 70mbs, compressed, to each of our 150 subscribers when, truthfully, they only need a tiny fraction of that. Using Filters I am able to accomplish this(see code below) but I had to make a mapping table in order to do so. This mapping table consists of 3 columns. A PrimaryID(Guid), WorkerName(varchar), and ClientID(int). The problem is I need this table present in all FOUR Databases in order to use it for the filter since, to my knowledge, views or cross-db query's are not allowed in a Filter Statement. What are my options? Seems like I would set it up to be maintained in 1 Database and then use Triggers to keep it updated in the other 3 Databases. In order to be a part of the Filter I have to include that table in the Replication Set so how do I flag it appropriately. Is there a better way, altogether? SELECT <published_columns> FROM [dbo].[tblPlan] WHERE [ClientID] IN (select ClientID from [dbo].[tblWorkerOwnership] where WorkerID = SUSER_SNAME()) Which allows you to chain together Filters, this next one is below the first one so it only pulls from the first's Filtered Set. SELECT <published_columns> FROM [dbo].[tblPlan] INNER JOIN [dbo].[tblHealthAssessmentReview] ON [tblPlan].[PlanID] = [tblHealthAssessmentReview].[PlanID] P.S. - I know how illogical the DB structure sounds. I didn't make it. I inherited it and was then told to make it a "disconnected app."

    Read the article

  • Cascading dropdownlist jQuery does not retain value on post back.

    - by John Smith
    I have two html select server control on an add data form page. the user selects a value in the first html select server control and then values are populated into the second html select server control with jquery. The problem is when a a user clicks the save button and the page posts back, the values are no longer in the drop down list populated by jQuery. The drop downlist is a html server control, shouldn't it retain the values on post-back? How can I retain the values and save the selected value to the database? $(document).ready(function() { $("#<%=ddlCourseWare.ClientID %>").change(function() { var courseWareId = this.value; try { $.ajax({ type: "POST", url: "Left_SubCategory.aspx/GetTabData", data: "{courseWareId:" + courseWareId + "}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { var result = json_parse(data.d); $("#<%=ddlTabType.ClientID %>")[0].innerHTML = ''; if (result.length > 0) { $.each(result, function(key, item) { $("#<%=ddlTabType.ClientID %>").append($("<option></option>").val(item.id).html(item.TabName)); }); } else { $("#<%=ddlTabType.ClientID %>").append($("<option></option>").val('0').html('--Select--')); } }, error: function(request, status, error) { alert(request.responseText); } }); } catch (ex) { alert(ex); } }); }); HTML <select id="ddlCourseWare" name="ddlCourseWare" runat="server" Width="230px" class="TextBox" Height="18px" > <select id="ddlTabType" name="ddlTabType" runat="server" Width="230px" class="TextBox" Height="18px" onchange="BindMainCat();"> <option>--Select--</option> </select> C# private void BindCourseWare() { ddlCourseWare.DataSource = courseWare.GetCourseWare(); ddlCourseWare.DataTextField = "CourseWareType"; ddlCourseWare.DataValueField = "id"; ddlCourseWare.DataBind(); ddlCourseWare.Items.Insert(0, "----Select Course Ware----"); } [WebMethod] public static string GetTabData(int courseWareId) { var result = new CourseWare().GetCourseTabByCoursewareId(courseWareId); JavaScriptSerializer json_tabs = new JavaScriptSerializer(); string jsonArray_tabs = json_tabs.Serialize(result); return jsonArray_tabs; } protected void btnSave_Click(object sender, EventArgs e) { int mainCategoryID1 = int.Parse(ddlTabType.Value); // not working int mainCategoryID2 = int.Parse(Request["ctl00$ContentPlaceHolder1$ddlTabType"]); // working but always return same value means the upper value (selected index 1) }

    Read the article

  • Watermark asp:Login control Username and Password fields

    - by Gogster
    Hi all, I'm trying to watermark the asp:Login controls' Username and Password fields with jQuery, I've tried various ways of referencing the control ID: $('#<%=ClientID.Login1_UserName %>').watermark('watermark', 'Username'); I have tried moving the ClientID, Login1 and UserName around and changing the selectors to and from userscores and periods... Any ideas?

    Read the article

  • How to parse deeply nested using LINQ to XML

    - by Picflight
    How do I parse the following XML using LINQ? I need to insert into a database table OrderNumber, ShipAddress, ShipCity, ShipState for each Order & OrderCancelled. Then in a separate table I need to insert OrderId from the Returns/Amount section. <!-- language: lang-xml --> <?xml version="1.0" encoding="utf-8"?> <OrdersReport Date="2012-08-01"> <Client> <ClientId>1</ClientId> <Orders> <Order> <OrderNumber>1</OrderNumber> <ShipAddress>123 Main St.</ShipAddress> <ShipCity>MyCity</ShipCity> <ShipState>AZ</ShipState> </Order> <Order> <OrderNumber>2</OrderNumber> <ShipAddress>111 Main St.</ShipAddress> <ShipCity>OtherCity</ShipCity> <ShipState>AL</ShipState> </Order> <OrderCancelled> <OrderNumber>3</OrderNumber> <ShipAddress>111 Main St.</ShipAddress> <ShipCity>OtherCity</ShipCity> <ShipState>AL</ShipState> </OrderCancelled> </Orders> <Returns> <Amount> <OrderId>2</OrderId> <OrderId>3</OrderId> </Amount> </Returns> </Client> <Client> <ClientId>2</ClientId> <!-- Same Tree structure as Client 1 --> </Client> </OrdersReport> Not sure why the XML is not showing red and blue colors and not indenting properly. :-(

    Read the article

  • Focus on textbox based on URL.

    - by Cameron
    I have two forms on one page and want to have the input boxes focused based on the URL. So for example: domain.com/Default.aspx#login and domain.com/Default.aspx#register and the javascript I have this: window.document.getElementById('<%=txtUserName.ClientID %>').focus(); window.document.getElementById('<%=txtEmail.ClientID %>').focus(); it might be better if the urls are Default.aspx?action=login actually (not sure if this effects the way in which it would work)

    Read the article

  • Javascript insert parameter inside string

    - by amemak
    Hi, I want to ask if there is a way to insert variable inside another string which is part of another statement. For example: function SomeFunction(field) { var someVariable = document.getElementById('<%=' + field + '.ClientID %'); } But I've got an error: Error 6 'string' does not contain a definition for 'ClientID' Thank you.

    Read the article

  • How to get unique values when using a UNION mysql query

    - by Roland
    I have 2 sql queries that return results, both contain a contract number, now I want to get the unique values of contract numbers HEre's the query (SELECT contractno, dsignoff FROM campaigns WHERE clientid = 20010490 AND contractno != '' GROUP BY contractno,dsignoff) UNION (SELECT id AS contractno,signoffdate AS dsignoff FROM contract_details WHERE clientid = 20010490) So for example, if the first query before the union returns two results with contract no 10, and the sql query after the union also returns 10, then we have 3 rows in total, however because contractno of all three rows is 10, I need to have only one row returned, Is this possible?

    Read the article

  • Control is set to false, jQuery selector fails

    - by Damien Joe
    Hi I have some controls on an asp.net modal which I show manually via code behind. Now I am trying to attach a selector on one of the controls inside pageLoad(), problem being is that the modal container is initially set to visible=false. I tried checking for length but it still throws exception if ($('#<%= myControl.ClientId %>').length > 0) { $('#<%= myControl.ClientID %>').click(function() { // Do work }); } Compiler Error Message: CS0103: The name 'myControl' does not exist in the current context

    Read the article

  • How to get default value of Multiline text box through JQuery?

    - by user144842
    Hi Case is I want to prompt a message (Do you want to save changes?) if text box default value is updated on .aspx page before submitting the page. I am using .text() to compare with .val(). It works fine in firefox but failing in IE7 and IE8 if ($("#<%=txt1.ClientID%>").attr("value") === $("#<%=txt1.ClientID%>").text()) return(true); return confirm('Do you wish to save these changes?');

    Read the article

  • can we use jquery for client side validation of a custom validation control?

    - by Mac
    There are two textboxes one for email and other one for phone i have used one custom validation control so that user have to fill any one of textboxes for client side i used javascript function ValidatePhoneEmail(source, args) { var tboxEmail = document.getElementById('<%= tboxEmail.ClientID %>'); var tboxPhone = document.getElementById('<%= tboxPhone.ClientID %>'); if (tboxEmail.value.trim() != '' || tboxPhone.value.trim() != '') { args.IsValid = true; } else { args.IsValid = false; } } how to achieve same result using jquery

    Read the article

  • Referencing ASP.net textbox data in JavaScripts

    - by GoldenEarring
    I'm interested in making an interactive 3D pie chart using JavaScript and ASP.net controls for a webpage. Essentially, I want to make an interactive version of the chart here: https://google-developers.appspot.com/chart/interactive/docs/gallery/piechart#3D I want to have 5 ASP.net textboxes where the user enters data and then submits it, and the chart adjusts according to what the user enters. I understand using ASP.net controls with JS is probably not the most effective way to go about it, but I would really appreciate if someone could share how doing this would be possible. I really don't know where to begin. Thanks for any help! <%@ Page Language="C#" %> <!DOCTYPE html> <script runat="server"> void btn1_Click(object sender, EventArgs e) { double s = 0.0; double b = 0; double g = 0.0f; double c = 0.0f; double h = 0.0f; s = double.Parse(txtWork.Text); b = double.Parse(txtEat.Text); g = double.Parse(txtCommute.Text); c = double.Parse(txtWatchTV.Text); h = double.Parse(txtSleep.Text); double total = s + b + g + c + h; if (total != 24) { lblError.Text = "Warning! A day has 24 hours"; } if (total == 24) { lblError.Text = string.Empty; } } </script> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("visualization", "1", { packages: ["corechart"] }); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Task', 'Hours per Day'], ['Work', 11], ['Eat', 2], ['Commute', 2], ['Watch TV', 2], ['Sleep', 7] ]); var options = { title: 'My Daily Activities', is3D: true, }; var chart = new google.visualization.PieChart(document.getElementById('piechart_3d')); chart.draw(data, options); } var data = new google.visualization.DataTable(); var txtWork = document.getElementById('<%=txtWork.ClientID%>') txtEat = document.getElementById('<%=txtEat.ClientID%>') txtCommute = document.getElementById('<%=txtCommute.ClientID%>') txtWatchTV = document.getElementById('<%=txtWatchTV.ClientID%>') txtSleep = document.getElementById('<%=txtSleep.ClientID%>'); var workvalue = parseInt(txtWork, 10) var eatvalue = parseInt(txtEat, 10) var commutevalue = parseInt(txtCommute, 10) var watchtvvalue = parseInt(txtWatchTV, 10) var sleepvalue = parseInt(txtSleep, 10) // Declare columns data.addColumn('string', 'Task'); data.addColumn('Number', 'Hours per day'); // Add data. data.addRows([ ['Work', workvalue], ['Eat', eatvalue], ['Commute', commutevalue], ['Watch TV', watchtvvalue], ['Sleep', sleepvalue], ]); </script> </head> <body> <form id="form1" runat="server"> <div id="piechart_3d" style="width: 900px; height: 500px;"> </div> <asp:Label ID="lblError" runat="server" Font-Size="X-Large" Font-Bold="true" /> <table> <tr> <td>Work:</td> <td><asp:TextBox ID="txtWork" Text="11" runat="server" /></td> </tr> <tr> <td>Eat:</td> <td><asp:TextBox ID="txtEat" text="2" runat="server" /></td> </tr> <tr> <td>Commute:</td> <td><asp:TextBox ID="txtCommute" Text="2" runat="server" /></td> </tr> <tr> <td>Watch TV:</td> <td><asp:TextBox ID="txtWatchTV" Text="2" runat="server" /></td> </tr> <tr> <td>Sleep:</td> <td><asp:TextBox ID="txtSleep" Text="7" runat="server" /></td> </tr> </table> <br /> <br /> <asp:Button ID="btn1" text="Draw 3D PieChart" runat="server" OnClick="btn1_Click" /> </form> </body> </html>

    Read the article

  • Using Javascript to flip flop a textbox's readonly flag

    - by Velika
    I have a frame with several radio buttons where the user is supposed to select the "Category" that his Occupation falls into and then unconditionally also specify his occupation. If the user selects "Retired", the requirement is to prefill "Retired" in the "Specify Occupation" text box and to disable it to prevent it from being changed. The Specify Occupation text box should also no longer be a tab stop. If the user selects a radio button other than Retired the Specify Occupation text box should be enabled and once again in the normal tab sequence. Originally, I was setting and clearing the disabled property on the Specify occupation textbox, then I found out that, upon submitting the form, disabled fields are excluded from the submit and the REQUIRED validator on the Specify Occupation textbox was being raised because the textbox was being blanked out. What is the best way to solve this? My approach below was to mimic a disabled text box by setting/resetting the readonly attribute on the text box and changing the background color to make it appear disabled. (I suppose I should be changing the forecolor instead of teh background color). Nevertheless, my code to make the textbox readonly and to reset it doesn't appear to be working. function OccupationOnClick(sender) { debugger; var optOccupationRetired = document.getElementById("<%= optOccupationRetired.ClientId %>"); var txtSpecifyOccupation = document.getElementById("<%= txtSpecifyOccupation.ClientId %>"); var optOccupationOther = document.getElementById("<%= optOccupationOther.ClientId %>"); if (sender == optOccupationRetired) { txtSpecifyOccupation.value = "Retired" txtSpecifyOccupation.readonly = "readonly"; txtSpecifyOccupation.style.backgroundColor = "#E0E0E0"; txtSpecifyOccupation.tabIndex = -1; } else { if (txtSpecifyOccupation.value == "Retired") txtSpecifyOccupation.value = ""; txtSpecifyOccupation.style.backgroundColor = "#FFFFFF"; txtSpecifyOccupation.readonly = ""; txtSpecifyOccupation.tabIndex = 0; } } Can someone provide a suggest for the best way to handle this scenario and porovide a tweek to the code above to fix the setting/resetting on the readonly property?

    Read the article

  • VS2010 renders controls JS awkwardly

    - by Juergen Hoffmann
    I have created a Website Project in VS2010. My Controls are not rendered correctly. The JS that is produced is not correctly formatted. Here is an example: protected void Page_PreRender(object sender, EventArgs e) { if (!IsPostBack) { objListBox.Attributes.Add("onchange", "Control_doPostBack('" + objListBox.ClientID + "','ListBox_OnClick'); return false;"); objListBox.Attributes.Add("onblur", "Control_doPostBack('" + trListbox.ClientID + "','ListBox_OnBlur'); return false;"); img.Attributes.Add("onclick", "Control_doPostBack('" + trListbox.ClientID + "','IMG_OnClick'); return false;"); } } and the responding control is rendered as: <select size="4" name="ctl00$PlaceHolder_Content$drop$objListBox" onchange="Control_doPostBack(&#39;PlaceHolder_Content_drop_objListBox&#39;,&#39;ListBox_OnClick&#39;); return false;setTimeout(&#39;__doPostBack(\&#39;ctl00$PlaceHolder_Content$drop$objListBox\&#39;,\&#39;\&#39;)&#39;, 0)" id="PlaceHolder_Content_drop_objListBox" onblur="Control_doPostBack(&#39;PlaceHolder_Content_drop_trListbox&#39;,&#39;ListBox_OnBlur&#39;); return false;" style="position:absolute;"> </select> As you can see, the ' are rendered to &#39 which screwes up the Browser. Is there a tweak to msbuild or inside the project properties? Any help is highly appreciated.

    Read the article

  • MySQL query pulling from two tables, display in correct fields

    - by Matt Nathanson
    I'm trying to select all fields in two separate tables as long as they're sharing a common ID. //mysql query $result = mysql_query("SELECT * FROM project, links WHERE project.id = links.id and project.id = $clientID") //displaying the link if ($row['url'] != null){ echo "<div class='clientsection' id='links'>Links</div>"; echo "<a class='clientlink' id='link1' href='" . $row['url'] . "'>" . $row['name'] . "</a>"; } else { echo "<a class='clientlink' id='link1' href='" . $row['url'] . "' style='display:none;'>" . $row['name'] . "</a>"; }; As you can see, my tables are "projects", and "links" Each is sharing a common field "id" for reference. It looks as though where both links.id and project.id are equal, it outputs anything, but when there is no links.id associated with a given $clientID the container relative to the $clientID doesn't display at all. Essentially I'm using this to add links dynamically to a specific client in this CMS and if there are no links, I want the container to show up anyway. Hopefully I've expressed myself clearly, any pointers in the right direction are appreciated. Thanks!

    Read the article

  • Using POST or SESSION to capture data

    - by Karinne
    Hi all! I'm currently working on web application using VB in ASP.NET. Right now I have 1 page with panels that we are using to show/hide depending on the flow. When the user first comes in, he/she is presented with a gridview containing a list of clients. Then the user, clicks a link from a row and is presented a form where he/she can update the clients' info. Originally, I had a HYPERLINKFIELD that put the clientId in the url, then I'd grab the url and do the code appropriately <asp:HyperLinkField Text='<%$ Resources:Resource, ManageClient %>' DataNavigateUrlFields="CLIENT_ID" DataNavigateUrlFormatString="~/clients/manage.aspx?clientId={0}" /> Now, I'm rethinking that and wondering if it's better to use SESSIONs to grab the clientID via this instead <asp:TemplateField Visible="false"><ItemTemplate><asp:Label runat="server" ID="hidClientId" Text='<%# Bind("CLIENT_ID")%>' Visible="false" /></ItemTemplate></asp:TemplateField> <asp:ButtonField Text='<%$ Resources:Resource, ManageClient %>' CommandName="Manage" /> Or use the POST method, which I'm not sure how it works in .NET (but I've used it in PHP) Any help would be greatly appreciated.

    Read the article

  • I can't seem to get my grand Total to calculate correctly

    - by Kenny
    When I run this query below, SELECT clientid, CASE WHEN D.ccode = '-1' Then 'Did Not Show' ELSE D.ccode End ccode, ca, ot, bw, cshT, dc, dte, approv FROM dbo.emC D WHERE year(dte) = year(getdate()) I get the correct results. It is correct result because ccode shows 'Did Not Show' when the value on the db is '-1' However, when I do a UNION ALL so I can get total for each column, I get the results but then 'Did Not Show' is no longer visible when valye for ccode is '-1'. There are over 1000 records with valuye of '-1'. Can someone please help? Here is the entire code with UNION. SELECT clientid, CASE WHEN D.ccode = '-1' Then 'Did Not Show' ELSE D.ccode End ccode, ca, ot, bw, cshT, dc, dte, approv FROM dbo.emC D WhERE year(dte) = year(getdate()) UNION ALL SELECT 'Total', '', SUM(D.ca), SUM(D.ot), SUM(D.bw), SUM(D.cshT), '', '', '' FROM emC D WHERE YEAR(dte)='2011' I also tried using ROLLUP but the real issue here is that I can't get the 'Did Not Show' text to display when ccode value is -1 ClientID CCODE ot ca bw cshT 019692 CF001 0.00 0.00 1.00 0.00 0.00 019692 CH503 0.00 0.00 1.00 0.00 0.00 010487 AC407 0.00 0.00 1.00 0.00 0.00 028108 CH540 0.00 0.00 1.00 0.00 0.00 028108 GS925 0.00 0.00 1.00 0.00 0.00 001038 AC428 0.00 0.00 3.00 0.00 0.00 028561 Did Not Show 0.00 0.00 0.00 0.00 0.00 016884 Did Not Show 0.00 0.00 0.00 0.00 0.00 05184 CF001 0.00 0.00 4.50 0.00 0.00

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >