javascript

Javascript Dynamic Grouping

I am trying to create a table, with some grouping headers. All is well when i have 1 group, but how do i create dynamic groups? This is what i have so far (for 1 group): var groupby = ''; arrdata.each(function(element){ if (groupby != element.groupby) { groupby = element.groupby; tbody.push(groupby) } tbody.push(e...

Is graceful degradation in the absence of JavaScript still useful?

When even mobile browsers have JavaScript, is it really necessary to consider potential script-free users? ...

Converting this basic js into jquery has weird results

I want to turn this: document.getElementById("associatedDisplayDiv").innerHTML += formatedResult; ... into jquery. I've tried doing this: $("#associatedDisplayDiv").html( $("#associatedDisplayDiv").html() + formatedResult ); But this is not right, apparently. What happens is that this new line of code remove the value of a input ...

Problem with jquery.ui.autocomplete.js on IE7

Here is the code. IE7 spouts an "'active.0' is null or not an object" error on line 39, which is: input.trigger("activate.autocomplete", [$.data(active[0], "originalObject")]); $("body").trigger("off.autocomplete"); Works perfectly in Firefox/Chrome/Opera. Any ideas? Many thanks and much appreciated. /* jQuery Autocomplete * Version...

Access a control in javascript

i have a control i created behind code Dim txtdate1 As New TextBox txtdate1.ID = "txtdate1" cell.Controls.Add(txtdate1) Cell is a header table cell i added to a gridview. I need to access this in javascript var txtdate1 = document.getElementById('txtdate1'); OR var txtdate1 = document.getElementById('<%=txtdate1.clie...

JQuery show() is delayed in Internet Explorer/Chrome

I have a "processing..." div overlay that I show with $('').show() prior to making ajax calls and hide on completion. The problem I'm running into is that if I want to show the div and then make several ajax calls prior to hiding the div again it seems to queue the events in Internet Explorer (7) and Chrome (2.0.172.39), but I get the e...

How can I create a Zerofilled value using JavaScript?

What is the recommended way to zerofill a value in JavaScript? I imagine I could build a custom function to pad zeros on to a typecasted value, but I'm wondering if there is a more direct way to do this? Note: By "zerofilled" I mean it in the database sense of the word (where a 6-digit zerofilled representation of the number 5 would be ...

Javascript and AJAX, only works when using alert()

Hello everyone, I am having trouble with my javascript. It seems to be acting oddly. This is what's going on. I have a form, after the user submits it, it calls a function(onsubmit event) to verify the submitted data, if something bad OR if the username/email is already in database(using ajax for this part) it'll return false and display...

Slow load times: ISP or Coding

I am getting extremely slow load times and before any action is taken I was wondering if there was an easy way to test to see if it is because of the ISP or the coding of the site. We currently have a T1 going to two mirrored servers, so I don't think the ISP is the issues, we only have a few users on at a time. The website is: http://...

Javascript with an ascx control

I designed an ascx control (I refer to it in this question as customControl). The control is just a series of drop downs with text values in each drop down. The drop downs are inside a panel. Here it is below: I then place a few of them on a page that also has a textbox (I refer to it here as textbox) Here it is below: So what I ...

With Javascript how would I search the first three letters in a string and see if they match "ABC"?

With Javascript how would I search the first three letters in a string and see if they match "ABC"? Thanks ...

Boolean Fields broken in Ext or Ext_scaffold?

I'm experimenting with using ext_scaffold to generate UI elements for a Rails-backed web application. However, I'm experiencing issues with the behavior of boolean fields. For instance, when I do ./script/generate ext_scaffold product name:string description:text sku:integer available:boolean It builds the migration properly and gene...

DB generated list not working when created using jquery.

I have a simple form that has a list (dropdown list generated from a DB), when a user makes a selection, the selection is printed on the screen. The problem I'm having is that if I use jquery to call the php funciton that generates the list when the page is loading, the list will not work, but if I add the code directly in the html it wi...

RegisterStartupScript() is not mixing well with the back button, suggestions?

Given an ASP.NET 2.0 page with the following code in a button click event... Protected Sub btnQuickRpt_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnQuickRpt.Click Dim uniqueReportId As String = GenerateQuickReport() ' Opens the report on page reload. ClientScript.RegisterStartupScript(Me....

Porting SHA512 Javascript implemention to Actionscript

Hello Everyone, I am wondering if anyone can help me in porting a SHA-512 implemention in Javascript to Actionscript. Since both Javascript and Actionscript share the same origin, I think porting it will be easy for people who are used to Actionscript. The code for sha512 in javascript can be found here: http://pajhome.org.uk/crypt/md...

not able to enter mouse into pop up div

<html> <div id="divPopup" onmouseout="removeDIV(this,event);" style="display:none;width:100px;height:100px;color:Navy;border:2px;border-color:Red;border-style:solid;"> Yes its me </div> <table> <tr><td>A</td></tr> <tr><td>S</td></tr> <tr><td onmouseover="loadDIV(event)" onmouseout="r...

JavaScript - quickest way to extract document meta fields

I need to extract the document's "description" meta tag. The default way would be to use document.getElementsByTagName('META') and then iterate through the array - as found in: http://www.rgagnon.com/jsdetails/js-0070.html But I'm wondering if there's no other quicker, "one line of code" approach. I'm not familiar with xPath - but mayb...

Can anyone help with this (Javascript arrays)?

Hi I am new to Netui and Javascript so go easy on me please. I have a form that is populated with container.item data retuned from a database. I am adding a checkbox beside each repeater item returned and I want to add the container item data to an array when one of the checkboxes is checked for future processing. The old code used Anch...

Understanding $ in Mootools

I'm new to Javascript and Mootools and am having a bit of trouble understanding some things, especially since the documentation on Mootools is, shall we say, lacking at best. My question is regarding the $ selector. Why is it that I can chain some properties to it, and not others? For example why does $('results').style.border = "1px...

How can I notify the parent page when a popup has finished a load which the parent initated?

My main HTML page does the following: var popup = window.open(...); // Wait for popup to load popup.onload = function() { do_something(); }; popup.location = "new-page.html"; I'd like do_something to be called when new-page.html is finished loading. But what I currently have doesn't work -- do_something is never called. How can I ma...