javascript

Why does dojo grid need a name column in the json data source

In the following sample data is only shown in the grid if the json data contains a name column -> the first grid shows data, the second not. Why is this the case? index.html: dojo grid <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.3/dijit/themes/tundra/tu...

JavaScript for-loop in BNF

Hi I'm writing BNF for JavaScript which will be used to generate a lexer and a parser for the language. However, I'd like some ideas on how to design the for-loop. Here is the simplified version of my current BNF: [...] VarDecl. Statement ::= "var" Identifier "=" Expr ";" ForLoop. Statement ::= "for" "(" Expr ";" Expr ";" Expr ")" [......

jquery .get/.post not working on ie 7 or 8, works fine in ff

I have basically this on a page: <script type="text/javascript"> function refresh_context() { $("#ajax-context").html("Searching..."); $.get("/ajax/ldap_search.php", {cn: $("#username").val()}, function(xml) { $("#ajax-context").html($("display", xml).text()); $("#context").val($("context", xml).text()); }, '...

How can I get jquery to execute animations in exact parallel?

I'm trying to create an accordion widget in jquery similar to jquery's accordion plugin, with the difference that I want the handles to appear below their respective content instead of above. My accordion works by decreasing the height of the open content section while at the same time increasing the height of the clicked content sectio...

ASP.NET Post-Back and window.onload

Hello. I got a function which checks if some input fields are changed: var somethingchanged = false; $(".container-box fieldset input").change(function() { somethingchanged = true; }); And a function which waits on window.onload and fires this: window.onbeforeunload = function(e) { if (somethingchanged) { var message ...

Selenium adding weird characters to the end of javascript in a form field

I'm trying to set up a field to prepopulate with a unique set of characters, so that i can automatically generate test accounts. Because of the way the system is set up, the name field must be unique, and must not include numerical characters. I put together this selenium code, and it works 99% of the way, but leaves extra garbage ch...

Implementing circular scroller in jquery

I'm looking for a jquery plugin to simulate a vertical marquee. I need it to support: Scroll any opaque (unstructured) content. No li, no div. The user can even paste from Word. Automatic constant scroll velocity. Pause on hover. Circular scroll - after scrolling to end, continue smoothly from the beginning. No scroll back, no visible ...

Javascript won't split using regex

Since I started writing this question, I think I figured out the answers to every question I had, but I thought I'd post anyway, as it might be useful to others and more clarification might be helpful. I was trying to use a regular expression with lookahead with the javascript function split. For some reason it was not splitting the st...

$ is not defined: What does this mean?

Hello all, I get a JS error and I can't figure out how to fix it. When my page loads up, IE7 notifies me of a run time error. In addition, my Firebug on Firefox warns me of an error: $ is not defined (?) [Break on this error] $(document).ready(function() { $("a#sin...Out': 300, 'overlayShow': false }); }); When I go to the lines in ...

Rounded Corners

Duplicate: What is the best way to create rounded corners How to make a cross browser, W3C valid, semantic, non-javascript ROUND corner? What techniques (That are standards compliant) are there for putting rounded corners on display elements in an HTML page? I put HTML CSS and javascript on the tag list below because I believe they are...

Rich Internet Applications with ExtJS: Which direction should I choose?

I need some help in choosing the right way for my RIA. I do want to use a javascript widget library - possibly ExtJS. I'm not sure however if I should try to get around programming in Javascript through ExtGWT or other solutions like Rialto Python. What are your experiences with web application frameworks that do not require you to progr...

IE7 modal dialog scrollbars overlap content

Here's the offending code. To test it, save it in a file called "test.html" and click the button in the top-left corner. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html> <head> <title>Blarg</title> <style type='text/css'> body { margin: 20px; } ...

Resize Modal Window in Javascript

Hola, I'm trying to resize my modal dialog window when certain items are hidden/shown. window.resizeTo(800, 600); I've tried using code like above, but it doesn't seem to work. I think because it is a modal dialog, and not a regular window. Any suggestions as to how I could resize this? ...

Can't dynamically add rows to a <TABLE> in IE?

I have an AJAX application that downloads a JSON object and uses the data to add rows to an HTML <table> using Javascript DOM functions. It works perfectly... except in Internet Explorer. IE doesn't give any sort of error, and I've verified as best as I can that the code is being executed by the browser, but it simply has no effect. I cr...

Problem with calendar script

Calendar displays some weird dates. Rhe month date is supposed to start at friday but starts on tuesday: http://img515.imageshack.us/img515/2927/cal.jpg. <SCRIPT LANGUAGE="JavaScript"> monthnames = new Array("January","Februrary","March","April","May","June","July","August","September","October","November","December"); var linkc...

(jQuery) Scroll event.. I want to scroll the document to the point specified if the user scroll the page

Hi guys, I want to implement a scroll function.. So the default of scroll is disabled. And if the user use the scroll button, I want it to be set to the point I want.. How can I implement this function? window.scrollTop is not working.. I tried a lot of different methods but all were not working.. $(window).scroll(function() { $(b...

Javascript function objects

I edited the question so it would make more sense. I have a function that needs a couple arguments - let's call it fc(). I am passing that function as an argument through other functions (lets call them fa() and fb()). Each of the functions that fc() passes through add an argument to fc(). How do I pass fc() to each function without h...

Generating an unordered list with jQuery

There is unordered list, which not works properly in IE6-7, I would like want to replace it by a jQuery function. So, we have: simple list with special #id (ul id="") some <li> tags some special tag in <li> to show the number of a row (or something else, as you wish). I need a function which will give an unique number for each row, ...

Javascript getters and setters for dummies?

I've been trying to get my head around getters and setters and its not sinking in. I've read JavaScript Getters and Setters and Defining Getters and Setters and just not getting it. Can someone clearly state: What a getter and setter are meant to do, and Give some VERY simple examples? ...

Can JavaScript be used to detect a browser's (IE7) zoom level?

Duplicate: How to get zoom level in Internet Explorer 7? (javascript) I am working on a page that does not display correctly when zooming is used from IE7. I have a way to fix the display but I only want to apply it when IE7 is zoomed in. ...