Daily Archives

Articles indexed Monday March 15 2010

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

  • Concatenate javascript to a string/parameter in a function

    - by Gerry S
    I am using kottke.org's old JAH example to return some html to a div in a webpage. The code works fine if I use static text. However I need to get the value of a field to add to the string that is getting passed as the parameter to the function. var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @end @*/ if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { xmlhttp = new XMLHttpRequest(); } function getMyHTML(serverPage, objID) { var obj = document.getElementById(objID); xmlhttp.open("GET", serverPage); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { obj.innerHTML = xmlhttp.responseText; } } xmlhttp.send(null); } And on the page.... <a href="javascript://" onclick="getMyHTML('/WStepsDE?open&category="+document.getElementById('Employee').value;+"','goeshere')">Change it!</a></p> <div id ="goeshere">Hey, this text will be replaced.</div> It fails (with the help of Firebug) with the getMyHTML call where I try to get the value of Employee to include in the first parameter. The error is "Unterminated string literal". Thx in advance for your help.

    Read the article

  • Supporting multiple versions without separate builds in JavaME

    - by Casebash
    I want to be able to support multiple versions of Java ME without having to have multiple builds. I already know how to detect the profile/configuration/supported JSRs. My problem is that knowing whether the JSR is supported at run time doesn't allow me to use all the features. For if I call a function added in a later version anywhere in the code - even a location that will never be run, then this will be a compilation error due to static typing. Is there any way round this?

    Read the article

  • mod_rewrite to find missing /img/foo.jpg in /img/f/

    - by Ambrose
    I've got a folder of images which is reaching a critical mass after a few years. I want to move images into alphabetical folders, so that /img/foo.jpg goes into /img/f/foo.jpg and /img/bar.jpg goes into /img/b/bar.jpg and so on. In order to make the transition smooth, and to allow the manual uploaders to put stuff into the top level, I'd like to use mod_rewrite to do this: if /img/foo.jpg exists, serve it up, if not look for it in /img/f/foo.jpg thanks for any suggestions. For the record, no, I don't think we need to go /img/f/fo/foo.jpg just yet.

    Read the article

  • Python directory list returned to Django template

    - by Shu
    Total Python newb here. I have a images directory and I need to return the names and urls of those files to a django template that I can loop through for links. I know it will be the server path, but I can modify it via JS. I've tried os.walk, but I keep getting empty results.

    Read the article

  • Grails URL's with Tomcat/Apache ProxyPass

    - by intargc
    Grails tends to write out the URL for everything that uses its tags as /appName/whatever. For instance, if I use the tag: <g:javascript library="jquery"/> the resulting tag is <script src="/appName/jquery/jquery.js"></script> This causes an issue with using ProxyPass with Apache/Tomcat. All of my CSS, JS, Images and links have that /appName prefixed to them. Is there a way to work around this with ProxyPass or possibly a way for Grails to not prefix the appName to the front of all of my URL's?

    Read the article

  • Why are IOC containers unnecessary with dynamic languages

    - by mikemay
    Someone on the Herding Code podcast No. 68, http://herdingcode.com/?p=231, stated that IOC containers had no place with Python or Javascript, or words to that effect. I'm assuming this is conventional wisdom and that it applies to all dynamic languages. Why? What is it about dynamic languages that makes IOC containers unnecessary?

    Read the article

  • git push current branch

    - by Nocturne
    I use the following command to push to my remote branch: git push origin sandbox If I say git push origin Does that push changes in my other branches too, or does it only update my current branch? (I have three branches: master, production and sandbox). (The git push documentation is not very clear about this, so I'd like to clarify this for good) What branches/remotes do the following git push commands exactly update? git push git push origin ("origin" above is a remote) (I understand that "git push [remote] [branch]" will push only that branch to the remote)

    Read the article

  • Rails based S3 file manager

    - by Jim Jones
    Hi, I'm looking for an open source project that provides a file manager type interface to S3. The ability to view files and "folders", add/edit/delete files/folders, etc. I've seen http://s3fm.com, but I'd like to host something like that myself. Does anything like this exist? Thanks.

    Read the article

  • how a custom BizTalk pipeline component can be used to split an incoming message into smaller indivi

    Use a custom pipeline component to split an incoming message into smaller individual messages for further processing. Sample shows how to use simple but powerful techniques that can be built upon and developed for use in a production environment  read moreBy BiZTech KnowDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Problem installing SSL on centos 5.2 with plesk

    - by Haluk
    Hello, I'm trying to install an ssl certificate to a dedicated centos 5.2 server. I followed the hosting company's instructions but the ssl is not working. When I try to access my website using https, Firefox gives the following error: uses an invalid security certificate. The certificate expired on 3/13/2010 11:56 AM. (Error code: sec_error_expired_certificate) I'm not sure where the problem is. You should also know that this server has plesk installed, even though I'm not using it, it could potentially be somehow overriding my httpd.conf or ssl.conf. Thanks!

    Read the article

  • record phone conversation on a WM device

    - by doug
    Hi there does anyone know a good windows mobile software application which will allow me to record the phone discussion (what I say and what the other person says) Also I'll be interested to know which windows mobile application will allow me to use the phone as a audio recorder (reportophon).

    Read the article

  • How to convert laptop drive for use as VMware image?

    - by jnman
    I have a windows laptop that recently died (dead motherboard). It being a 7 year old laptop, I decided to give Apple a try this time around and try to use VMware to access my old data if necessary. In order to do this, I need to convert the physical drive to a VMware image. Googling around, it looks like I might be able to use VMware Convertor to do this. My original intent was to plug the laptop drive into a windows desktop via an external USB enclosure and create the image that way. However, upon further investigation, it looks like VMware Converter only supports converting a local machine (the desktop) or a remote machine (via IP) but not a laptop drive plugged into the local machine. So with that in mind, I'm looking for suggestions and help on how to convert this laptop drive into something I can use on my new Macbook Pro.

    Read the article

  • PHP $_SERVER['HTTP_HOST'] vs. $_SERVER['SERVER_NAME'], am I understanding the man pages correctly?

    - by Jeff
    I did a lot of searching and also read the PHP $_SERVER man page. Do I have this right regarding which to use for my PHP scripts for simple link definitions used throughout my site? $_SERVER['SERVER_NAME'] is based on your web servers' config file (Apache2 in my case), and varies depending on a few directives: (1) VirtualHost, (2) ServerName, (3) UseCanonicalName, etc. $_SERVER['HTTP_HOST'] is based on the request from the client. Therefore, it would seem to me that the proper one to use in order to make my scripts as compatible as possible would be $_SERVER['HTTP_HOST']. Is this assumption correct? Followup comments: I guess I got a little paranoid after reading this article and noting that someone said "they wouldn't trust any of the $_SERVER vars": http://markjaquith.wordpress.com/2009/09/21/php-server-vars-not-safe-in-forms-or-links/ and also: http://www.php.net/manual/en/reserved.variables.server.php (comment: Vladimir Kornea 14-Mar-2009 01:06) Apparently the discussion is mainly about $_SERVER['PHP_SELF'] and why you shouldn't use it in the form action attribute without proper escaping to prevent XSS attacks. My conclusion about my original question above is that it is "safe" to use $_SERVER['HTTP_HOST'] for all links on a site without having to worry about XSS attacks, even when used in forms. Please correct me if I'm wrong.

    Read the article

  • TreeView nodes always have .Checked=true on postback even when not checked in UI

    - by GISmatters
    I have a treeview in my .aspx: <asp:TreeView ID="tvDocCatAndType" runat="server" /> Not much else going on in the page -- two <asp:LinkButtons> and one <asp:Label>; the page is a child of a master page, so these controls are within a <asp:Content> control. I populate the treeview in code -- just 3 node levels, including the root node. All nodes have checkboxes, and I initialize all node.Checked to true. I have some Javascript to do the usual check/uncheck up and down the tree as parent and child node checkboxes are toggled. No matter how many checkboxes I clear in the UI, on postback every single node has node.Checked = true regardless of the state of the checkbox in the UI. This is not the first time I've used a treeview, but I've never had this problem before. I created this page by light adaptation of an earlier project that works fine. Thanks in advance for any helpful comments or questions, Chris

    Read the article

  • How should I handle incomplete packet buffers?

    - by Benjamin Manns
    I am writing a client for a server that typically sends data as strings in 500 or less bytes. However, the data will occasionally exceed that, and a single set of data could contain 200,000 bytes, for all the client knows (on initialization or significant events). However, I would like to not have to have each client running with a 50 MB socket buffer (if it's even possible). Each set of data is delimited by a null \0 character. What kind of structure should I look at for storing partially sent data sets? For example, the server may send ABCDEFGHIJKLMNOPQRSTUV\0WXYZ\0123!\0. I would want to process ABCDEFGHIJKLMNOPQRSTUV, WXYZ, and 123! independently. Also, the server could send ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890LOL123HAHATHISISREALLYLONG without the terminating character. I would want that data set stored somewhere for later appending and processing. Also, I'm using asynchronous socket methods (BeginSend, EndSend, BeginReceive, EndReceive) if that matters.

    Read the article

  • How to use Scrum and Visual Studio without Team System

    - by Donovan Woodside
    I'm interested in possibly using Scrum with my development team (yes, I know it'll be a little painful to transition over to it). However, we don't have Team System and probably can't currently afford to get it immediately. What are some possible tools for getting a team up and running on Scrum in a .NET/Visual Studio environment without Team System?

    Read the article

  • saving a records containing a member of type string to a file (Delphi, Windows)

    - by wonderer
    I have a record that looks similar to: type TNote = record Title : string; Note : string; Index : integer; end; Simple. The reason I chose to set the variables as string (as opposed to an array of chars) is that I have no idea how long those strings are going to be. They can be 1 char long, 200 or 2000. Of course when I try to save the record to a type file (file of...) the compiler complains that I have to give a size to string. Is there a way to overcome this? or a way to save those records to an untyped file and still maintain a sort of searchable way? Please do not point me to possible solutions, if you know the solution please post code. Thank you

    Read the article

  • Why do programmers sometimes refer to "C++/STL" like it's a separate language?

    - by BillyONeal
    This may seem a trivial question, but it's one that's bothered me a lot lately. Why do some programmers refer to "C++/STL" like it's a different language? The STL is part of the C++ standard library -- and therefore is part of the language, "C++". It's not a separate component, and it does not live alone in the scope of things C++. Yet some continually act like it's a different language altogether. Why?

    Read the article

  • AutoMapper Problem - List won't Map

    - by Randy Minder
    I have the following class: public class Account { public int AccountID { get; set; } public Enterprise Enterprise { get; set; } public List<User> UserList { get; set; } } And I have the following method fragment: Entities.Account accountDto = new Entities.Account(); DAL.Entities.Account account; Mapper.CreateMap<DAL.Entities.Account, Entities.Account>(); Mapper.CreateMap<DAL.Entities.User, Entities.User>(); account = DAL.Account.GetByPrimaryKey(this.Database, primaryKey, withChildren); Mapper.Map(account,accountDto); return accountDto; When the method is called, the Account class gets mapped correctly but the list of users in the Account class does not (it is NULL). There are four User entities in the List that should get mapped. Could someone tell me what might be wrong?

    Read the article

  • How can I create a hybrid Silverlight and aspx application

    - by PilotBob
    Here is my scenerio.. We have an ASP.Net 2.x web site. We want to migrate it to Silverlight full frame application. However, there is no way we can go away in a corner and redo every web page in SL right off the bat. What I would like to do is build the chrome of the app (main page, dashboard, login, common system/config screens, main menu) in SL and be able to open existing .aspx pages in the main content SL frame. From what I see there is no way to do this. I thought the Webbrowser control in SL4 would be the answer, but apparently that only works if your app is run out of browser. So, what is my best recourse? It seems like I will have to create some type of .aspx page that hosts the .XAP and pass in the page I want it to load? How would you gurus approach this?

    Read the article

  • (rsErrorOpeningConnection) Could not obtain information about Windows NT group/user

    - by ChelleATL
    I am trying to deploy a report to the Reporting Services Server but keep running up against this error: An error occurred during client rendering. An error has occurred during report processing. (rsProcessingAborted) Cannot create a connection to data source 'dataSource1'. (rsErrorOpeningConnection) Could not obtain information about Windows NT group/user 'DOMAIN\useradmin', error code 0x5. Here’s my situation: Everything is being ran using DOMAIN\useradmin and the report is using a remote database. Reporting Services and SQL Server are both ran under DOMAIN\useradmin. DOMAIN\useradmin is a windows AD login and is part of the server machine Administrators group. My test report is using a data source model that in turn is using a data source that is connection to a database on a different SQL Server. The data source is using “Credentials stored securely in the report server” with the options “Use as Windows credentials when connecting to the data source” and “Impersonate the authenticated user after a connection has been made to the data source.” I am using the credentials of DOMAIN\useradmin that is the db owner of the remote database. DOMAIN\useradmin is assigned the roles, System Administrator, System User and Browser, Content Manager, My Reports, Publisher, Report Builder. So if everything is being run under an über AD account, why I am getting this Could not obtain information about Windows NT group/user 'DOMAIN\useradmin' error? Under normal circumstances , an AD login with Publisher permissions will developing reports using a datasource model created by DOMAIN\useradmin but using one of the remote database’s users which is mapped from yet another AD login. I ran the following statements and non errors were returned: use master go xp_grantlogin 'DOMAIN\useradmin' go xp_logininfo 'DOMAIN\useradmin' go

    Read the article

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