javascript

Another ASP.net AJAX SYS Undefined Error

Im at my wits end here. I have an ASP.net 2.0 Web Project Developed in VS 2008. The problem occurs on my dev XP system and our Windows 2000 and 2008 servers. The project uses AJAX 1 and references System.Web.Extensions 1.0.61025.0 and AJAXControlTookKit 1.0.10618.0. I am trying to use the ScriptManager and maybe the ToolKitScriptManage...

Can I use ASP.NET 2.0 to create a picture scroller?

I am trying to create a picture scroller. In it, I would have a large picture and several thumbnails at the bottom. If a user haover or clicks the thumbnail, it then is displayed in te large box. My plan was to create this in ASP.NET but now I'm drawling a blank on how to implement this? I know ASP.NET and some JavaScript. Any opinions o...

Is there a good javascript WYSIWYG tool that uses absolute positioning?

I'm building a site where users (with no knowledge of html/css) will custom-design simple static HTML pages. Years ago, I used a CMS that used absolute positioning with drag and drop for designing static pages, and it was a fantastically easy UI for anyone to grasp. I'm wondering if there's a javascript solution for this that I could i...

window.opener & facebox

Hi. I opened a window in facebox. Now, I want to send some data to the opening window when the facebox window closes. I know how to do this with a normal pop-up but not with facebox and there doesn't seem to be much in the way of good documentation here. Any idea how to do this? ...

Firefox XMLHttpRequest sets error flag on a 302 response

I have a web app driven by a servlet that times out users' sessions after a period of inactivity by redirecting to a login page. I had code in place on the web client that checked for this, essentially similar to the following: function error(request, errtype) { if (request.status == 302) { // Display a "timed out" dialog, ...

what to do if my users have ie6

i have built a beautiful website that works very fast in all of the latest browsers but many of the users are forced to use ie6. If i can't get around this problem. Is there anything to do to optimize some of the inefficiencies of ie6 when building my site to lessen the pain.? its an asp.net mvc site with heavy use of jquery. ...

Why isn't my switch block (switching on $(e.target) .attr("class")) working?

I am trying to figure out why this code doesn't work.. All i want is to have simple event delegation to assign one event listener. it only alerts, it doesn't animate. Please let me know whats wrong here: $(document).ready(function() { var img = $("img"); $("span").click(function(e){ var targetClicked = $(e.target).attr('class');...

last day of the month

Hey All, How can obtain the last day of the month with the timestamp being 11:59:59 PM? Thanks, rodchar ...

Dynamically replace html tags

I'm trying to replace some html tags which are being generated by ajax script. Ajax script generates the following ul list: <ul> <li class="odd">some text</li> <li class="even">some text</li> <li class="odd"><hr /></li> <li class="even">some text</li> </ul> I need to replace <li class="odd"><hr /></li> with </ul><hr /><ul>. I ...

XML/SWF charts example not working with cherryPy

I am trying to use use the XML/SWF Charts library with cherrypy. I want to generate html reports with nice looking charts. I am trying to expose one of the default examples of XML/SWF charts with cherryPy, but for some reason the javascript is not working properly with cherryPy. I created the following python script: import os.path i...

Javascript: What is the preferred design for nested (inner) types?

I use Resig's makeClass() approach for constructors: // makeClass - By John Resig (MIT Licensed) // Allows either new User() or User() to be employed for construction. function makeClass(){ return function(args){ if ( this instanceof arguments.callee ) { if ( typeof this.init == "function" ) this.init.apply( this...

IE8 Json problem

I'm facing very strange issue, I'm getting JSON object from django powered site and excuting it using eval(). It works on all the other browsers except all versions of IE. in IE, I am getting "variable_name" is null or not an object. I've tried everything I could but so far no luck. here is my json object var results = {"result":[ { ...

javascript accessing name value pairs

I'm getting JSON name/value pairs that looks like this: { "Name":"parentid", "Value":"blah" }, { "Name":"siteid", "Value":"blah" }, { "Name":"sitename", "Value":"blah" } But I would like to access the "name" value as the KEY, and ...

Detecting two consecutive carriage returns at the end of the string.

Is there a way to detect if there are 2 consecutive carriage returns in a string ontained from a textarea or multiline text box? Here is the scenario: In a text area, user enters ABCD "Enter" EFGHI "Enter" JKLMNOP "Enter" "Enter". After the this I need to force click event of the button - not form.submit. Here is the default.aspx page:...

Updating one select box based on another (Ruby on Rails)

Hello, I'm new to Ruby on Rails, and need some help. I'm working on a web application which can be used to keep track of cars. There are two models, one which represents makes (Saab, Honda, Toyota, etc) and another which represents models (Civic, Miata, PT Cruiser, etc). They have a "has_many" relationship: script/generate scaffold mak...

Javascript: why does jQuery do this: (function(){ ...});, and how does it work?

EDIT: I THOUGHT The jQuery source I was looking at did something like this: (function(){ var bunchOfVariables = 7; jQuery = " ....."; //.... }); I was wrong about that. Ignore this question. I don't understand what that does. Can someone please explain it? This is the very first line in jQuery-1.3.2.js. It ap...

Google Geocoding / Airport Info

Hi, I've been looking for list of types of queries that geocoder supports beyond regular address geocoding. At this time I need to query google for airport locations. I have sumbled upon this document: http://www.ibm.com/developerworks/java/library/j-grails05208/index.html but it mentions no place where I can get up-to-date list of allow...

NS_ERROR_MALFORMED_URI in FF when calling document.location.replace()

I'm seeing the following exception in FF 3.5.6: uncaught exception: [Exception... "The URI is malformed" nsresult: "0x804b000a (NS_ERROR_MALFORMED_URI)" location: "JS frame :: http://x :: refreshPage :: line 193" data: no] This error occurs when calling document.location.replace("/relative/url") on the parent window of an iframe. ...

I want to make browser add-ons/extentions, which programming language do i need to learn?

Which programming languages do i need to learn to make browser add-ons/extentions for all the browsers out there? I have been told its Javascript? Thank you in advance. ...

Learning JavaScript variable scope and object instantiation.

var foo = (function() { var proxy = {}, warning = false; proxy.warn = function(msg) { if (!warning) { warning = true; alert(msg); } return this; //For the purpose of method chaining we return proxy object. } function func() { alert(warning); //This is a pri...