Search Results

Search found 30912 results on 1237 pages for 'load path'.

Page 27/1237 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • SVG animation along path with Raphael

    - by Toby Hede
    I have a rather interesting issue with SVG animation. I am animating along a circular path using Raphael obj = canvas.circle(x, y, size); path = canvas.circlePath(x, y, radius); path = canvas.path(path); //generate path from path value string obj.animateAlong(path, rate, false); The circlePath method is one I have created myself to generate the circle path in SVG path notation: Raphael.fn.circlePath = function(x , y, r) { var s = "M" + x + "," + (y-r) + "A"+r+","+r+",0,1,1,"+(x-0.1)+","+(y-r)+" z"; return s; } So far, so good. This all works. I have my object (obj) animating along the circular path. BUT: The animation only works if I create the object at the same X, Y coords as the path itself. If I start the animation from any other coordinates (say, half-way along the path) the object animates in a circle of the correct radius, however it starts the animation from the object X,Y coordinates, rather than along the path as it is displayed visually. Ideally I would like to be able to stop/start the animation - the same problem occurs on restart. When I stop then restart the animation, it animates in a circle starting from the stopped X,Y.

    Read the article

  • Load Balance WCF and Share a Remote MSMQ for High Throughput

    - by BarDev
    After a ton of reading in books and on the web, I have noticed hints of information that WCF and MSMQ can be used in achieving high throughput. The information I have seen mentions using multiple WCF services in a farm that reads from a single MSMQ queue. The problem is that I have found paragraphs here and there that mentions that high throughput can be done, but I cannot seem to find a document of how to implement it. The following is an excerpt from a MSDN article. The following paragraph is from Best Practices for Queued Communication http://msdn.microsoft.com/en-us/library/ms731093.aspx To achieve higher throughput and availability, use a farm of WCF services that read from the queue. This requires that all of these services expose the same contract on the same endpoint. The farm approach works best for applications that have high production rates of messages because it enables a number of services to all read from the same queue. This is what I'm trying to solve. I have an intranet application where a client sends a request to a WCF service. But I want the ability to load balance the WCF services on multiple servers in a farm. I also want these WCF services in the farm to do transactional reads from a remote MSMQ when an item is available in the Queue. If this is possible, an issue I have is that I do not understand the activation process of WCF to retrieve messages from a remote queue. If this is possible, does anyone know of any articles or Webcasts that would explain it in detail? BarDev

    Read the article

  • How to modify PATH variable for X11 during log-in?

    - by user1028435
    I originally posted this over at StackOverflow, but someone said it might fit better here. Original question is here: http://stackoverflow.com/questions/10096327/overwriting-print-screen-actions-in-linux-without-administrative-rights. Decided to revise my question, based on what I learned there: Essentially, my problem is that I am working on some lab computers (read: no administrative rights) that, if I log in, I need to change the PATH variable as X11 starts. The reason is that I need to change the PATH variable at this time, as opposed to later, is that the Print Screen command seems to "bind" during login (forgive my bad explanation of this). You can see in the work-around I listed in the previous question, that I can make it work by starting a new X, but I was wondering if it is possible to change upon login. If this seems a poor explanation, you can check out the original link for my context and reasoning behind what I'm doing. Any ideas? Details about Distribution: cat /etc/redhat-release tells me: Red Hat Enterprise Linux Client release 5.8 (Tikanga)

    Read the article

  • Supervisord: how to append to $PATH

    - by Prody
    I can't seem to figure out how to append to the default path in a supervisord program config. I can reset the path: environment=PATH="/home/site/environments/master/bin" But when I try: environment=PATH="/home/site/environments/master/bin:$PATH" I see that supervisord doesn't evaluate $PATH. Google wasn't a big help on this for some reason, I cannot believe I'm the first person to need this. Supervisord must have support for this, any idea what it is?

    Read the article

  • where.exe does not find OpenSSL libs when %ProgramFiles% variable is used in the PATH environment variable

    - by Piotr Dobrogost
    I installed both 32bit and 64bit version of OpenSSL libs on Vista x64. The 32bit version was installed in c:\Program Files (x86)\OpenSSL and the 64bit version was installed in c:\Program Files\OpenSSL. Then I added the entry %ProgramFiles%\OpenSSL to the PATH environment variable. %ProgramFiles%\OpenSSL is expanded to c:\Program Files (x86)\OpenSSL for 32bit programs and it's expanded to c:\Program Files\OpenSSL for 64bit programs. The idea is to have 32bit programs use 32bit version of OpenSSL libs and 64bit programs use 64bit version. I wanted to check if this works by running 32bit cmd.exe and issuing where ssleay32.dll and then by running 64bit cmd.exe and issuing the same. However in both cases I get the error INFO: Could not find files for the given pattern(s). What's wrong? This is a follow up to Different PATH environment variable for 32bit and 64bit Windows - is it possible?

    Read the article

  • When using TCP load balancing with HAProxy, does all outbound traffic flow through the LB?

    - by user122875
    I am setting up an app to be hosted using VMs(probably amazon, but that is not set in stone) which will require both HTTP load balancing and load balancing a large number(50k or so if possible) of persistant TCP connections. The amount of data is not all that high, but updates are frequent. Right now I am evaluating load balancers and am a bit confused about the architecture of HAProxy. If I use HAProxy to balance the TCP connections, will all the resulting traffic have to flow through the load balancer? If so, would another solution(such as LVS or even nginx_tcp_proxy_module) be a better fit?

    Read the article

  • Any worker agent monitors for appliance based load balancers?

    - by Zethris
    Looking to find out to what extent an appliance load balancer can monitor servers for both failover (say for example a service like apache tomcat fails) and load balancing? Right now it looks like it's just port monitoring/connection tracking and healthcheck urls that it will heartbeat and detect as down if it doesn't come back with a finished request. We are looking at the Kemp 3500 or Loadbalancer.org solutions. Is there any sort of web application level monitoring/load balancing that these load balancers can offer that can more directly interact with the servers it's balancing?

    Read the article

  • Count the Number of Characters in a Full FIle Path?

    - by Richie086
    I need to be able to count the number of characters in a full path to a file in windows. How I am currently accomplishing this task is as follows: Open a command prompt cd to the directory in question (for example c:\CruiseControl\ProjectArtifacts\ProjectName) type the following command dir /s /b output.csv Open the resulting output.csv file in excel. use the =LEN() function in excel to count the number of characters per row as listed in the output.csv file. Does anyone know of an explorer shell extension, or some 3rd party tool that could preform this function without me having to manipulate the output from dir in excel? Is there some easier way to go about doing this? The root of the issue I am having is the ~260 character file path limit in Windows. I am trying to analyze which paths are approx ~260 characters so I can shorten them to avoid getting this error.

    Read the article

  • How to set up a load/stress test for a web site?

    - by Ryan
    I've been tasked with stress/load testing our company web site out of the blue and know nothing about doing so. Every search I make on google for "how to load test a web site" just comes back with various companies and software to physically do the load testing. For now I'm more interested in how to actually go about setting up a load test like what I should take into account prior to load testing, what pages within my site I should be testing load against and what things I'm going to want to monitor when doing the test. Our web site is on a multi-tier system complete with a separate database server (IIS 7 Web Server, SQL Server 2000 db). I imagine I'd want to monitor both the web server and the database server for testing load however when setting up scenarios to load test the web server I'd have to use pages that query the database to see any load on the database server at the same time. Are web servers and database servers generally tested simultaneously or are they done as separate tests? As you can see I'm pretty clueless as to the whole operation so any incite as to how to go about this would be very helpful. FYI I have been tinkering with Pylot and was able to create and run a scenario against our site but I'm not sure what I should be looking for in the results or if the scenario I created is even a scenario worth measuring for our site. Thanks in advance.

    Read the article

  • Mac OS X: Change $PATH from within python script

    - by Eye of Hell
    I have a bunch of python scripts. One of them installs software (subversion) that requires it's path to be added to $PATH. After it is installed, I want the next script to use the software. If I run export PATH=/opt/subversion/bin:$PATH in bash between the first and second script, all is ok. But if I add os.system( 'export PATH=/opt/subversion/bin:$PATH' ) as the last command of the first script (that installs subversion), $PATH remains unaltered after it exits. Is it any way to change $PATH from within python script so it will remain changed after the script finishes (inside single bash session, of course, I know about /etc/profile).

    Read the article

  • Why can't I access a webserver through a load balancer on my local network?

    - by Karptonite
    When I try to use curl (or wget, lynx, etc) to connect from a server on our local network to our website, which is on a local server behind a CoyotePoint load balancer, curl fails. Ping does not have this problem. When I curl directly to any of the servers behind that load balancer (from and to the same local network), I also have no problem. It doesn't matter whether the local server I'm curling from is behind the load balancer or not. Does anyone have any idea why I can't access my webserver through the load balancer on my local network?

    Read the article

  • How to load with "simplegame" mode after cooking?

    - by Emran Bayati
    i got a problem after i cook my game in Frontend (udk) ! Every thing is ok during the Cook operation i mean i compiled my scripts,it's ok there's no problem in this step,and i cooked my packages it's ok too ! no problem just like last step. so before i package the whole game;i'll lunch it and see if every thing is ok ! but when i load the game it'll load whit the Unreal tournament default game type ! i mean i don't want it to load with this type ! i want it to load with the "simplegame" game type ! i need to say that i set game type to "simplegame" in the Editor from View world Properties Game Type! but still it's loading with Ut game mode when i cook the game ! I just want load my game in "Simplegame" mode after cooked. if any one can help ! plz help ! Tnx Alot Emran Bayati

    Read the article

  • Visual studio: Package 'CcVsiLanService Package' failed to load

    - by Engin Bulanik
    During my compile I had this error string. But the compile finished successfully anyway. Microsoft (R) Visual Studio Version 9.0.30729.1. Copyright (C) Microsoft Corp. All rights reserved. Package 'CcVsiLanService Package' failed to load. Package 'CcVsiLanService Package' failed to load. Package 'CcVsiLanService Package' failed to load. Package 'CcVsiLanService Package' failed to load. Package 'CcVsiLanService Package' failed to load. I googled it but could not find any useful information about CcVsiLanService. Do you have any idea what it is? Why anyone needs it?

    Read the article

  • A* algorithm very slow

    - by Amaranth
    I have an programming a RTS game (I use XNA with C#). The pathfinding is working fine, except that when it has a lot of node to search in, there is a lag period of one or two seconds, it happens mainly when there is no path to the target destination, since it that situation there is more nodes to explore. I have the same problem when the path is shorter but selected more than 3 units (can't take the same path since the selected units can be in different part of the map). private List<NodeInfo> FindPath(Unit u, NodeInfo start, NodeInfo end) { Map map = GameInfo.GetInstance().GameMap; _nearestToTarget = start; start.MoveCost = 0; Vector2 endPosition = map.getTileByPos(end.X, end.Y).Position; //getTileByPos simply gets the tile in a 2D array with the X and Y indexes start.EstimatedRemainingCost = (int)(endPosition - map.getTileByPos(start.X, start.Y).Position).Length(); start.Parent = null; List<NodeInfo> openedNodes = new List<NodeInfo>(); ; List<NodeInfo> closedNodes = new List<NodeInfo>(); Point[] movements = GetMovements(u.UnitType); openedNodes.Add(start); while (!closedNodes.Contains(end) && openedNodes.Count > 0) { //Loop in nodes to find lowest cost NodeInfo currentNode = FindLowestCostOpenedNode(openedNodes); openedNodes.Remove(currentNode); closedNodes.Add(currentNode); Vector2 previousMouvement; if (currentNode.Parent == null) { previousMouvement = ConvertRotationToDirectionVector(u.Rotation); } else { previousMouvement = map.getTileByPos(currentNode.X, currentNode.Y).Position - map.getTileByPos(currentNode.Parent.X, currentNode.Parent.Y).Position; previousMouvement.Normalize(); } //For each neighbor foreach (Point movement in movements) { Point exploredGridPos = new Point(currentNode.X + movement.X, currentNode.Y + movement.Y); //Checks if valid move and checks if not if closed nodes list if (ValidNavigableNode(u.UnitType, new Point(currentNode.X, currentNode.Y), exploredGridPos) && !closedNodes.Contains(_gridMap[exploredGridPos.Y, exploredGridPos.X])) { NodeInfo exploredNode = _gridMap[exploredGridPos.Y, exploredGridPos.X]; Tile.TileType exploredTerrain = map.getTileByPos(exploredGridPos.X, exploredGridPos.Y).TerrainType; if(openedNodes.Contains(exploredNode)) { int newCost = currentNode.MoveCost + GetMoveCost(previousMouvement, movement, exploredTerrain); if (newCost < exploredNode.MoveCost) { exploredNode.Parent = currentNode; exploredNode.MoveCost = newCost; //Find nearest tile to the target (in case doesn't find path to target) //Only compares the node to the current nearest FindNearest(exploredNode); } } else { exploredNode.Parent = currentNode; exploredNode.MoveCost = currentNode.MoveCost + GetMoveCost(previousMouvement, movement, exploredTerrain); Vector2 exploredNodeWorldPos = map.getTileByPos(exploredGridPos.X, exploredGridPos.Y).Position; exploredNode.EstimatedRemainingCost = (int)(endPosition - exploredNodeWorldPos).Length(); //Find nearest tile to the target (in case doesn't find path to target) //Only compares the node to the current nearest FindNearest(exploredNode); openedNodes.Add(exploredNode); } } } } return closedNodes; } After that, I simply check if the end node is contained in the returned nodes. If so, I add the end node and each parent until I reach the start. If not, I add the nearestToTarget and each parent until I reach the start. I added a condition before calling FindPath so that only one unit can call a find path each frame (60 frame per second), but it makes no difference. I thought maybe I could solve this by allowing the find path to run in background while the game continues to run correctly, even if it takes a few frame (it is currently sequential sonce it is called in the update() of the unit if there's a target location but no path), but I don't really know how... I also though about sorting my opened nodes list by cost so I don't have to loop them, but I don't know if that would have an effect on the performance... Would there be other solutions? P.S. In the code, when I get the Move Cost, I check if the unit has to turn to perform the move, and the terrain type, nothing hard to do.

    Read the article

  • Objective-C Moving UIView along a curved path

    - by PruitIgoe
    I'm not sure if I am approaching this the correct way. In my app, when a user touches the screen I capture the point and create an arc from a fixed point to that touch point. I then want to move a UIView along that arc. Here's my code: ViewController.m //method to "shoot" object - KIP_Projectile creates the arc, KIP_Character creates the object I want to move along the arc ... //get arc for trajectory KIP_Projectile* vThisProjectile = [[KIP_Projectile alloc] initWithFrame:CGRectMake(51.0, fatElvisCenterPoint-30.0, touchPoint.x, 60.0)]; vThisProjectile.backgroundColor = [UIColor clearColor]; [self.view addSubview:vThisProjectile]; ... KIP_Character* thisChar = [[KIP_Character alloc] initWithFrame:CGRectMake(51, objCenterPoint-5, imgThisChar.size.width, imgThisChar.size.height)]; thisChar.backgroundColor = [UIColor clearColor]; thisChar.charID = charID; thisChar.charType = 2; thisChar.strCharType = @"Projectile"; thisChar.imgMyImage = imgThisChar; thisChar.myArc = vThisProjectile; [thisChar buildImage]; [thisChar traceArc]; in KIP_Projectile I build the arc using this code: - (CGMutablePathRef) createArcPathFromBottomOfRect : (CGRect) rect : (CGFloat) arcHeight { CGRect arcRect = CGRectMake(rect.origin.x, rect.origin.y + rect.size.height - arcHeight, rect.size.width, arcHeight); CGFloat arcRadius = (arcRect.size.height/2) + (pow(arcRect.size.width, 2) / (8*arcRect.size.height)); CGPoint arcCenter = CGPointMake(arcRect.origin.x + arcRect.size.width/2, arcRect.origin.y + arcRadius); CGFloat angle = acos(arcRect.size.width / (2*arcRadius)); CGFloat startAngle = radians(180) + angle; CGFloat endAngle = radians(360) - angle; CGMutablePathRef path = CGPathCreateMutable(); CGPathAddArc(path, NULL, arcCenter.x, arcCenter.y, arcRadius, startAngle, endAngle, 0); return path; } - (void)drawRect:(CGRect)rect { CGContextRef currentContext = UIGraphicsGetCurrentContext(); _myArcPath = [self createArcPathFromBottomOfRect:self.bounds:30.0]; CGContextSetLineWidth(currentContext, 1); CGFloat red[4] = {1.0f, 0.0f, 0.0f, 1.0f}; CGContextSetStrokeColor(currentContext, red); CGContextAddPath(currentContext, _myArcPath); CGContextStrokePath(currentContext); } Works fine. The arc is displayed with a red stroke on the screen. In KIP_Character, which has been passed it's relevant arc, I am using this code but getting no results. - (void) traceArc { CGMutablePathRef myArc = _myArc.myArcPath; // Set up path movement CAKeyframeAnimation *pathAnimation = [CAKeyframeAnimation animationWithKeyPath:@"position"]; pathAnimation.calculationMode = kCAAnimationPaced; pathAnimation.fillMode = kCAFillModeForwards; pathAnimation.removedOnCompletion = NO; pathAnimation.path = myArc; CGPathRelease(myArc); [self.layer addAnimation:pathAnimation forKey:@"savingAnimation"]; } Any help here would be appreciated.

    Read the article

  • How to create a JAX-RS service where the sub-resource @Path doesn't have a leading slash

    - by Matt
    I've created a JAX-RS service (MyService) that has a number of sub resources, each of which is a subclass of MySubResource. The sub resource class being chosen is picked based on the parameters given in the MyService path, for example: @Path("/") @Provides({"text/html", "text/xml"}) public class MyResource { @Path("people/{id}") public MySubResource getPeople(@PathParam("id") String id) { return new MyPeopleSubResource(id); } @Path("places/{id}") public MySubResource getPlaces(@PathParam("id") String id) { return new MyPlacesSubResource(id); } } where MyPlacesSubResource and MyPeopleSubResource are both sub-classes of MySubResource. MySubResource is defined as: public abstract class MySubResource { protected abstract Results getResults(); @GET public Results get() { return getResults(); } @GET @Path("xml") public Response getXml() { return Response.ok(getResults(), MediaType.TEXT_XML_TYPE).build(); } @GET @Path("html") public Response getHtml() { return Response.ok(getResults(), MediaType.TEXT_HTML_TYPE).build(); } } Results is processed by corresponding MessageBodyWriters depending on the mimetype of the response. While this works it results in paths like /people/Bob/html or /people/Bob/xml where what I really want is /people/Bob.html or /people/Bob.xml Does anybody know how to accomplish what I want to do?

    Read the article

  • Algorithm: Determine shape of two sectors delineated by an arbitrary path, and then fill one.

    - by Arseniy Banayev
    NOTE: This is a challenging problem for anybody who likes logic problems, etc. Consider a rectangular two-dimensional grid of height H and width W. Every space on the grid has a value, either 0 1 or 2. Initially, every space on the grid is a 0, except for the spaces along each of the four edges, which are initially a 2. Then consider an arbitrary path of adjacent (horizontally or vertically) grid spaces. The path begins on a 2 and ends on a different 2. Every space along the path is a 1. The path divides the grid into two "sectors" of 0 spaces. There is an object that rests on an unspecified 0 space. The "sector" that does NOT contain the object must be filled completely with 2. Define an algorithm that determines the spaces that must become 2 from 0, given an array (list) of values (0, 1, or 2) that correspond to the values in the grid, going from top to bottom and then from left to right. In other words, the element at index 0 in the array contains the value of the top-left space in the grid (initially a 2). The element at index 1 contains the value of the space in the grid that is in the left column, second from the top, and so forth. The element at index H contains the value of the space in the grid that is in the top row but second from the left, and so forth. Once the algorithm finishes and the empty "sector" is filled completely with 2s, the SAME algorithm must be sufficient to do the same process again. The second (and on) time, the path is still drawn from a 2 to a different 2, across spaces of 0, but the "grid" is smaller because the 2s that are surrounded by other 2s cannot be touched by the path (since the path is along spaces of 0). I thank whomever is able to figure this out for me, very very much. This does not have to be in a particular programming language; in fact, pseudo-code or just English is sufficient. Thanks again! If you have any questions, just leave a comment and I'll specify what needs to be specified.

    Read the article

  • Linux disk IO load breakdown, by filesystem path and/or process?

    - by Ryan B. Lynch
    Does anyone have experience with a tool that can provide an indication of disk IO load by filesystem path. I use to 'iostat' utility, frequently, to learn how much disk activity is taking place on a Linux host. 'iostat' provides a per-device breakdown, so you can see activity on a particular block device. But it doesn't go any deeper than that--you can't, for instance, query the write load generated by 'httpd' in the directory '/var/log/httpd/'.

    Read the article

  • How is ~/bin added to my path?

    - by Hari Sundararajan
    I have not added ~/bin to any of my .bash* files. However, $PATH does list that directory. The reason I am asking this in the Ubuntu specific StackExchange is because, well, I have exactly the same .bashrc, .bash_profile and .bash_aliases in both Fedora and Ubuntu machines (in fact, I have them on Dropbox and symlinked in ~) and in my Fedora machines, ~/bin is not added. In other words, if I add ~/bin to my path by making an entry in .bashrc, it shows up once on Fedora and twice on Ubuntu. Where is ~/bin being added to my path?

    Read the article

  • What is the path to JavaScript mastery?

    - by Eric Wilson
    I know how we start with JavaScript, we cut-and-paste a snippit to gain a little client-side functionality or validation. But if you follow this path in trying to implement rich interactive behavior, it doesn't take long before you realize that you are creating a Big Ball Of Mud. So what is the path towards expertise in programming the interaction layer? What books, tutorials, exercises, and processes contribute towards the ability to program robust, maintainable JavaScript? We all know that practice is important in any endeavor, but I'm looking for a path similar to the answer here: http://stackoverflow.com/questions/2573135/

    Read the article

  • Auto load a specific link at various time intervals

    - by user228837
    Here's what I need to do. I'm using Google Chrome. I have page that auto-reloads every 5 seconds using a script: javascript: timeout=prompt("Set timeout [s]"); current=location.href; if(timeout>0) setTimeout('reload()',1000*timeout); else location.replace(current); function reload() { setTimeout('reload()',1000*timeout); fr4me='<frameset cols=\'*\'>\n<frame src=\''+current+'\'/>'; fr4me+='</frameset>'; with(document){write(fr4me);void(close())}; } I found that script by Googling. The reason why the page auto-reloads every 5 seconds is I'm waiting for a specific link or url to appear in the page. It appears at random times. Once I see the link I'm waiting for, I immediately click the link. That's fine. But I want more. What I want is the page will auto-reload and I want it to auto-detect the the link I'm waiting for. Once the script finds the link I'm waiting for, it automatically loads that link on a new tab or page. For example, I'm auto-reloading www.example.com. I'm waiting for a specific url "BUY NOW". When the page auto-reloads, it checks if there's a url "BUY NOW". If it sees one, it should automatically open that link. Thanks.

    Read the article

  • load testing of "cookieless Session" asp.net

    - by anshu
    I have been trying using MS VSTS 2008, no luck so far.. After the redirection from server to accomodate the sessionID in URL, the test fails during the first time recording. I am open to looking at other tools which are not very expensive. Does anyone have any experience using any tool for testing cookieless sessionID website?

    Read the article

  • php csv high load request

    - by msaif
    i have PHP serve and one csv file . i need to read csv file and send the data to the browser. if individual request = 10,000 or more (may be) then reading csv file from harddisk may be costly.how can i efficiently read csv file from PHP and send the data to the browser. there is no option to read data form relational db. only browser<-------------PHP(apache)<----------------CSV flow pattern.

    Read the article

  • load Javascript object from file

    - by megapool020
    Hi there, I asked a question in this thread Stackoverflow, and it works perfect. So tnx to all the users who gave me a reply. But now I have a other question. I would like to have the object in a seperate file, so I only need to update the file in stead of the JS file (otherwise it will be very big). I'm using JQUERY. I now looks like this (with all the info in the JS file). IBANInfo is used to fill a selectbox var IBANInfo = { "ccAL":{ countryCode:"AL", countryName:"Albani&euml;", IBANlength:"28", bankFormCode:"0 8n 0 ", accountNum:"0 16 0 " }, "ccAD":{ countryCode:"AD", countryName:"Andorra", IBANlength:"24", bankFormCode:"0 4n 4n", accountNum:"0 12 0 " }, "ccBE":{ countryCode:"BE", countryName:"Belgi&euml;", IBANlength:"16", bankFormCode:"0 3n 0 ", accountNum:"0 7n 2n" } }; //---- then this function is used to build the selectList function createSelect(){ var selectList = ''; var key; selectList += "<option value=''>Kies een land</option>\n"; for (key in IBANInfo) { if (IBANInfo.hasOwnProperty(key)) { var countryInfo = IBANInfo[key]; selectList += "<option value='"+countryInfo.countryCode+"'>"+countryInfo.countryName+"</option>\n"; } } $('#selectBox').html(selectList); } I thought I could do it like this, but I get the message undefined in my selectbox. var IBANInfo = $.get('include/countryCodes.txt'); // also tried var IBANInfo = $.getJSON('include/countryCodes.txt'); //---- then this function is used to build the selectList function createSelect(){ var selectList = ''; var key; selectList += "<option value=''>Kies een land</option>\n"; for (key in IBANInfo) { if (IBANInfo.hasOwnProperty(key)) { var countryInfo = IBANInfo[key]; selectList += "<option value='"+countryInfo.countryCode+"'>"+countryInfo.countryName+"</option>\n"; } } $('#selectBox').html(selectList); } /* the countryCodes.txt file is like this: { "ccAL":{ countryCode:"AL", countryName:"Albani&euml;", IBANlength:"28", bankFormCode:"0 8n 0 ", accountNum:"0 16 0 " }, "ccAD":{ countryCode:"AD", countryName:"Andorra", IBANlength:"24", bankFormCode:"0 4n 4n", accountNum:"0 12 0 " }, "ccBE":{ countryCode:"BE", countryName:"Belgi&euml;", IBANlength:"16", bankFormCode:"0 3n 0 ", accountNum:"0 7n 2n" } } */ What am I doing wrong. Tnx in advance

    Read the article

  • Dynamically load Jquery into .js page

    - by RussP
    Please excuse me if I'm simple here, I want to create a simple widget that people can access from their websites - e.g by copy/past something like <script language="javascript" src="test2.js"></script> <div id="test"></div> anywhere in their web pages. where is dynamically filled via Jquery and the functions in/on test2.js. I can do it if JQuery is actually "printed" on the page of test2.js, but I cannot get any JQuery functions to work if I try to include/call JQuery dynamically. How do you call JQuery via javascript and then get it to work with the functions on the page? And/Or is there an easy way to add the <div id="test"></div> dynamically aswell? Sure I can body.append etc. but that only adds at the bottom of the page. Is there a way to .append in the position where the script include <script language="javascript" src="test2.js"></script> is actually placed? Hope I make sence.

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >