473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Strange error

I have 2 listbox server controls on my page that I've written a few js
functions to move the options between them. All works fine, except
when I call my function to re-sort the lists. After the items are
removed from one list and added to another, the following is called
passing the "list to be sorted" in as an object. If I put a simple
alert in after the sort method, it works fine. Once I remove the
alert, I get the "Unspecified error" blah blah blah.

Any thoughts?
Thanks
- Aaron

function sortList(l){
var holdValue = new Array()
for(j=0;j<l.length;j++){
holdValue[j] = l[j].value
}

holdValue.sort()
//UNREM THIS.. AND IT WORKS FINE
//alert("Looking OK")
l.length=0
for(j=0;j<holdValue.length;j++){
var o = new Option(holdValue[j],holdValue[j])
l.add(o)
}
}
Jul 23 '05 #1
2 1083
Aaron wrote:
I have 2 listbox server controls on my page
What server-side application are you using?
that I've written a few js functions to move the options between them.
All works fine, except when I call my function to re-sort the lists.
Where do you call the function(s)?
After the items are removed from one list and added to another, the
following is called passing the "list to be sorted" in as an object. If
I put a simple alert in after the sort method, it works fine. Once I
remove the alert, I get the "Unspecified error" blah blah blah.


"Does not work" is a useless error description. [psf 4.11]
PointedEars
Jul 23 '05 #2
In article <6f*************************@posting.google.com> ,
aj******@hotmail.com (Aaron) wrote:
I have 2 listbox server controls on my page that I've written a few js
functions to move the options between them. All works fine, except
when I call my function to re-sort the lists. After the items are
removed from one list and added to another, the following is called
passing the "list to be sorted" in as an object. If I put a simple
alert in after the sort method, it works fine. Once I remove the
alert, I get the "Unspecified error" blah blah blah.

Any thoughts?
Thanks
- Aaron

function sortList(l){
var holdValue = new Array()
for(j=0;j<l.length;j++){
holdValue[j] = l[j].value
}

holdValue.sort()
//UNREM THIS.. AND IT WORKS FINE
//alert("Looking OK")
l.length=0
for(j=0;j<holdValue.length;j++){
var o = new Option(holdValue[j],holdValue[j])
l.add(o)
}
}


Don't know if this is the source of the error, but you really ought to
terminate your lines with semicolons.
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Olaf | last post by:
I have a frameset page witch contains the myFuc() function. The function is accessed from a page in one of the frames in the frameset. An example is shown below. <input...
25
by: Neil Ginsberg | last post by:
I have a strange situation with my Access 2000 database. I have code in the database which has worked fine for years, and now all of a sudden doesn't work fine on one or two of my client's...
0
by: Kris Vanherck | last post by:
yesterday i started getting this strange error when i try to run my asp.net project: Compiler Error Message: CS0006: Metadata file 'c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net...
6
by: Gary | last post by:
I have an application that has been working just fine for a couple of years. It queries a SQL database and returns some formatted data back to the client. I have a new client, who has a larger...
5
by: Nathan Sokalski | last post by:
When I view my index.aspx page any time after the first time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize)...
0
by: ivb | last post by:
Hi all, I am using DB2 8.1.11.1 on NT with ASP.NET 1.1 When application make connection to database (via ADO.NET), it set "Connection timeout" parameter to 30 seconds. After, when my webpage...
11
by: Martin Joergensen | last post by:
Hi, I've encountered a really, *really*, REALLY strange error :-) I have a for-loop and after 8 runs I get strange results...... I mean: A really strange result.... I'm calculating...
1
by: JoReiners | last post by:
Hello, I have a really strange problem. I'm unable to figure it out on my own. I parse very simple xml documents, without any check for their form. These files look very similar and are encoded...
11
by: Mike C# | last post by:
Hi all, I keep getting a strange error and can't pin it down. The message is: This application has requested the Runtime to terminate it in an unusual way. Please contact the application's...
3
by: Shelly | last post by:
I am encountering two strange problems. First one: I get a "server misconfiguration error", but only sometimes. It occurs on the first screen that accesses the database on a submit. This error...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.