javascript

Do I need to use javascript to get fluid width columns and static width columns to share the same row?

I have a variable number of divs acting as columns, and I would like a variable number of them to have static widths (in pixels) and a variable number of them to expand to the remaining width in the window. If I make the fluid column widths combine to 100%, some columns will be squeezed out of the row - do I need to use javascript to sub...

How to show a progress report to the user in Google Apps Script?

I have a simple script that will send out a bunch of emails but these take time to send and I want to show the user a scrolling window with the emails addresses as they are sent (or, a progress bar would be good too). I believe this is possible with the new User Interface Classes, but I can't get it to work. The documentation is kinda sp...

Getting json response into a javascript array

Hi all, If I have the following function that iterates through a json response object (val2): function test(val2){ jQuery.each(val2.maps, function(j, val3) { maps = new Array({ id: val2.maps[j].id, parent: val2.maps[j].parent, image: val2.maps[j].image, data: val2.maps[j...

Form Builder with JQuery Validation

Im looking for a really good form builder like http://jotform.com but one that uses JQuery for validation. The things I like is the really easy drag and drop and the speed at which forms can be created and then I can grab the code and put it on a site. Jotform uses Prototype and it conflicts with JQuery. Is there one avaliable? ...

Javascript Regex - Camel to File Case

Anyone have a regex in javascript for converting: someCamelCase into some-file-case or SomeCamelCase into some-file-case ?? If so, that would be very helpful. Thanks. ...

set value of input that do not allow it to be changed

I have the following text box input code. I do not have access to it to add the default value to it so i used this Jquery code to add the value and then disable the input but it doesn't send the added value. How would I add the value but not allow them to change it. I was going to use "hidden" but I want them to see it just not able to c...

Can I use the Facebook API to fetch images off my profile?

I have a blog. I want to add a bit of Javascript on my blog to fetch images from my Facebook profile and display them on the blog. I have zero experience with the Facebook API, so at this point I'm just wondering whether this is possible. Can I run some Javascript on my blog to fetch images from my Facebook profile? Or does the Facebook...

Prime examples of data-binding

I am implementing a barebones framework in JavaScript that just provides data-binding between objects. The data-binding can either be one-way or two-way, and potentially have multiple objects bound on some property. There are several data-binding solutions available for various languages and I am trying to get a good idea of the best of ...

jQuery animate expand proportionally

I'm now in problem about how to animate function in jQuery to expand proportionally. Normally, it expand one-sided only just like expand to bottom or expand to right. What I want is to expand proportionally left-right-top-bottom by using animate. Following is my coding. What I said above, it expand to bottom only. $(document).ready(...

Detect if popup is closed in Javascript

when user clicks an asp button, the onClientClick calls a javascript function to open a popup. I am using IE8. User fills in some form data in the popup. var mywin; function popup(url) { if (mywin==null || mywin.closed) { mywin=window.open(url,--rest of parameters); } else { mywin.focus(); } mywin=window.open(url..) is called ever...

When first time enter the arrangement of items is OK, but if I refresh it it will screw up

Please refer to * When first time enter the arrangement of items is OK(three items as a row), but if I refresh it it will screw up Can someone point me any direction ? Thanks in advance ! Edit: Is there any differences between refresh and using the link to enter ? Edit: This problem only happen in Chrome browser ...

Can you pass an array from javascript to asp.net mvc controller action without using a form?

I know that if I have a form with multiple elements with the same name I can use this to bind to an array, but is there any way to pass an array from a javascript function to an ASP.NET MVC controller action without using a form? ...

Caching / moving markup in the DOM for reuse

Bit of a weird one - bound to see some head scratching and wrinkled noses on here. Currently developing this scrollable timeline that has users incrementally loading new modules of HTML via AJAX as they pan / scroll, so before long they can end up with quite a bit of markup on the page. As they "zoom" though (i.e. shift the scale of the...

Facebook like comment delete -Update Datalist after item delete

Hello guys, I have a DataList containing a list of elements(ASP.Net app). To delete an item i first used tha classic javascript confirmation. As i found it ugly,i want to use a confirmation box plugin. when i click OK==>Delete the item from DB(using a webservice) But how can i update the DataList. The situation is liek: when u add...

javascript dynamic regex vs hard typed and captures

I've been at this for hours -- I think I need sleep... but no matter how I alter the expression javascript will only capture the 1st and 3rd elements: var number = 09416; var mat = "([0-9]+/[0-9]+/[0-9]+\\s+[0-9]+:[0-9]+)\\s+([A-Z]+)\\s+[0-9,]+\\s+(.*?"+number+".+)"; // month / day / year hour : min AMPM byte...

Showing gif using jquery in IE

Right now I'm getting this strange behavior from IE where it's not showing my animated gif. I'm trying to show a loading gif during an AJAX request. function changeToRecorded(){ $('#entries').fadeOut(200,function(){ $('#main').html('<img id="loadingGif" class="centered" src="./pictures/ajax-loader.gif"; />'); $.get("getData.p...

Django, Javascript, JSON and Unicode

I have a frustrating problem. I have a Django web app. The model contains various CharField columns. When I convert these strings into JSON using json.dumps, the strings come out as Unicode like this: "{'field': u'value'}" and so forth. However, I need to pass this to Javascript, and the jQuery parser croaks on this format. What I am ...

How to add the marker on google map?

We're trying to implement the similar to google maps "my maps" behaviour with some customization. The problem we're struggling against is to put the marker on the map in the similar manner as google does. Thats the procedure is the following one should click on the "add new marker icon" then drag it until the point of interest with ...

Javascript: Declare variables from RegEx, write to cookie.

This question has two parts. First, I need to isolate two strings of text inside a span with the class "test01". Here is what the span looks like: <span class="test01"> <table width="100%" cellspacing="0" cellpadding="0"> <tbody><tr><td> <div id="ctl00_ctl07_pnTopBar"> <a href="/Member/MyHome.aspx">My Account</a>&nbsp;&nbsp;<a ...

Google Maps v3: Cannot access global variables

Not sure what framework (if any) Google Maps v3 is built on top of but I'm having issues trying to access global variables within the following function. var geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': google_addresses_array[i][1] }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) ...