Search Results

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

Page 10/16 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • ASP.NET/VB.NET problem solving help!

    - by Jonesy
    Hi folks, Got a problem I need help with. Basically I'm gonna develop a form (part of a bigger web app) that lists a load of clients and there business contact, tech contact 1, and tech contact 2. The idea is rapid data entry. So one form shows each client with their contacts in dropdowns and I we can change each one then click a save button to do a mass save. the database looks like this: tblClient ClientID ClientName BusinessContact Tech1 Tech2 My idea was to use a repeater to format the data like this: Client Business Contact Tech1 Tech2 Client2 Business Contact Tech1 Tech2 What I'm stuck on is how to do the mass update? Can I do something like for each item in Repeater1 then do an update SQL statement? -- Jonesy

    Read the article

  • jquery select item in radiobuttonlist via client-side function

    - by mcliedtk
    I have the following ASP.NET RadioButtonList: <asp:RadioButtonList ID="rbl" runat="server"> <asp:ListItem Text="Type1" Value="1" /> <asp:ListItem Text="Type2" Value="2" /> </asp:RadioButtonList> I would like to select an item in the list programmatically via a client-side jquery function like this (simplified version): function BindWidget(widget) { // Type property of Widget is an int. $("#<%=rbl.ClientID%>").selectItemByValue(widget.Type); } Ideally, there is some function - in the above code I have proposed selectItemByValue - that selects an item in a RadioButtonList by a given value. Does jquery have a similar function built-in? If not, how should I go about implementing the desired functionality?

    Read the article

  • file_get_contents() returns "failed to open stream" when used with Facebook access_token flow

    - by TMC
    file_get_contents() is returning "failed to open stream" when I call it on a Facebook oAuth access_token URL. Warning: file_get_contents(https://graph.facebook.com/oauth/access_token?client_id=XXXXX&redirect_uri=http://mydomain.com/fb/callback3.php&client_secret=xxxx&code=YYYY) [function.file-get-contents]: failed to open stream: No error in E:\\htdocs\fb\callback3.php on line 5 (I have removed ClientID, clientSecret and the oAuth Code). If I try to manually hit the Facebook access_token URL that my code is attempting to fetch, I get an actual payload returned in the browser: access_token=XYZ&expires=6508 (where XYZ is the access token) So for some reason, there is a problem with the access_token URL specifically when used with file_get_contents(). At first, I thought it was a security issue with my webhoster, but I have verified with phpinfo() that allow url open is indeed allowed. I have also tried this code and verified it works: $foo = file_get_contents('http://google.com'); echo $foo Anyone have any ideas why file_get_contents() is failing with the Facebook access_token URL?

    Read the article

  • Need to find current connections in mysql media server log table.

    - by Roger
    Hi, I have a media server logging to a mysql database and it records a seperate row for each connect, play, stop, disconnect event. What I would like to do is find connect events that do not have a related disconnect event or play events that do not have a related stop event. date time category event clientId stream streamId =============================================================================== 2010-04-21 10:30:00 session connect 1 2010-04-21 10:30:05 stream start 1 stream1 1 2010-04-21 10:35:00 stream stop 1 stream1 1 2010-04-21 10:35:00 session disconnect 1 2010-04-21 10:35:00 session connect 2 2010-04-21 10:35:05 stream start 2 stream2 1 2010-04-21 10:35:08 session connect 3 2010-04-21 10:35:13 stream start 3 stream1 1 2010-04-21 10:37:05 stream stop 2 stream2 1 2010-04-21 10:37:10 stream start 2 stream1 2 I would like to be able to get a total of current sessions and in a seperate query, a total of current streams being played. Thanks, Roger.

    Read the article

  • Saving State Dynamic UserControls...Help!

    - by Cognitronic
    I have page with a LinkButton on it that when clicked, I'd like to add a Usercontrol to the page. I need to be able to add/remove as many controls as the user would like. The Usercontrol consists of three dropdownlists. The first dropdownlist has it's auotpostback property set to true and hooks up the OnSelectedIndexChanged event that when fired will load the remaining two dropdownlists with the appropriate values. My problem is that no matter where I put the code in the host page, the usercontrol is not being loaded properly. I know I have to recreate the usercontrols on every postback and I've created a method that is being executed in the hosting pages OnPreInit method. I'm still getting the following error: The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases. Here is my code: Thank you!!!! bool createAgain = false; IList<FilterOptionsCollectionView> OptionControls { get { if (SessionManager.Current["controls"] != null) return (IList<FilterOptionsCollectionView>)SessionManager.Current["controls"]; else SessionManager.Current["controls"] = new List<FilterOptionsCollectionView>(); return (IList<FilterOptionsCollectionView>)SessionManager.Current["controls"]; } set { SessionManager.Current["controls"] = value; } } protected void Page_Load(object sender, EventArgs e) { Master.Page.Title = Title; LoadViewControls(Master.MainContent, Master.SideBar, Master.ToolBarContainer); } protected override void OnPreInit(EventArgs e) { base.OnPreInit(e); System.Web.UI.MasterPage m = Master; Control control = GetPostBackControl(this); if ((control != null && control.ClientID == (lbAddAndCondtion.ClientID) || createAgain)) { createAgain = true; CreateUserControl(control.ID); } } protected void AddAndConditionClicked(object o, EventArgs e) { var control = LoadControl("~/Views/FilterOptionsCollectionView.ascx"); OptionControls.Add((FilterOptionsCollectionView)control); control.ID = "options" + OptionControls.Count.ToString(); phConditions.Controls.Add(control); } public event EventHandler<Insight.Presenters.PageViewArg> OnLoadData; private Control FindControlRecursive(Control root, string id) { if (root.ID == id) { return root; } foreach (Control c in root.Controls) { Control t = FindControlRecursive(c, id); if (t != null) { return t; } } return null; } protected Control GetPostBackControl(System.Web.UI.Page page) { Control control = null; string ctrlname = Page.Request.Params["__EVENTTARGET"]; if (ctrlname != null && ctrlname != String.Empty) { control = FindControlRecursive(page, ctrlname.Split('$')[2]); } else { string ctrlStr = String.Empty; Control c = null; foreach (string ctl in Page.Request.Form) { if (ctl.EndsWith(".x") || ctl.EndsWith(".y")) { ctrlStr = ctl.Substring(0, ctl.Length - 2); c = page.FindControl(ctrlStr); } else { c = page.FindControl(ctl); } if (c is System.Web.UI.WebControls.CheckBox || c is System.Web.UI.WebControls.CheckBoxList) { control = c; break; } } } return control; } protected void CreateUserControl(string controlID) { try { if (createAgain && phConditions != null) { if (OptionControls.Count > 0) { phConditions.Controls.Clear(); foreach (var c in OptionControls) { phConditions.Controls.Add(c); } } } } catch (Exception ex) { throw ex; } } Here is the usercontrol's code: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FilterOptionsCollectionView.ascx.cs" Inherits="Insight.Website.Views.FilterOptionsCollectionView" %> namespace Insight.Website.Views { [ViewStateModeById] public partial class FilterOptionsCollectionView : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } protected override void OnInit(EventArgs e) { LoadColumns(); ddlColumns.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(ColumnsSelectedIndexChanged); base.OnInit(e); } protected void ColumnsSelectedIndexChanged(object o, EventArgs e) { LoadCriteria(); } public void LoadColumns() { ddlColumns.DataSource = User.GetItemSearchProperties(); ddlColumns.DataTextField = "SearchColumn"; ddlColumns.DataValueField = "CriteriaSearchControlType"; ddlColumns.DataBind(); LoadCriteria(); } private void LoadCriteria() { var controlType = User.GetItemSearchProperties()[ddlColumns.SelectedIndex].CriteriaSearchControlType; var ops = User.GetItemSearchProperties()[ddlColumns.SelectedIndex].ValidOperators; ddlOperators.DataSource = ops; ddlOperators.DataTextField = "key"; ddlOperators.DataValueField = "value"; ddlOperators.DataBind(); switch (controlType) { case ResourceStrings.ViewFilter_ControlTypes_DDL: criteriaDDL.Visible = true; criteriaText.Visible = false; var crit = User.GetItemSearchProperties()[ddlColumns.SelectedIndex].SearchCriteria; ddlCriteria.DataSource = crit; ddlCriteria.DataBind(); break; case ResourceStrings.ViewFilter_ControlTypes_Text: criteriaDDL.Visible = false; criteriaText.Visible = true; break; } } public event EventHandler OnColumnChanged; public ISearchCriterion FilterOptionsValues { get; set; } } }

    Read the article

  • Calculate total by javascript in gridview with paging

    - by louis
    Without paging function, i can loop through the gridview by using var sum = 0; var gridViewCtlId = '<%=timesheetView.ClientID%>'; var grid = document.getElementById(gridViewCtlId); var gridLength = grid.rows.length; so with gridLength i can loop through the gridview to sum all rows. However, when I use paging event of gridview, i use the page size to loop through all rows, but it occurs errors because the last page may not have enough rows. So would you please to help me how to get the rows in the each page of gridview?

    Read the article

  • Any suggestions on data syncronization from a server to a desktop?

    - by Jamey McElveen
    I have a web based CRM system that stores all the client data from all the clients into one database (MS Sql Server). We need to build a system that maintains a local copy of the data for each client. So basically the client database will have all tables and columns except for the ClientId that is in ever server table. I am aware that I will need to add fields to the server to support synchronization. Are there any good solutions or components already out there to help me accomplish this? We are using MS Sql Server and .NET C#

    Read the article

  • dataset tables row count 'zero'

    - by James123
    I am using dataadapter.Fill() into dataset. But dataset returning tables rows count zero (0). When I ran same sp in sql mgmt. It is returning two tables data. If attributeId = 1 Then spString = "USP_group_1" ElseIf attributeId = 2 Then spString = "USP_group_2" ElseIf attributeId = 3 Then spString = "USP_group_3" End If sqlcmd_q.CommandTimeout = 120 sqlcmd_q.Connection = sqlCnn sqlcmd_q.CommandText = spString sqlcmd_q.CommandType = CommandType.StoredProcedure sqlcmd_q.Parameters.AddWithValue("@client_id", clientId) Try sqlCnn.Open() Dim daGrid As New SqlDataAdapter(sqlcmd_q) daGrid.Fill(dsGrid) daGrid.Dispose() Return dsGrid I don't understand why this happening?

    Read the article

  • In JavaScript, How to convert string into Date ? Where string may have different culture format.

    - by user328973
    Hi I am getting DateString in JavaScript from the TextBox like, var dateString = document.getElementById('<%= txtEffDate.ClientID %>').value; dateString value may be in following format. en-US - "4/29/2010" fr-FR - "29/04/2010" de-DE - "29.04.2010" it-IT - "29/04/2010" es-ES - "29/04/2010" zh-CN - "2010/4/29" ja-JP - "2010/04/29" sv-SE - "2010-04-29" And converting this to Date Object as follows, var d1 = new Date(dateString); though its giving me the wrong result like for fr-FR "29/04/2010" == "Fri May 4 00:00:00 UTC+0530 2012" Which is completely irrelevant, How should I get the correct Date ? I have also set < globalization culture="auto" / in web.config & < asp:ScriptManager ID="scr1" runat="server" EnableScriptGlobalization="true"/

    Read the article

  • SQL Self Join Query Help

    - by hdoe123
    Hi All, I'm trying to work out a query that self join itself on a table using the eventnumber. I've never done a self join before. What i'm trying to query is when a client has started off in a city which is chester to see what city they moved to. But I dont want to be able to see if they started off in another city. I would also like be only see the move once (So i'd only like to see if they went from chester to london rather then chester to london to wales) The StartTimeDate is the same EndDateTime if they moved to another city. Data example as follows if they started off in the city chester :- clientid EventNumber City StartDateTime EndDateTime 1 1 Chester 10/03/2009 11/04/2010 13:00 1 1 Liverpool 11/04/2010 13:00 30/06/2010 16:00 1 1 Wales 30/07/2010 16:00 the result I would like to see is on the 2nd row - so it only shows me liverpool. Could anyone point in the right direcetion please?

    Read the article

  • GoogleAppEngine : ClassNotFoundException : javax.jdo.metadata.ComponentMetadata

    - by James.Elsey
    I'm trying to deploy my application to a locally running GoogleAppEngine development server, but I'm getting the following stack trace when I start the server Apr 23, 2010 9:03:33 PM com.google.apphosting.utils.jetty.JettyLogger warn WARNING: Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientDao' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/jdo/metadata/ComponentMetadata: java.lang.ClassNotFoundException: javax.jdo.metadata.ComponentMetadata at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:319) at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:151) at java.lang.ClassLoader.loadClass(ClassLoader.java:264) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at javax.jdo.JDOHelper$18.run(JDOHelper.java:2009) at javax.jdo.JDOHelper$18.run(JDOHelper.java:2007) at java.security.AccessController.doPrivileged(Native Method) at javax.jdo.JDOHelper.forName(JDOHelper.java:2006) at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1155) at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:803) at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:698) at org.datanucleus.jpa.EntityManagerFactoryImpl.initialisePMF(EntityManagerFactoryImpl.java:482) at org.datanucleus.jpa.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:255) at org.datanucleus.store.appengine.jpa.DatastoreEntityManagerFactory.<init>(DatastoreEntityManagerFactory.java:68) at org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider.createContainerEntityManagerFactory(DatastorePersistenceProvider.java:45) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:224) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:291) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530) at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:217) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:181) at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:116) at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:217) at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:162) at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48) at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113) at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89) The server is running at http://localhost:1234/ I'm a little confused over this, since I have the same application running locally on GlassFish/MySQL. All I have done is to swap in the relevant jar files, and change the persistence.xml. My applicationContext.xml looks as follows : <context:annotation-config/> <bean id="clientDao" class="com.jameselsey.salestracker.dao.jpa.JpaDaoClient"> <property name="entityManagerFactory" ref="entityManagerFactory"/> </bean> <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"/> <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory" /> </bean> <bean id="org.springframework.context.annotation.internalPersistenceAnnotationProcessor" class="com.jameselsey.salestracker.util.GaeFixInternalPersistenceAnnotationProcessor" /> <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/> <tx:annotation-driven/> <bean id="clientService" class="com.jameselsey.salestracker.service.ClientService"/> </beans> My JPA DAO looks like this public class JpaDao extends JpaDaoSupport { protected <T> List<T> findAll(Class<T> clazz) { return getJpaTemplate().find("select c from " + clazz.getName() + " c"); } protected <T> T findOne(String jpql, Map params) { List<T> results = getJpaTemplate().findByNamedParams(jpql, params); if(results.isEmpty()) { return null; } if(results.size() > 1) { throw new IncorrectResultSizeDataAccessException(1, results.size()); } return results.get(0); } } And an example implemented method looks like this : @Override public Client getClientById(Integer clientId) { String jpql = "SELECT c " + "FROM com.jameselsey.salestracker.domain.Client c " + "WHERE c.id = " + clientId; return (Client) getJpaTemplate().find(jpql).get(0); } Like I say, this works ok on Glassfish/MySQL, is it possible this error could be a red herring to something else?

    Read the article

  • window.opener.document.getElementById not working

    - by Curtis
    In my asp.net web app, I create a popup window with a button. When that button is clicked, I want to set the value of an asp:TextBox (id=TextBox1) contained in the parent window. However, it doesn't work like all the examples I've read indicate. I've tried the following lines of code in my javascript onclick handler: window.opener.document.getElementById('<%= TextBox1.ClientID %').value = "abc"; window.opener.document.getElementById("TextBox1").value = "abc"; window.opener.document.getElementById("ctl00_ContentPlaceHolder1_TextBox1").value = "abc"; Only example 3 works. All the stuff I've read indicates that #1 is the preferred method, but I can't seem to make it work at all. Does anyone have any ideas what I'm doing wrong? I've tried this in Firefox, Chrome and IE. Thanks

    Read the article

  • javascript div positioning

    - by sam
    hello folks., please suggest me a solution.. i am using this script to display an image as popup on mouseover.. the difficulty i am facing is that it is not positioning well in different monitor.. it must be something to do with pixcel.. function LargeImage(obj,e) { var imgbtn=document.getElementById('<%=imgbtn1.ClientID%'); imgbtn.src=obj; document.getElementById('imgbox').style.visibility="visible"; document.getElementById('imgbox').style.position="absolute"; document.getElementById('imgbox').style.left=e.clientX-150 + "px"; document.getElementById('imgbox').style.top=225 +"px"; //225 +"px"; } thank you

    Read the article

  • TinyMCE: Double forecolor and backcolor buttons?

    - by petsson
    I'm having a problem using TinyMCE. In IE8, the forecolor and backcolor, for some random reason, is displayed twice. See picture below. Source code (I add the forecolor and backcolor in theme_advanced_buttons2): tinyMCE.init({ mode : "exact", elements : "<%= editArea.ClientID %>", custom_shortcuts : false, language : "en", relative_urls : false, convert_urls : false, forced_root_block : false, force_p_newlines : true, force_br_newlines : false, fix_nesting : true, plugins : "pagebreak,table", pagebreak_separator : '<div style="page-break-after:always;"></div>', theme : "advanced", skin : "o2k7", skin_variant : "blue", width : "540", height : "470", theme_advanced_toolbar_location : "top", theme_advanced_statusbar_location : "none", theme_advanced_font_sizes : "1,2,3,4,5,6,7", font_size_style_values : "0.6em,0.8em,1em,1.2em,1.5em,2em,3em", theme_advanced_buttons1 : "newdocument,|,copy,cut,paste,|,hr,pagebreak,|,undo,redo,|,code|,image,code", theme_advanced_buttons2 : "fontselect,fontsizeselect,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,forecolor,backcolor", // <-- This gives me double forecolor and backcolor theme_advanced_buttons3 : "table,|,row_props,cell_props,|,col_before,col_after,row_before,row_after,|,split_cells,merge_cells,|,delete_col,delete_row," });

    Read the article

  • Add client side javascript code and ASP.Net validation on a asp.net button

    - by Vinni
    Hello guys, I wanted to write javascript code on "OnClientClick" of the asp.net button and also I want the asp.net validation to be run for that button. but when i mix these both validation is not working. please help me out. Below is my code ASPX <asp:Button ID="btnAddToFeatureOffers" runat="server" Text="Add to Feature Offers" OnClick="btnAddToFeatureOffers_Click" ValidationGroup="vgAddOffer" OnClientClick="add();" /> javascript function add() { var selectedOrder = $('#ctl00_MainContent_ddlFeaturedHostingType option:selected')[0].index; var offer = $('#<%=txtOrder.ClientID%>').val(); var a = $("<a>").attr("href", "#").addClass("offer").text("X"); $("<div>").text(offer).append(a).appendTo($('#resultTable #resultRow td')[selectedOrder - 1]); }

    Read the article

  • Wiring up JavaScript handlers after a Partial Postback in ASP.NET

    - by Richard
    I am trying to use LinkButtons with the DefaultButton property of the ASP.NET Panel in an UpdatePanel. I have read and used the various other answers that are around describing the wiring up of the click event so that a full postback is not done instead of a partial postback. When the page loads, I wire up the .click function of the LinkButton so that the DefaultButton property of the ASP.NET panel will work. This all works fine, until you bring an UpdatePanel into the mix. With an UpdatePanel, if there is a partial postback, the script to wire up the .click function is not called in the partial postback, and hitting enter reverts to causing a full submit of the form rather than triggering the LinkButton. How can I cause javascript to be executed after a partial postback to re-wire up the .click function of the LinkButton? I have produced a sample page which shows the problem. There are two alerts showing 1) When the code to hook up the .click function is being called, and 2) When the .click function has been called (this only happens when you hit enter in the textbox after the event has been wired up). To test this code, type something in the textbox and hit Enter. The text will be copied to the label control, but "Wiring up Event Click" alert will not be shown. Add another letter, hit enter again, and you'll get a full postback without the text being copied to the label control (as the LinkButton wasn't called). Because that was a full postback, the Wiring Up Event Click event will be called again, and the form will work properly the next time again. This is being done with ASP.NET 3.5. Test Case Code: <%@ Page Language="C#" Inherits="System.Web.UI.Page" Theme="" EnableTheming="false" AutoEventWireup="true" %> <script runat="server"> void cmdComplete_Click(object sender, EventArgs e) { lblOutput.Text = "Complete Pressed: " + txtInput.Text; } void cmdFirstButton_Click(object sender, EventArgs e) { lblOutput.Text = "First Button Pressed"; } protected override void OnLoad(EventArgs e) { HookupButton(cmdComplete); } void HookupButton(LinkButton button) { // Use the click event of the LinkButton to trigger the postback (this is used by the .click code below) button.OnClientClick = Page.ClientScript.GetPostBackEventReference(button, String.Empty); // Wire up the .click event of the button to call the onclick function, and prevent a form submit string clickString = string.Format(@" alert('Wiring up click event'); document.getElementById('{0}').click = function() {{ alert('Default button pressed'); document.getElementById('{0}').onclick(); }};", button.ClientID, Page.ClientScript.GetPostBackEventReference(button, "")); Page.ClientScript.RegisterStartupScript(button.GetType(), "click_hookup_" + button.ClientID, clickString, true); } </script> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>DefaultButton/LinkButton Testing</title> <style type="text/css"> a.Button { line-height: 2em; padding: 5px; border: solid 1px #CCC; background-color: #EEE; } </style> </head> <body> <h1> DefaultButton/LinkButton Testing</h1> <form runat="server"> <asp:ScriptManager runat="server" /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <div style="position: relative"> <fieldset> <legend>Output</legend> <asp:Label runat="server" ID="lblOutput" /> </fieldset> <asp:Button runat="server" Text="First Button" ID="cmdFirstButton" OnClick="cmdFirstButton_Click" UseSubmitBehavior="false" /> <asp:Panel ID="Panel1" runat="server" DefaultButton="cmdComplete"> <label> Enter Text:</label> <asp:TextBox runat="server" ID="txtInput" /> <asp:LinkButton runat="server" CssClass="Button" ID="cmdComplete" OnClick="cmdComplete_Click" Text="Complete" /> </asp:Panel> </div> </ContentTemplate> </asp:UpdatePanel> <asp:Button runat="server" ID="cmdFullPostback" Text="Full Postback" /> </form> </body> </html>

    Read the article

  • How to access ASP.NET drop down box from jquery

    - by Sayem Ahmed
    Well, I have a really small problem. How can I access an ASP.NET Drop down list from jquery? I tried to use "CssClass" property of the drop down list to assign a CSS class and then accessing that list using that class, but later I found out that the class changes when an element is selected, so my initial class replaced by a new class. I also cannot use the "ClientID" property because the part of code that access that list is not inside the page, but in a separate javascript file. So how can I access it ?

    Read the article

  • Js/Jquery bind Datatable or Datalist

    - by Robin Rieger
    Scenario I have a input box for post codes. When you put in a postcode it makes a call to a web service and gets all the suburb names back and binds them to a list, like an input dropdown list. This works when I return a List<string> from the web service for just the names. No problem. The problem arises when I go to save the values to the db. When it gets saved I cannot save the name of the suburb in the suburb column in the db. I have to save the id of that suburb for the foreign key constraint. So then I changed the List<> thing slighty and cheated and returned the following. <ArrayOfString> <string>8213</string> <string>BROOKFIELD</string> <string>8214</string> <string>CHAPEL HILL</string> <string>8215</string> <string>FIG TREE POCKET</string> etc.... The reason for this is so I can have the value of the item in the drop down as the id and hence can save that in the code behind on save. To do this, I did the following: $(result).each(function (index, value) { var suburbname; var pattern = new RegExp('[0-9*]'); var m = pattern.exec(value); if (m == null) { suburbname = value var o = new Option(suburbname, suburbid); /// jquerify the DOM object 'o' so we can use the html method $(o).html(suburbname); $(document.getElementById('<%= suburb.ClientID %>')).append($("<option></option>") .attr("value", suburbid) .text(suburbname)); } else { suburbid = value } That works as well... the drop down only has name and the value for those is the number The problem....? I am making assumptions above which I don't like... I.e. that the name never has a number it, that the web service will always return the id first to set the id before running the add to the dropdown for the first time. It just feels wrong.... :S (thoughts?) So, if I change the web service to return a datatable, to out the following (which is what the whole query returns): <Suburbs diffgr:id="Suburbs1" msdata:rowOrder="0"> <SuburbID>8213</SuburbID> <SuburbName>BROOKFIELD</SuburbName> <StateID>4</StateID> <StateCode>07</StateCode> <CountryCode>61</CountryCode> <TimeZones>10.00</TimeZones> <Postcode>4069</Postcode> </Suburbs> Is there a way of acheiving the same as above in js/jquery. So when the user inputs the postcode the webservice returns the datatable and then binds it to the select with the SuburbID going into the value and the name going into the text??? Any other ways I could return the data from the web service to solve this? Note: essentially I need the option to look like this: <option value="8213">BROOKFIELD</option> I also thought I could make a second call to get just the id on the bind of the text... but I kind of want to only make one call.... Thanks in adance, Cheers Robin .net, C#, js, jquery, web service..... Solution with guidance from Billy The adding to the select using the other method below did not work, but my original way did once I had the correct variables so just used that.... The service returns: <ArrayOfMyClass> <MyClass> <ID>8213</ID> <Name>BROOKFIELD</Name> </MyClass> ... etc The js is: (note: it is onchange of the postcode input box. it runs a web service and then on success runs the following) function OnCompleted(result) { var _suburbs = result; var i = 0; $(_suburbs).each(function () { var SuburbName = _suburbs[i].Name; var SuburbID = _suburbs[i].ID; $(document.getElementById('<%= suburb.ClientID %>')).append($("<option></option>") .attr("value", SuburbID) .text(SuburbName)); i = i + 1; });

    Read the article

  • Javascript display property

    - by Nani
    In my form I have a textbox and a calendr along with other controls asp:TextBox ID="TextBox2" runat="server" onfocus="CalOpen()" asp:TextBox asp:Calendar ID="Calendar1" runat="server" style="display:none;" onselectionchanged="Calendar1_SelectionChanged" script type="text/javascript" function CalOpen() { var cal = document.getElementById('<%=Calendar1.ClientID%>'); cal.style.display='block'; } /script protected void Calendar1_SelectionChanged(object sender, EventArgs e) { TextBox2.Text = Calendar1.SelectedDate.ToLongDateString(); Calendar1.Visible = false; } protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { Calendar1.Visible = true; } For the first time it worked fine, but, 2nd time when I click TextBox2, that is, after selecting date for the first time. Broeser is throwing error"object required" I am unable to know where I went wrong. Plz help me in making my code correct. Thank You.

    Read the article

  • Run JavaScript after a DropDownList is DataBound

    - by Daniel Coffman
    I need to trigger a JavaScript function to be called AFTER a DropDownList on my ASP.NET WebForms page is DataBound, because the SelectedIndex of this DropDownList is the parameter to the JavaScript function. I've tried this various ways, but it seems that if I do it with pure JavaScript onload by using ClientScript.RegisterStartUpScript, the control can be found (because it hasn't been assigned a clientID yet?). If I use jQuery (document).ready { } it says that the DropDownList has no selectedIndex.value. So I need some JavaScript to run AFTER the control has a value set by the DataBind. How can I accomplish this? onChanged won't work because I need the function to fire on the first page load, with no user input. DataBinding the SelectedIndex of the DropDownList doesn't cause the JavaScript onChanged event to fire.

    Read the article

  • Is it possible that __doPostBack() would ever send a GET request?

    - by Galilyou
    I'm having a problem with telerik RadGrid, I want to enable multiple row selection. I also want to go to the server whenever a row is selected or deselected. I created a javascript function to handle the Grid's client side events (OnRowSelected, and OnRowDeSelected). The functions look like this: function onOperationRowSelected(sender, eventArgs) { __doPostBack("<%=myControl.ClientID %>", "rowSelected:" + eventArgs.get_itemIndexHierarchical()); } The other function is very similar, the only difference is that it sends the string "rowDeselcted" instead of "rowSelected". On Page_Load I check to see if the request is a Post request using "IsPostBack" and if so, I check to see if it's a rowSelected or rowdeselected. My problem is when I select a first raw on my grid, a Post request happens (which is expected), however, when I select the second row, a GET request is issued, which (obviously) will result in IsPostBack returning false. What am I missing here?

    Read the article

  • Ajax AsyncFileUpload contains Filename Every time

    - by Kartik Patel
    I have used the Ajax AsyncFileUpload.I have three field. 1.Name 2.Asynchronous File Upload 3.Description 4.Save buttton when I click on Save new Record created.after creating new record when i enter all above details except select the Asynchronous File Upload.However when i click on Save button the Asynchronous File Upload contains the before Asynchronous upload File Name inspite of i didnt select the File from File Upload...How its possible getting confused.. My code is like this i have used master page. <asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server"> <script type="text/javascript" language="javascript"> function UploadComplete() { document.getElementById('<%=lblmsg.ClientID %>').innerHTML = "Image Uploaded Successfully."; } function UploadError() { document.getElementById('<%=lblmsg.ClientID %>').innerHTML = "Image Upload Failed."; } </script> <table> <tr> <td colspan="2"> <h1 style="color: #008000"> Add Project Details</h1> </td> </tr> <tr> <td align="left"> <asp:Label ID="lblProjectName" runat="server" Text="Project Name" Font-Bold="true"></asp:Label> </td> <td align="left"> <asp:TextBox ID="txtProjectName" runat="server" MaxLength="50" Width="150px" ValidationGroup="Save"></asp:TextBox> <asp:RequiredFieldValidator ID="rfvprojectname" runat="server" Text="Project Name is Required." ErrorMessage="Project Name is Required." ControlToValidate="txtProjectName" ForeColor="Red" ValidationGroup="Save"></asp:RequiredFieldValidator> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td align="left"> <asp:Label ID="lblselectimage" runat="server" Text="Select Image" Font-Bold="true"></asp:Label> </td> <td align="left"> <table> <tr> <td> <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </cc1:ToolkitScriptManager> <cc1:AsyncFileUpload ID="AsyncFileUpload1" runat="server" OnClientUploadComplete="UploadComplete" OnClientUploadError="UploadError" CompleteBackColor="White" Width="350px" UploaderStyle="Traditional" UploadingBackColor="#CCFFFF" ThrobberID="imgLoad" OnUploadedComplete="fileuploadComplete" ClientIDMode="AutoID" EnableViewState="true"/> </td> <td> <asp:Image ID="imgUpload" runat="server" Width="50px" Height="50px" /> </td> </tr> </table> </td> </tr> <tr> <td> </td> <td> <asp:Image ID="imgLoad" runat="server" ImageUrl="~/Images/loading-gif-animation.gif" Width="50px" Height="50px" /> <asp:Label ID="lblmsg" runat="server" ForeColor="Blue" Font-Bold="true"></asp:Label> </td> </tr> <tr> <td align="left"> <asp:Label ID="lblDescription" runat="server" Text="Description" Font-Bold="true"></asp:Label> </td> <td align="left"> <asp:TextBox ID="txtDescription" runat="server" MaxLength="1000" Width="300" TextMode="MultiLine" ValidationGroup="Save" Height="100px"></asp:TextBox> <asp:RequiredFieldValidator ID="RfvtxtDescription" runat="server" Text="Project Description is Required." ErrorMessage="Project Description is Required." ControlToValidate="txtDescription" ForeColor="Red" ValidationGroup="Save"></asp:RequiredFieldValidator> </td> </tr> <tr> <td> </td> <td align="left"> <asp:ImageButton ID="btnsave" runat="server" ImageUrl="~/Images/Save.jpg" OnClick="btnSave_Click" Height="37px" ValidationGroup="Save" /> </td> </tr> </table>

    Read the article

  • ASP.NET: Why is my JavaScript object set to null?

    - by Giffyguy
    I have a <script> that contains this line: var tbl = document.getElementById("<%= this.tblSelection.ClientID %>"); ... but tbl always ends up being set to null. The table is declared like this: <asp:Table ID="tblSelection" runat="server" CellPadding="2" CellSpacing="0" cols="1" style="position: absolute; top: 0%; right: 0%"> Both the script and the table are in the same master page file. What could be causing this? EDIT: I should mention that this script is executed on onload

    Read the article

  • CKEditor and asp.net

    - by TheVillageIdiot
    I am using CKEditor on my page. It is working fine except when I post back. I am getting this error: A potentially dangerous Request.Form value was detected from the client (ctl00$MainContent$txtDesc="<p> &nbsp;</p> I am using this code to put CKEditor value into textbox on OnClientClick event of submit button: function getEditorValue(){ var editor=$("#<%= txtDesc.ClientID%>").ckeditorGet(); editor.updateElement(); return true; }

    Read the article

  • How do I pass custom variables to javascript events?

    - by RoboShop
    I have a user control with a javascript function which references some controls within the user control. This user control works perfectly when there is only one instance of it, but I'm now building a page where I have two instances of the user control. In IE7, it works fine, but in FireFox, it is getting confused that there is two functions of the exact same name and signature. So on UserControl1, it'll be running the function in UserControl2 and modifying that content. I'm thinking my best solution would be to pass the clientID of the components I need TO the function instead of just directly referencing it in the function. How would I do that? The signature of the javascript function is like this function nodeClicking(sender, args) and I'm calling it in an event like this <telerik:RadTreeView runat="server" ID="OrgUnitTreeView" OnInit="TreeViewLoad" OnClientNodeClicking="**nodeClicking**" EnableViewState="true" DataTextField = "OrganisationUnitName" DataValueField = "OrganisationUnitCode" DataFieldParentID = "ParentOrganisationUnitCode" DataFieldID = "OrganisationUnitCode"> How do I add extra variables to the function signature.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16  | Next Page >