javascript

Hiding the contents of DIV

I have a DIV with a script as shown below <div style="text-align:center"> <script type='text/javascript' language='JavaScript' src='http://xslt.alexa.com/site_stats/js/t/a?url=www.mysite.com'&gt;&lt;/script&gt; </div> What I want is that the users should not be able to see this div on the site, but the script should be...

How to unregister legend in dojox.charting?

I have the following codes to create chart graphics by dojox.charting: function createChart() { var node = dojo.byId("surfaceDiv"); while (node.hasChildNodes()) { node.removeChild(node.lastChild); // remove all the children graphics } var nodes = "<div id='chart1' style='width: 10px; height: 10px;'></div><div id='legend1'...

ActiveXobject error in javascript

I use ths script in Default.aspx page. <script id="clientEventHandlersJS" type="text/javascript"> function Button1_onclick() { var locator = new ActiveXObject ("WbemScripting.SWbemLocator"); var service = locator.ConnectServer("."); var properties = service.ExecQuery("SELECT * FROM Win32_Netw...

jQuery Countdown plugin and AJAX

I'm using jQuery Countdown plugin to implement a Countdown and call a webservice when timer expires. The problem is that I'm using AJAX on the page, and have to re-setup the Countdown on every AJAX request like so: var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_endRequest(SetupTimer); /*Initial setup*/ $(document).r...

How to make a Split Button Menu Item scroll into view after this item has been selected?

I have used YUI 2.6 for a while. Now, I realized the Split Button of YUI doesn't behave like the standard select html element. After an item is selected, when displaying the list again, it neither highlight or scroll that item into view at all. In the worst case, if I have 200 items, the user has selected the 100th item, when he/she want...

How to edit a Dropdown list in javascript

Hi... I want to edit the drop down list on the selection of the items in the drop down... i dont want to add a seperate textbox... Please help me on this... ...

How to switch on and off checkboxes and radio buttons with JQ

I have tried to get this to work but haven't been successful. I am a a real nube with js so please keep that in mind when trying to help me. You'll have to spell it out for me cuz I just don't understand what is happening yet with all this code. I have two things that I am trying to get working. One is a set of radio buttons. These butt...

How can I detect if the window really resized in IE8 standards mode?

My site has many style sheets customized for varying screen widths. As the browser is resized, the window.onresize event checks that a resize actually took place by looking at document.documentElement.clientWidth. If it did, it turns on successively larger style sheets until scrollbars appear. Then, it turns them off in reverse order unt...

Is there a Javascript chart API with date object (labeling) support?

Does anybody know of a Javascript chart API that will handle scaling and labeling for date values on both axes? It looks like I'll have to do manual client-side calculations for labels if I want to use Google Chart API. My data set is potentially sparse in the dates on either axis, so intelligent labeling calculations would save me a bu...

Hidden Field altered through javascript not persisting on postback

I have a web user control with a hidden field on it. When a javascript event (click) ocurrs, I am trying to set a value in the hidden field, so that the value can be retained on postback and remembered for the next rendering. The control is a collapsible panel extender that does not cause postback, uses jquery, and if postback occurs e...

Weird Event Listening in ActionScript3

I have a weird quirk in ActionScript. I need to pass the index to a callback function. Here is my code for (var i:Number = 0; ((i < arrayQueue.length) && uploading); i++) { var lid:ListItemData=ListItemData(arrayQueue[i]); var localI:Number= new Number(i); // to copy? var errorCallback:Function = function():void { OnUpload...

Limit an html form input to a certain float range

Is there a way to limit a form input field to be between certain number range, say (0,100) I'm filtering the input in the onkeydown event, to accept only numbers, the problem is I want to reject a number if that number would make the input to go out of range So I need a way to see if the current value of the input plus the key the user...

IE8 no longer allows access to individual characters without using substr function?

I used to access individual characters of a string using string[n]. But when I do this in IE8 it always returns undefined when I do this. I can use string.substr(n, 1) to do the same thing, but the syntax is much longer. Why did they do this? ...

How do I add additional parameters to an ExtJS handler?

I am using the ExtJS framework and I have the following handler that is used solely as a handler for a button: var myButtonHandler = function(button, event){ //code goes here }; My button definition looks like this: var myButton = new Ext.Button({ id : 'myButton', renderTo : 'mybutton', text : 'Save', h...

Hosted User Control in IE and Client Side Event Handling

I just upgraded a hosted control to .NET 2.0 and I had to enable the ComVisible to access methods from the client side using javascript. Should events also be accessible once I enable ComVisible? I was handling my events like this before with no issues: <OBJECT id="foo" ...></OBJECT> <script language="javascript"> function docume...

Are there any CSS properties that the JavaScript DOM can't access?

If I were to remove my CSS stylesheet and set all the properties via a JavaScript file, would that be possible? That is, would there be anything I couldn't access via the JS DOM API? ...

How can I teach a beginner to write ASP.NET web applications quickly?

Related: Best ways to teach a beginner to program? I am teaching my brothers ASP.NET programming and they are starting with a very small amount of background knowledge. They know things like declaring a variable, what a class is and what a page is. I want to teach them to be good web developers in the shortest amount of time. The ...

Is Javascript ready for visualizing large datasets?

We've got some data (10-50 columns, hundreds of thousands of rows) that we usually visualize in excel as a line graph or stacked bar chart. Users want to be able to zoom in and out of the graph to get down to the individual samples, but these kind of operations really bring Excel to its knees. I'm thinking about embedding the data into...

Click event does not work after ajax paging

I really hope someone can help with this problem. I have an ajax pagination script that works great on the first page but the click events will not work on any other pages from the paging. This is how I have it setup: jQuery script <script type="text/javascript"> // prepare when the DOM is ready $().ready(function() { //popup div $("...

calling a Flash ExternalInterface with JavaScript

I'm trying to call a function declared with ExternalInterface in a Flash swf, using JavaScript. It worked once, but all of a sudden, it stopped working. I have a debug version of the Flash Player, but no errors occur in Flash. Not even a "Security Sandbox Error" or something. The only error I get is the following error in JavaScript Er...