I want to write a HttpHandler that compiles CoffeeScript on-the-fly and sends the resulting javascript. I have tried Ms Jscript and IronJS without success. I don't want to use Rhino because the java dependency would make it too difficult to distribute.
Has anyone compiled CoffeeScript from .NET or have any idea how it could be done?
U...
I'm using the module pattern, one of the things I want to do is dynamically include an external JavaScript file, execute the file, and then use the functions/variables in the file in the return { } of my module.
I can't figure out how to do this easily. Are there any standard ways of performing a pseudo synchronous external script load...
$.ajax({ url: "plugin.js", dataType: 'script', cache: true, success: function() {
alert('loaded');
}});
1) I can't get the script to load, probably due to incorrect path, but how do I determine the correct path? The above code is in init.js, plugin.js is also in the same folder.
2) Can I load multiple plugins at once with the same...
I've got a table of projects in my Rails app, each with a delete link, like so:
<%= link_to "Delete", project, :confirm => "Are you sure?", :method => :delete %>
However, the delete request is sent even if the user clicks "Cancel" on the dialog box.
Any ideas on how to fix this? I'm using Rails 3, Beta 3, with the jQuery library and a...
In css when you want something to be ie only you can comment it out and assign ie. I have a jquery plugin that breaks in IE I don't want it to run in ie but I want it to run in all other browsers. How can I do this?
this worked!
jQuery(function() {
if(jQuery.browser.msie){}
else
{$('.div').corner("round 20px");};
});
...
Hi,
I have dynamically added a Flex Object in a HTML page through JavaScript.
The Flex object is located in a "div" tag.
Now when I call the "removeChild" JavScript function to remove the dynamically added "Object" tag, the object tag gets removed succesfully; however the memory that has increased due to the loading of the Flex Object is...
I'm writing a Firefox extension to allow users to annotate any page with text and/or drawings and then save an image of the page including the annotations. Use cases would be clients reviewing web pages, adding feedback to the page, saving the image of this and emailing it back to the web developer or testers taking annotated screenshots...
I have a requirement where in, I have to parse the dates relative to a date object returned from the server side. But the datejs library always considers only the browsers date object.
The situation is something like this:
The server gives back the date in PST and the browser is in IST. And all the inputs are getting parsed with respect...
I am trying to see the localDatabase version from my iPhone in safari but it is not displaying, according to the docs i am supposed to be able to do this:
var db = openDatabase('dbShortName', '', 'dbLongName', 1000);
alert(db.version);
and it should alert the current version number. It does not. It works in Chrome and safari for the d...
Hi.
I need the remote client name (aka computer name) to save it into a database, I was looking into $_SERVER variables but it doesn't exist. How can I get this just using another PHP's function or even javascript if it is necessary.
...
HTML:
<input id="email" name="email" type=text />
<input id="password name="password" type="password" />
JavaScript:
var fields = ["email","password"];
for (var i in fields) {
var field = $("#"+fields[i]);
field.bind({
focus: function() {
field.css("border-color","#f00");
},
blur: function(...
Hi,
I have the following:
[list]
[*] test
[*] test
[*] test
[/list]
and I would like to create a regular expression that turns that into:
<ul>
<li>test</li>
<li>test</li>
<li>test</li>
</ul>
I know regex enough to replace simple tags, but in this case I need to replace li tags only if they are contained inside ul. Is there a way t...
i want to get non formated text from fckedittor
i want the plain text as entrterd by the user not the encoded
...
I am developing a ff extension which displays a list of elements from an array (dynamic) in the sidebar. The array is dynamic and needs to be constructed in a function everytime the sidebar is opened (or any other event handler). Later, i will need to implement link functionality on parts of the string.
What is the best way to go about t...
Hi
I have a check box when check that check box the id corresponding to the check box is placed on a text box ... but when there is only single value in the database i cant get the check value why?
here is my code
<? if(isset($AcceptFriend)) {?>
<form action="<?=site_url()?>friends/Accept_Friend" name="orderform" id="orderform" ...
So what I want to do is load only a section of one webpage onto another page. So I want to grab the content of a page (stuff inbetween a div with a certain id) without the headers and footers. I know I've seen this before but its, stangly, a hard thing to find.
Anyone kind enough to point me in the right direction?
thank you
...
Dear All,
I'm looking to browser based map solution like google interactive chart map. I googled and i looked to smilar solution, but i didn't find good solution for it. It should be possible to created on flash, silverlight, ajax etc.
And should be change parameters easyly via javascript or sth. But i didn't like google chart beacu...
I want a login page in which if any user types invalid password or username after clicking submit button, then the user will be displayed an error message on the same page.
What should I have to make this requirement enable? Is this possible with ajax or javascript?
...
How do i introduce validation before remote_form_for submits?
I have javascript function called validateForm(). I am able to call it before the AJAX request process. I tried to use return false and event.preventDefault. But there seems to be no effect. Here is what my code looks like
<% remote_form_for :customer, :update =>"uxScreenLoa...
I am having trouble sorting an array that includes undefined elements (a sparse array) in IE7. This works great in Safari and Firefox of course, and I haven't tried other versions of IE, but here is a simple example.
<html>
<head>
<script type="text/javascript">
function runscript() {
var myArray = [{id: 2},
...