x = "abcdefg"
x = x.match(/ab(?:cd)ef/)
shouldn't x be abef? it is not, it is actually abcdef
Why is it that my ?: not having any effect? (of course my understanding could very well be wrong)
...
I basically want to be able to:
Write a few functions in python (with the minimum amount of extra meta data)
Turn these functions into a web service (with the minimum of effort / boiler plate)
Automatically generate some javascript functions / objects for rpc (this should prevent me from doing as many stupid things as possible like mis...
I am trying to create wrapper functions on facebook javascript connect api methods.
My problem is that i can not return a value within the facebook api FB_RequireFeatures method.
i want my isFBConnected() function to return true or false based on if i'm logged into facebook or not.
What is happening is that when i return true it retur...
Hi,
I am having problem getting my tooltip to work when using the jQuery load() function. The tooltip works fine if i don't use load() to load external dynamic data.
I googled and found the i may need to use live(), but I can't figure how to get it to work. Any suggestion?
thank you!!
Here is my scripts:
function loadEMERContent(ui...
I am using ASP.Net and jQuery/jQuery UI and I am trying to use the datepicker control. It works fine on every page, except when I have to use the popup (to add new data into the database and then i refresh the current page to reflect the new data being entered). It seems that document.ready() is failing when I use the popup. I can invoke...
We have this anonymous function in our code, which is part of the jQuery's Ajax object parameters and which uses some variables from the function it is called from.
this.invoke = function(method, data, callback, error, bare) {
$.ajax({
success: function(res) {
if (!callback) return;
var result = ""...
In an article on yuiblog Douglas Crockford says that the for in statement will iterate over the methods of an object. Why does the following code not produce ["a", "b", "c", "d", "toString"]? Aren't .toString() and other methods members of my_obj?
Object.prototype.toString = function(){return 'abc'}
Object.prototype.d = 4;
my_obj = {...
We have a very long form that has a number of fields and 2 different submit buttons. When a user clicks the 1st submit button ("Photo Search") the form should POST and our script will do a search for matching photos based on what the user entered in the text input ("photo_search_text") next to the 1st submit button and reload the entire ...
I have a custom jquery function that I need to bind to two iframe document objects.
Currently it will work with just one doing something like:
$(window.frames["iframeName"].document).bind('textselect', function(e) {
});
what I'm looking to do is something like:
$(window.frames["iframeName"].document,window.frames["iframeName2"].d...
This is a bit hard for me to articulate, but in PHP you can say something like:
$myArray['someindex'] = "my string";
and if there is no index named that, it will create/assign the value, and if there IS an index, it will overwrite the existing value.
Compare this to Javascript where today I had to do checks like so:
if (!myObject[key...
Is there a jQuery method or workaround that someone has found that will not let the user type anything but dd/mm/yyyy in a textbox ?
Thanks
...
Does the jQuery $.ajaxSetup method not respect the data field in the options hash when $.post or $.get is called?
For example, I might have this code:
$.ajaxSetup({ data: { persist: true } });
Then, to send a POST request, I would call this:
$.post("/create/something", { name: "foo" });
I was expecting the actual POST data to look...
I have a asp htmleditor where the user will enter any text or a message...is there any javascript to save the message every 5 seconds as drafts in vb.net .
...
How would you go about Restricting Keyboard Input on a textbox using Jquery?
...
I am getting values from a database and displaying in a table. Im trying to print the results as individual .
Im using the below javascript
<script type="text/javascript">
function print_parent(element)
{
element.parentNode.className = 'print';
window.print();
element.parentNode.className = '';
return false;
}
</script>
The p...
HI all,
Firebug is not displaying Complete js file to debug. I m unable to place break points at particular line in js file, half of the file content is display, half of file content is not displaying. please help me what to do to place break points at particular line which can visible line.that js file is gwt compiler generated file.
...
I just want a java script program to handle http post request
...
In the code below, how to get the values of multiselect box in function val() using jquery or javascript.
<script>
function val()
{
//Get values of mutliselect drop down box
}
$(document).ready(function() {
var flag=0;
$('#emp').change(function() {
var sub=$("OPTION:selected", this).val()
if(flag == 1) $('#new_...
I have a class which uses JSNI to retrieve JSON data stored in the host page:
protected native JsArray<JsonModel> getModels() /*-{
return $wnd.jsonData;
}-*/;
This method is called, and the data is then translated and process in a different method. How should I unit test this class, since I'm not able to instantiate (or seemingly ...
I'd like to set up a drag'n'drop list inside a modal window. The window's content is loaded via an AJAX call, so I believe I need to use jQuery's .live() method.
Here is my current code:
$('#cboxLoadedContent').live('load', function() {
// Event for sortable page lists
$('ul#pageList').sortable();
});
How can I set up binding...