load

How do you make jQuery bind events to elements loaded via Ajax?

I'm using the .load() function to load a section of html that has some jQuery functionality that is bound to a certain class. =/ thoughts? ...

Javascript image load: get error status

Hi, I am loading a image trough javascript: myimage.src = "/mycontroller/mymethod"; myimage.alt = "image"; myimage.onload = function(){ $('body').append(myimage); }; But, somethimes my controller method should return an error, with the http status 500. So, the content-type will not be "image/png" anymore. Will be text. There's...

How to execute assembly code when application starts

I know this question is similar to several previous ones, but I can't find an exact answer. I have an application framework that, amongst other things, handles unhandled errors. At the moment I require that the host application calls a Register method in the application's Main method to register the handlers and various sub-systems. I...

WCF - reading an xml file in a service using XElement.Load

Hi folks, i have a simple xml file in a wcf service that i am trying to load using Xelement.Load("sample.xml") which is not reading the file. What's the right way of doing this? The service is supposed to return an xml to an asp.net application. TIA ...

jQuery - how to repeat a function within itself to include nested files

I'm not sure what to call this question, since it involves a variety of things, but we'll start with the first issue... I've been trying to write a simple to use jQuery for includes (similar to php or ssi) on static html sites. Whenever it finds div.jqinclude it gets attr('title') (which is my external html file), then uses load() to i...

Jquery .load and subdomains

I am trying to load a file (http://domain.com/v2/inc/review.php) from a subdomain (http://resort.domain.com) using jquery. Although I use the full location it refuses to load. Does anyone know how to get it to work? $("#resort").load("http://domain.com/v2/inc/review.php"); ...

Js constants with variables inside.

I know I'm able to this in PHP, but I can't remember the name or the way to do it, so I'll just explain what it is, and when someone tells me how it's called I'll update this question. I have some error messages defined as constants on javascript, however, some of those messages need to contain dynamic part as in the following example. ...

What could cause these Apache crash errors ?

Hello guys. I had a server crash several days ago. I use Cacti to keep stats: at the time when the server crashed, a huge spike from Load 1 to Load 200 occurred, with over 800 processes in the run queue ( from 300 average). Upon checking /var/log/httpd I notice this: * glibc detected /usr/sbin/httpd: double free or corruption (out)...

What is a good program to test server load with X number of users?

I have a PHP web application, and I want to test out the load when 100+ users are connected at the same time. Is there a program out there that would allow 100+ virtual users to hit my webpage? I did find one, but it was $3000. I don't mind paying, but not quite that much. ...

How to determine cpu, ram needed for rails app?

What is the most accurate way to determine the amount of cpu speed and ram needed to run my rails app? I believe there are stress testing tools like Tsung, but how do I determine, for example, that I need X more ram, or X more CPU? I would like to find some way to roughly gauge the performance needs of my application so I can anticipat...

Should I typecast in PHP when defining my vars?

I am sorry if this is more of a theory question then a real life problem but it is a real life situation for me. We were commenting on the way PHP works with vars and how memory heavy it is on the server due to its "mixed vars" and something occured to me - why not typecast right from the start? So I guess my quesion is: Whould it make ...

jquery load based on href

Hi, I am having a link <a id="test" href="text.php">test</a> I have the following jquery code $("#test").live("click", function(){ $("#myDiv").load($("#text").attr("href")); }); trying to load the href of #test inside myDiv. But of course when click, start .load the href ...

IIS6, ASP.NET MVC 1 and random slowdowns

I've recently deployed a MVC application to an IIS6 web server. One strange behaviour I've been having is the load times will randomly blow up to 30sec+ and then return to normal. Our tests have shown this occurring on multiple connections at the same time. Once the wait has passed, the site become responsive again. It's completely rando...

Elements added later All images and text loaded to function. (jQuery or Javascript)

#clickArea click to #contents prepend #loadingText(Loading...) and #contents append HTML-source. If append HTML-source(All images and text) Load complete to #loadingText(Loading...) is fadeOut. The code that it is the best in this case? HTML <div id="contents"> <p id="clickArea">Click</p> </div> JavaScript(jQuery) $('p#clickArea...

jquery load and tinymce gives me a "g.win.document is null" on subsequent loads

So... very excited as first post on stackoverflow I have this page, clicking a button will call editIEPProgram(). editIEPProgram counts how many specific divs exists, adds another div, loads it with html from '/content/mentoring/iep_program.php' and then calls $("textarea.tinymce").tinymce to add a rich text editor to the newly added te...

Octave: importing a large matrix in csv format

I'm trying to import a matrix (about 80.000 rows) from a csv file to Octave. The obvious solution seems something like: load("-ascii","relative_directory/the_file.csv") or maybe renaming the file and trying: load("-ascii", "relative_directory/the_file.txt") Yet I keep getting the error: load: failed to read matrix from file "...

use Jquery load to load content in adiv?

simply i'm doing a test i have a div called test and mvc action in the client controler the view and the controler public string testout() { return DateTime.Now.ToString(); } and i'm using jquery to update the div $("#B1").live("click", function() { $("#test").load("/client/...

jQuery flicker using .load

Hey guys, I'm using jQuery to dynamically load php pages into my page using the .load() function, so far this has been successful but if you click on various links to update the div with the .load() it starts to flicker between the new clicked page and the old one, this is pretty annoying and has anyone got a fix? Current code: $(docu...

weird problem with load () or live () !!

I load a page with load () and then I create dinamically a tag. Then I use live() to bind a click event and fires a function. At the end a call unload (). The problem is that when I load the same page again ( without refresh ) when on click the function will be fired twice. If I exit again (again with unload ()) and load the page aga...

Cannot select/edit TineMCE-generated table

I'm currently using TinyMCE edit in my drupal-website, problem is that beneath the editor, some of the table is sticking out. If I remove the height set by javascript with firebug, it looks fine, even after resizing. So I want to remove the height with JS, I've put this function at the end of my page: $('table#edit-body_tbl').removeAt...