javascript

In an asp.net project, how can I submit javascript objects?

I have an array of javascript objects and I want to press a submit button and 'send' them much like I can access a textbox or listbox's members - ie. the page posts back and I can put some code in the button's submit method. Is there a way of doing this? Or do I have to put them into a control? ...

Loop through table using jQuery, update specific cell in a row with a checked Checkbox

I just can't work this one out. I have a table with a column of checkboxes. After an Ajax update, I want to update a specific cell in the rows with checked checkedboxes. The jQuery Ajax call I'm using is: $.ajax({ type: 'POST', url: 'ProcessDate', data: params, error: function(xhr, ajaxOptions, thrownE...

Split a string into an array of paired numbers

I am trying to work out how to split the following hexadecimal string into an array of paired numbers. At the moment i have the following: function getRGB(hexVal) { var substrHexVal = hexVal.substring(1,hexVal.length); var splitHexVal = substrHexVal.split(""); return splitHexVal; } var a = getRGB("#00FF00"); a; Whic...

XHTML JavaScript preload images before rest of page is loaded

Hello! Is there anyway I can delay the display of the HTML code (page) until some certain images are loaded so that the layout appears with the header images as well as the HTML? Thank you. ...

Bookmarklet not working as it should (i think)

Can someone tell me what I am doing wrong here... This returns "Button Not Found" javascript:var nam="http://apps.facebook.com/onthefarm/giftaccept.php?senderId=547766125&gift=haitibackpack_item_single&timestamp=1285776944&ref=gift_accept_tab&key=6870697de39960508737349c7a3f1363%24%24ggM3T%2CPU2YKM2l0mNr...

Access request object in JavaScript

I have a form in jsp. I have to populate it based on the request object (from the servlet). How do i use Java Script for accessing request object attributes or if you can suggest me any other better way to populate form dynamically? ...

Display json as Error nicely

Hey all I am doing validation server side, If fails I am passing back json data with the errors. I'm not worried about displaying the errors on page but happy with just a simple alert(). How can I display the errors nicely while using a $each function with jquery. Here is some json data. {"error":["The Firstname field is required.",...

Base64 encode and image in Adobe Air

Hi there I am writing an adobe air app in html/javascript and I am trying to base64 encode an image so I can add it to and XML RPC request. I have tried many methods and nothing seems to work. I see that actionscript has a Base64Encoder class that look like it would work, is there any way to utilize this in javascript? Thanks, Jordan...

Creating a customized "Yes / No" alert box in asp.net (javascript) - Part 2

I am trying to create a customized messagebox using javascript but not getting too far. string txtConfirmMessage = "On " + DateTime.Now + ", "; txtConfirmMessage = txtConfirmMessage + sUserID; txtConfirmMessage = txtConfirmMessage + " added this record. Do you want to continue? "; btnSubmit.OnClientClick = @"return confi...

I have function, f1, and I want to fire a call back when f1 is complete, how to do this?

How can I create a function, that will call another function, and when it completes, fire another callback function? so existing functions are: function f1(..) {..} function myCallback() {...} Now is it possible to make f1 fire and finish, THEN run myCallback()? ...

illustrator map to imagemap automatically? or is there a better way?

i have a vector illustrator file with all the counties of california as distinct paths. i need to have these counties be links to other pages online. is there a way to automatically generate an html imagemap from this file? illustrator provides an export as jpg function that has options for polygonal imagemap shapes, but it isnt working....

Passing a var from one Extended function to another

I am having trouble passing the url of $.PhotoUpdater.doUpdate(url) to do the doUpdate function. Firefox returns this error : useless setTimeout call (missing quotes around argument?) [Break on this error] timer = setTimeout($.PhotoUpdater.doUpdate(url), 5000) my code: $.extend({ PhotoUpdater: { startUpdate: function(organi...

HTTP Doctype header issue causes problems in IE7?

We've built a javascript based widget that our client has embedded in their website. They claim it doesn't work on their site in IE7, and that the problem is the difference in doctype headers at the top of their pages: Ours: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transiti...

Form with xml or excel data dropdowns?

Hi, I want to create a form (flash or java/ajax) that allows selection data to be pulled from an xml file. Example: A ring builder application - the user selects the ring setting in one dropdown and then they select a diamond in another drop down. But the prices of the diamonds changes every day based upon the market, so we would need...

Google Maps V2 epoly2 by Mike How to get states xml

I am curious about http://econym.org.uk/gmap/states.xml how did he generate the states i would like to generate it for Canada... but cant figure out where on google he found that xml or how he generated it.. any ideas? ...

websockets & VPN

I understand that websocket is still being worked on. Now, I don't know if what I'm considering is even technically possible but I'm just bouncing off ideas. What I'm thinking of is a client less SSL VPN using websockets. Is it possible to create a websocket & redirect all the traffic from the browser (on that particular site/domain) t...

Ajax Array Display Control - Pagination

I have an area which gets populated with about 100 records from a php mysql query. Need to add ajax pagination meaning to load 10 records first, then on user click to let's say "+" character it populates the next 20. So the area instead of displaying all at once will display 20, then on click, then next 20, the next... and so on with n...

when viewing a page in firebug, can I see which event fires when I click a button?

I'm viewing a page, and want to know which event is fired when I click on a button, and I want to trace through the .js files to help me learn what is going on. Is this possible? ...

search treeview help please

Hi All, given a hierarchical view on my asp.net mvc page is it possible to type in the search field and have the treeview dynamically filter out the tree as more letters are typed but leave the root nodes alone (like don't include north,south,east,or west)? Thanks, rod. [TextBox filter goes here] [treeview control below] /* I'm look...

best practises for designing a page with lots of events

So I have a grid on a page that displays tablular data, with a checkbox by each row. So in this situation, when a checkbox is clicked, allot of things will react on the page potentially. Also, if a button is clicked, again allot of things will potentially react on the page. So say if someone checks a checkbox, the row should be highli...