Daily Archives

Articles indexed Saturday April 24 2010

Page 15/78 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Ajaxtoolkit TextboxWatermarkExtender: How to change the text from Javascript

    - by George
    I think thaAjaxControlToolkitTextBoxWrapperThis use to work, but I think that upgrading to te latest version of teh Toolkit (4 something) broke it: var txtExpireYear = document.getElementById("ctl00_phPageContent_dtmPassportExpirationDate_txtYear"); txtExpireYear.AjaxControlToolkitTextBoxWrapper.set_Value(dtmDateOfExpire.getFullYear()); I now get the error: Microsoft JScript runtime error: 'AjaxControlToolkitTextBoxWrapper' is null or not an object Executing this: txtExpireYear.innerText="value1" txtExpireYear.value="value2" results in the watermark text being changed, not the textbox's text.

    Read the article

  • Emacs: Often switching between Emacs and my IDE's editor, how to automatically 'synch' the files?

    - by WizardOfOdds
    I very often need to do some Emacs magic on some files and I need to go back and forth between my IDE (IntelliJ IDEA) and Emacs. When a change is made under Emacs (and after I've saved the file) and I go back to IntelliJ the change appears immediately (if I recall correctly I configured IntelliJ to "always reload file when a modification is detected on disk" or something like that). I don't even need to reload: as soon as IntelliJ IDEA gains focus, it instantly reloads the file (and I hence have immediately access to the modifications I made from Emacs). So far, so very good. However "the other way round", it doesn't work yet. Can I configure Emacs so that everytime a file is changed on disk it reloads it? Or make Emacs, everytime it "gains focus", verify if any file currently opened has been modified on disk? I know I can start modifying the buffer under Emacs and it shall instantly warn that it has been modified, but I'd rather have it do it immediately (for example if I used my IDE to do some big change, when I come back to Emacs what I see may not be at all anymore what the file contains and it's a bit weird).

    Read the article

  • I recieved an email but the to address is not mine

    - by user35072
    As per title, my email address is [email protected] and received an email from [email protected]. But in my Web Client i see: From: [email protected] To: [email protected] I received this on my [email protected] account so how did i get this email in my inbox? I have no affiliation whatsoever with [email protected]. Actually i have received a few emails from [email protected] where the TO address differs. What's going on?

    Read the article

  • Unable to get nodeValue using DOMDocument class in PHP

    - by Harish
    I am Parsing a HTML document using DOMDocument Class in PHP, i wanted to get the nodeValue of a div element, but it is giving me null, <div id="summary"> Hi, my name is <span>ABC</span> <br/> address is here at stackoverflow... <span>.... .... <div> want to get the value inside the div, and the code i wrote wass $div_node=$dom->getElementById("summary"); $node_value=$div_node->nodeValue; but it is giving me a null value, please help.

    Read the article

  • validation message display repeatedly

    - by Raam
    hello, in struts2, i create a simple appln.I use client side validation(using ActionClass-Validation.xml),when i get validation error it displays the message well..but a error repeatedly occur it display the old and new message again and again..how can i solve the issue? user name: xxx password error password error password : Button thankss

    Read the article

  • Read Text From Windows Form

    - by omghai2u
    I would like, if for no other reason that an academic exercise, to be able to read text written to a form on a Windows Application. The program appears to be written in non-.NET, but in .NET terms, I think you would describe the program as having a Form with a Label and I would like to read the text from that label. I believe I can see that text being written to the screen with the User32!TextOut (and in other areas User32!DrawString) function. However, it would be nice if I didn't have to hook that function to get the information I'm looking for, but instead if I could just read it from the form directly. So, given a handle to a Window, is it possible to read the text that has been written to that window with functions like TextOut and DrawString using some similar API or other clever means? Or am I going about this the wrong way? Should I just hook the function and look for the text in every call and pray? Thanks!

    Read the article

  • Populating data in multiple cascading dropdown boxes in Access 2007

    - by miCRoSCoPiC_eaRthLinG
    Hello all, I've been assigned the task to design a temporary customer tracking system in MS Access 2007 (sheeeesh!). The tables and relationships have all been setup successfully. But I'm running into a minor problem while trying to design the data entry form for one table... Here's a bit of explanation first. The screen contains 3 dropdown boxes (apart from other fields). 1st dropdown The first dropdown (cboMarket) represents the Market lets users select between 2 options: Domestic International Since the first dropdown contains only 2 items I didn't bother making a table for it. I added them as pre-defined list items. 2nd dropdown Once the user makes a selection in this one, the second dropdown (cboLeadCategory) loads up a list of Lead Categories, namely, Fairs & Exhibitions, Agents, Press Ads, Online Ads etc. Different sets of lead categories are utilized for the 2 markets. Hence this box is dependent on the 1st one. Structure of the bound table, named Lead_Cateogries for the 2nd combo is: ID Autonumber Lead_Type TEXT <- actually a list that takes up Domestic or International Lead_Category_Name TEXT 3rd dropdown And based on the choice of category in the 2nd one, the third one (cboLeadSource) is supposed to display a pre-defined set of lead sources belonging to the particular category. Table is named Lead_Sources and the structure is: ID Autonumber Lead_Category NUMBER <- related to ID of Lead Categories table Lead_Source TEXT When I make the selection in the 1st dropdown, the AfterUpdate event of the combo is called, which instructs the 2nd dropdown to load contents: Private Sub cboMarket_AfterUpdate() Me![cboLead_Category].Requery End Sub The Row Source of the 2nd combo contains a query: SELECT Lead_Categories.ID, Lead_Categories.Lead_Category_Name FROM Lead_Categories WHERE Lead_Categories.Lead_Type=[cboMarket] ORDER BY Lead_Categories.Lead_Category_Name; The AfterUpdate event of 2nd combo is: Private Sub cboLeadCategory_AfterUpdate() Me![cboLeadSource].Requery End Sub The Row Source of 3rd combo contains: SELECT Leads_Sources.ID, Leads_Sources.Lead_Source FROM Leads_Sources WHERE [Lead_Sources].[Lead_Category]=[Lead_Categories].[ID] ORDER BY Leads_Sources.Lead_Source; Problem When I select Market type from cboMarket, the 2nd combo cboLeadCategory loads up the appropriate Categories without a hitch. But when I select a particular Category from it, instead of the 3rd combo loading the lead source names, a modal dialog is displayed asking me to Enter a Parameter. When I enter anything into this prompt (valid or invalid data), I get yet another prompt: Why is this happening? Why isn't the 3rd box loading the source names as desired. Can any one please shed some light on where I am going wrong? Thanks, m^e

    Read the article

  • Apply CSS style to anchor problem

    - by Jake
    Using jquery I have a clicking tab mechanism that are nothing but anchor tags that return false but call javascript functions to run some events on the page. The problem is I am using jquery to apply an opacity style to the active anchor. and the other sibling anchor get a lesser opacity view. My code looks like this $("#menutab li a").click(function(){ $(this).animate({opacity:'1'},1000); $(this).siblings().animate({opacity:'.25'},1000); } I would think this code would act only on the clicked element and apply that css style to that element and the other style to the other anchor tags except the clicked one. It kind of does that, but also what it does is leave the earlier clicked element to opacity =1, so if I click an element it sets it opacity to 1 and then if I click another one it sets it opacity to 1 while leave the earlier clicked one to 1 also instead of setting it to .25 like the others. Edit: I changed the above code to: $("#menutab ul li").click(function(){ $(this).children().animate({opacity:'1'},1000); $(this).siblings().children().animate({opacity:'.25'},1000); }); and now I get the desired effect, except that when the first anchor in the list is clicked doesn't follow the event rules, When the first one is clicked its as if, the click event is not triggered, because no opacity style changes. which I don't understand.

    Read the article

  • Open source equivelants to VS / web reference proxy class autogen?

    - by seraphym
    As an ASP.NET developer, I'm used to working with how VS/C# transparently autogens proxy classes for web references (yes, I know, we're spoiled), but now that I'm creating documentation for more than one coding platform I'm trying to discover what the equivelant to that is in any other framework. So is there a similar way to work transparently with web reference proxy classes for say, RoR, PHP, and Python? And if there's nothing integrated, are there tools you recommend to autogen the proxy classes, or do you recommend to roll custom classes?

    Read the article

  • How to insert several thousand columns into sqlite3?

    - by user291071
    Similar to my last question, but I ran into problem lets say I have a simple dictionary like below but its Big, when I try inserting a big dictionary using the methods below I get operational error for the c.execute(schema) for too many columns so what should be my alternate method to populate an sql databases columns? Using the alter table command and add each one individually? import sqlite3 con = sqlite3.connect('simple.db') c = con.cursor() dic = { 'x1':{'y1':1.0,'y2':0.0}, 'x2':{'y1':0.0,'y2':2.0,'joe bla':1.5}, 'x3':{'y2':2.0,'y3 45 etc':1.5} } # 1. Find the unique column names. columns = set() for _, cols in dic.items(): for key, _ in cols.items(): columns.add(key) # 2. Create the schema. col_defs = [ # Start with the column for our key name '"row_name" VARCHAR(2) NOT NULL PRIMARY KEY' ] for column in columns: col_defs.append('"%s" REAL NULL' % column) schema = "CREATE TABLE simple (%s);" % ",".join(col_defs) c.execute(schema) # 3. Loop through each row for row_name, cols in dic.items(): # Compile the data we have for this row. col_names = cols.keys() col_values = [str(val) for val in cols.values()] # Insert it. sql = 'INSERT INTO simple ("row_name", "%s") VALUES ("%s", "%s");' % ( '","'.join(col_names), row_name, '","'.join(col_values) )

    Read the article

  • joins- how to pass the parameter in stored procedure to execute a join query

    - by Ranjana
    i have used joins to get datas from two tables under comman name. as SELECT userValidity.UserName, userValidity.ValidFrom,userValidity.ValidUpTo,userValidity.TotalPoints, persons.SenderID FROM userValidity INNER JOIN persons ON userValidity.Username=tbl_persons.Username but i need to execute this query with oly the username which i pass as parameter in stored procedure.. how to pass the username in stored procedure in this joins. alter procedure GetNameIDUserInformation ( @user varchar(max) ) as begin SELECT userValidity.UserName, userValidity.ValidFrom,userValidity.ValidUpTo,userValidity.TotalPoints, persons.SenderID FROM userValidity INNER JOIN persons ON userValidity.Username=tbl_persons.Username end in this SP, where i have to pass the user parameter to get the single row of my user record

    Read the article

  • How can I use the FOR attribute of a LABEL tag without the ID attribute on the INPUT tag

    - by Shawn
    Is there a solution to the problem illustrated in the code below? Start by opening the code in a browser to get straight to the point and not have to look through all that code before knowing what you're looking for. <html> <head> <title>Input ID creates problems</title> <style type="text/css"> #prologue, #summary { margin: 5em; } </style> </head> <body> <h1>Input ID creates a bug</h1> <p id="prologue"> In this example, I make a list of checkboxes representing things which could appear in a book. If you want some in your book, you check them: </p> <form> <ul> <li> <input type="checkbox" id="prologue" /> <label for="prologue">prologue</label> </li> <li> <input type="checkbox" id="chapter" /> <label for="chapter">chapter</label> </li> <li> <input type="checkbox" id="summary" /> <label for="summary">summary</label> </li> <li> <input type="checkbox" id="etc" /> <label for="etc">etc</label> <label> </li> </ul> </form> <p id="summary"> For each checkbox, I want to assign an ID so that clicking a label checks the corresponding checkbox. The problems occur when other elements in the page already use those IDs. In this case, a CSS declaration was made to add margins to the two paragraphs which IDs are "prologue" and "summary", but because of the IDs given to the checkboxes, the checkboxes named "prologue" and "summary" are also affected by this declaration. The following links simply call a javascript function which writes out the element whose id is <a href="javascript:alert(document.getElementById('prologue'));">prologue</a> and <a href="javascript:alert(document.getElementById('summary'));">summary</a>, respectively. In the first case (prologue), the script writes out [object HTMLParagraphElement], because the first element found with id "prologue" is a paragraph. But in the second case (summary), the script writes out [object HTMLInputElement] because the first element found with id "summary" is an input. In the case of another script, the consequences of this mix up could have been much more dramatic. Now try clicking on the label prologue in the list above. It does not check the checkbox as clicking on any other label. This is because it finds the paragraph whose ID is also "prologue" and tries to check that instead. By the way, if there were another checkbox whose id was "prologue", then clicking on the label would check the one which appears first in the code. </p> <p> An easy fix for this would be to chose other IDs for the checkboxes, but this doesn't apply if these IDs are given dynamically, by a php script for example. Another easy fix for this would be to write labels like this: <pre> &lt;label&gt;&lt;input type="checkbox" /&gt;prologue&lt;/label&gt; </pre> and not need to give an ID to the checkboxes. But this only works if the label and checkbox are next to each other. </p> <p> Well, that's the problem. I guess the ideal solution would be to link a label to a checkboxe using another mechanism (not using ID). I think the perfect way to do this would be to match a label to the input element whose NAME (not ID) is the same as the label's FOR attribute. What do you think? </p> </body> </html>

    Read the article

  • Scripting around the lack of user:password@domain url functionality in jscript/IE

    - by Idiomatic
    I currently have a jscript that runs a php script on a server for me, dead simple. But... I want to be atleast somewhat secure so I setup a login. Now if I use the regular user:password@domain system it won't work (IE decided it was a security issue). And if I let IE just remember the password then it pops up a security message confirming my login every time (which kills the point of the button). So I need a way to make the security message go away. I could lower security settings, which tbh I am fine with but nothing seems to make it fuck off (there might be some registry setting to change). Find a fix for jscript that will let me use a password in the url. There used to be a regedit that worked for older systems which allowed IE to use url passwords (not working on my 64bit windows7 setup) though I doubt that'd have helped jscript anyways (since it outright crashes). Use an app other than IE. Inwhich case I'm not sure how to go about it, I want it to be responsive and invisible so IE was a good choice. It is near instant. Use XMLHttpRequest instead of IE directly? May even be faster but I've no idea if it'd help or just have the same error. Use a completely different approach. Maybe some app that can script website browsing. var args = {}; var objIEA = new ActiveXObject("InternetExplorer.Application"); if( WScript.Arguments.Item(0) == "pause" ){ objIEA.navigate("http://domain/index.html?pause"); } if( WScript.Arguments.Item(0) == "next" ){ objIEA.navigate("http://domain/index.html?next"); } objIEA.visible = false; while(objIEA.readyState != 4) {} objIEA.quit();

    Read the article

  • Is String.concat slower than Array approach to join strings

    - by Rajat
    Strings in JavaScript are immutable. Across the web and here on Stack Overflow as well, I came across the Array approach to concatenate strings: var a = []; a.push(arg1,arg,2....); console.log(a.join('')); I know that this approach is better than the simple console.log(arg1 + arg2 +.....); for reasons of skipping creating intermediate objects but how does it fair better against : arg1.concat(arg2,arg3.....);

    Read the article

  • Sqlite Database Firefox

    - by user159972
    Hi, I want to create a Sqlite Database in Firefox (I can update my Firefox). According to my knowledge Firefox does not give you Sqlite Database access. Is there any plugin or simple patch which gives Sqlite database simulation in Firefox? Regards, Allahbaksh

    Read the article

  • Entity Framework Generic Repository Error

    - by Jeff Ancel
    I am trying to create a very generic generics repository for my Entity Framework repository that has the basic CRUD statements and uses an Interface. I have hit a brick wall head first and been knocked over. Here is my code, written in a console application, using a Entity Framework Model, with a table named Hurl. Simply trying to pull back the object by its ID. Here is the full application code. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.Objects; using System.Linq.Expressions; using System.Reflection; using System.Data.Objects.DataClasses; namespace GenericsPlay { class Program { static void Main(string[] args) { var hs = new HurlRepository(new hurladminEntity()); var hurl = hs.Load<Hurl>(h => h.Id == 1); Console.Write(hurl.ShortUrl); Console.ReadLine(); } } public interface IHurlRepository { T Load<T>(Expression<Func<T, bool>> expression); } public class HurlRepository : IHurlRepository, IDisposable { private ObjectContext _objectContext; public HurlRepository(ObjectContext objectContext) { _objectContext = objectContext; } public ObjectContext ObjectContext { get { return _objectContext; } } private Type GetBaseType(Type type) { Type baseType = type.BaseType; if (baseType != null && baseType != typeof(EntityObject)) { return GetBaseType(type.BaseType); } return type; } private bool HasBaseType(Type type, out Type baseType) { Type originalType = type.GetType(); baseType = GetBaseType(type); return baseType != originalType; } public IQueryable<T> GetQuery<T>() { Type baseType; if (HasBaseType(typeof(T), out baseType)) { return this.ObjectContext.CreateQuery<T>("[" + baseType.Name.ToString() + "]").OfType<T>(); } else { return this.ObjectContext.CreateQuery<T>("[" + typeof(T).Name.ToString() + "]"); } } public T Load<T>(Expression<Func<T, bool>> whereCondition) { return this.GetQuery<T>().Where(whereCondition).First(); } public void Dispose() { if (_objectContext != null) { _objectContext.Dispose(); } } } } Here is the error that I am getting: System.Data.EntitySqlException was unhandled Message="'Hurl' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly., near escaped identifier, line 3, column 1." Source="System.Data.Entity" Column=1 ErrorContext="escaped identifier" ErrorDescription="'Hurl' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly." This is where I am attempting to extract this information from. http://blog.keithpatton.com/2008/05/29/Polymorphic+Repository+For+ADONet+Entity+Framework.aspx

    Read the article

  • GUI by using Qt

    - by kishorebjv
    hi all... i dont know any thing about Qt other than my friend told that it generates the GUI for c++ code.... please let me know 1.How to execute some command when a button in window is clicked..? "g++ encryption.cpp -lgmp" command should be executed when i pressed "enc" button.. 2.How to accept the text from text area(in the window) to a textfile and the text(need not be text,it can be any data..) in a text file should be displayed in Textarea of window ? please help me out... im running out of time... thanks in advance....

    Read the article

  • How can you buffer two online videos alternately while playing one of them?

    - by Rajats1234
    On my website, I want my user to be able to launch video 2 at any point in the middle of video 1 without waiting or refreshing the window. How can I buffer the two videos such that I buffer video 1 enough to let it start playing, and then buffer just enough of video 2 that if the user launches it at any point, he does not have to wait to view its first few seconds, and then I can come back and buffer the rest of video 1? If this is not possible, I could also look at buffering video 1 and 2 in parallel while playing only video 1. Thanks!

    Read the article

  • JavaScript, iPhone: Repeat Action while Holding Button

    - by Doug
    I am working on a website which I would like to work on iPhones, however I want it so they can tap and hold a button and have it continue firing the onclick event. I got it to work in other browsers, but the iPhone is the only one that will need to hold down the button. Is there a way to repeat a function when holding down the button? Thanks.

    Read the article

  • ObjectDisposedException when .Show()'ing a form that shouldn't be disposed.

    - by user320781
    ive checked out some of the other questions and obviously the best solution is to prevent the behavior that causes this issue in the first place, but the problem is very intermittent, and very un-reproduceable. I basically have a main form, with sub forms. The sub forms are shown from menus and/or buttons from the main form like so: private void myToolStripMenuItem_Click(object sender, EventArgs e) { try { xDataForm.Show(); xDataForm.Activate(); } catch (ObjectDisposedException) { MessageBox.Show("ERROR 10103"); ErrorLogging newLogger = new ErrorLogging("10103"); Thread errorThread = new Thread(ErrorLogging.writeErrorToLog); errorThread.Start(); } } and the sub forms are actually in the main form(for better or worse. i would actually like to change this but would be a considerable amount of time to do so): public partial class FormMainScreen : Form { Form xDataForm = new xData(); ...(lots more here) public FormMainScreen(int pCount, string pName) { InitializeComponent(); ... } ... } The Dispose function for the sub form is modified so that, the 'close' and 'X' buttons actually hide the form so we dont have to re-create it every time. When the main screen closes, it sets a "flag" to 2, so the other forms know that it is actually ok to close; protected override void Dispose(bool disposing) { if (FormMainScreen.isExiting == 2) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } else { if (xData.ActiveForm != null) { xData.ActiveForm.Hide(); } } } So, the question is, why would this work over and over and over again flawlessly, but, literally, about every 1/1000 of the time, cause an exception, or rather, why is my form being disposed? I had a suspicion that the garbage collector was getting confused, because it occurs slightly more frequently after it has been running for many hours.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >