473,396 Members | 1,774 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,396 software developers and data experts.

Strange FireFox problem - too much recursion

Hi!

I've implemented some DropDown list in ASP.NET that use Ajax to fetch
the data from the server. The javascript is written to call cascading to
the bottom most dropdown in order to update them all if a top one changed.
The strange thing is that the script runs without problems on IE but in
FireFox i get a "too much recursion" error and nothing happens.

Here is the javascript code generated:

<script language="JavaScript">
<!--
function _ctl12_cob_clientAjaxMethods_GetChannelsByClientBy Lang() {
var value = document.getElementById( "_ctl12_cob_client" ).value;
var para_0=2;

AjaxMethods.GetChannelsByClientByLang( value, para_0,
_ctl12_cob_clientAjaxMethods_GetChannelsByClientBy Lang_callback );
}

function
_ctl12_cob_clientAjaxMethods_GetChannelsByClientBy Lang_callback(
response ) {
var ds = response.value;
if(ds != null && typeof(ds) == "object" && ds.Tables != null){
var reciever = document.getElementById("_ctl12_acob_channel");
var viewStateElem =
document.getElementsByName("_ctl12_acob_channel_VI EWSTATE")[0];
Fill_ListControlFromDataBase( ds, reciever, viewStateElem, 'Name', 'ID' )
_ctl12_acob_channelAjaxMethods_GetCategoryByChanne lClientLang()
} else {
alert("DataSet corrupted or no data");
}
}
function _ctl12_acob_channelAjaxMethods_GetCategoryByChanne lClientLang() {
var value = document.getElementById( "_ctl12_acob_channel" ).value;
var para_0=document.getElementById("_ctl12_cob_client" ).value;
var para_1=2;

AjaxMethods.GetCategoryByChannelClientLang( value, para_0, para_1,
_ctl12_acob_channelAjaxMethods_GetCategoryByChanne lClientLang_callback );
}

function
_ctl12_acob_channelAjaxMethods_GetCategoryByChanne lClientLang_callback(
response ) {
var ds = response.value;
if(ds != null && typeof(ds) == "object" && ds.Tables != null){
var reciever = document.getElementById("_ctl12_acob_category");
var viewStateElem =
document.getElementsByName("_ctl12_acob_category_V IEWSTATE")[0];
Fill_ListControlFromDataBase( ds, reciever, viewStateElem, 'Name', 'ID' )

_ctl12_acob_categoryAjaxMethods_GetSubCategoriesBy MainCat_Client_Language()
} else {
alert("DataSet corrupted or no data");
}
}
function
_ctl12_acob_categoryAjaxMethods_GetSubCategoriesBy MainCat_Client_Language()
{
var value = document.getElementById( "_ctl12_acob_category" ).value;
var para_0=document.getElementById("_ctl12_cob_client" ).value;
var para_1=2;

AjaxMethods.GetSubCategoriesByMainCat_Client_Langu age( value, para_0,
para_1,
_ctl12_acob_categoryAjaxMethods_GetSubCategoriesBy MainCat_Client_Language_callback
);
}

function
_ctl12_acob_categoryAjaxMethods_GetSubCategoriesBy MainCat_Client_Language_callback(
response ) {
var ds = response.value;
if(ds != null && typeof(ds) == "object" && ds.Tables != null){
var reciever = document.getElementById("_ctl12_acob_subcategory") ;
var viewStateElem =
document.getElementsByName("_ctl12_acob_subcategor y_VIEWSTATE")[0];
Fill_ListControlFromDataBase( ds, reciever, viewStateElem, 'Name', 'ID' )

} else {
alert("DataSet corrupted or no data");
}
}

function Fill_ListControlFromDataBase( ds, reciever, viewStateElem,
textFieldName, valueFieldName ) {
if(ds != null && typeof(ds) == "object" && ds.Tables != null){
var html = [];
var i=0;
while( reciever.childNodes.length > 0 ) {
var node = reciever.childNodes[0];
reciever.removeChild( node );
}
var vs = [];
for(i=0; i<ds.Tables[0].Rows.length; i++) {
var txt = ds.Tables[0].Rows[i][textFieldName];
var id = ds.Tables[0].Rows[i][valueFieldName]
vs[vs.length] = id + ":" + txt + "|";
var opt = document.createElement("option");
var txt = document.createTextNode( txt );
var atr = document.createAttribute( "value" );
atr.nodeValue = id;
opt.setAttributeNode( atr );
opt.appendChild( txt );
reciever.appendChild( opt );
}

if ( viewStateElem != null ) {
viewStateElem.value = vs.join("");
} else {
alert("No ViewStateFound");
}
}
}

// -->
</script>

Each function on it's own works if i remove the calls for the child
value method.

Has anyone an idea how this can happen as there is no recursion in this
functions.

thanks in advance and greetings,
chris
Jul 23 '05 #1
9 7754
In article <ne*********************@news.sil.at>, e9806056
@student.tuwien.ac.at enlightened us with...

Has anyone an idea how this can happen as there is no recursion in this
functions.


There is, but you'd have to understand a stack (and realize that a stack is
what is being used) to realize it.
It's a stack overflow error.

As to why it happens and how to fix it, I'd need a full test example (URL?).
I hate reading through generated code and it's worse when I don't have a DOM
to look at to trace it.

You may want to grab the web developer firefox extension.
--
--
~kaeli~
Is it possible to be totally partial?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2
kaeli wrote:
In article <ne*********************@news.sil.at>, e9806056
@student.tuwien.ac.at enlightened us with...
Has anyone an idea how this can happen as there is no recursion in this
functions.

There is, but you'd have to understand a stack (and realize that a stack is
what is being used) to realize it.


Well i know this. The thing is that i can'tz find any parts in the
methods that may cause trouble with the stack. There are max. 8 method
calls before the script terminates and in IE it runns without any
warnings or problems.
It's a stack overflow error.

As to why it happens and how to fix it, I'd need a full test example (URL?).
I hate reading through generated code and it's worse when I don't have a DOM
to look at to trace it.
I'll setup a page for you and send you the URL when it' available.

You may want to grab the web developer firefox extension.


I'll try that

thanks & greetings,
chris
Jul 23 '05 #3
In article <ne********************@news.sil.at>, e9806056
@student.tuwien.ac.at enlightened us with...

Well i know this. The thing is that i can'tz find any parts in the
methods that may cause trouble with the stack.
Okay, I looked at this more thoroughly, and what I don't see is the initial
call to this function (this function seems to set all the rest in motion):

function _ctl12_cob_clientAjaxMethods_GetChannelsByClientBy Lang() {
var value = document.getElementById( "_ctl12_cob_client" ).value;
var para_0=2;

AjaxMethods.GetChannelsByClientByLang( value, para_0,
_ctl12_cob_clientAjaxMethods_GetChannelsByClientBy Lang_callback );
}

What calls this?
And since the function it calls takes a parameter called 'response', where is
that coming from?
function
_ctl12_cob_clientAjaxMethods_GetChannelsByClientBy Lang_callback(
response ) {
var ds = response.value;

I'll setup a page for you and send you the URL when it' available.


Let me know if you get one set up.
I'm curious now. :)

--
--
~kaeli~
A boiled egg in the morning is hard to beat.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #4
kaeli wrote:
In article <ne********************@news.sil.at>, e9806056
@student.tuwien.ac.at enlightened us with...
Well i know this. The thing is that i can'tz find any parts in the
methods that may cause trouble with the stack.

Okay, I looked at this more thoroughly, and what I don't see is the initial
call to this function (this function seems to set all the rest in motion):


right this one calls the next hierachical level and so on. no recusion
in this
function _ctl12_cob_clientAjaxMethods_GetChannelsByClientBy Lang() {
var value = document.getElementById( "_ctl12_cob_client" ).value;
var para_0=2;

AjaxMethods.GetChannelsByClientByLang( value, para_0,
_ctl12_cob_clientAjaxMethods_GetChannelsByClientBy Lang_callback );
}

What calls this?
It is called by the OnChange Event handler in an DropDownList
And since the function it calls takes a parameter called 'response', where is
that coming from?
This is the result DataSet that get initialised and transfered to the
client by the Ajax.NET wrapper library.
function
_ctl12_cob_clientAjaxMethods_GetChannelsByClientBy Lang_callback(
response ) {
var ds = response.value;

I'll setup a page for you and send you the URL when it' available.


Let me know if you get one set up.
I'm curious now. :)


Will let you know - maybe i'll manage it to bring it online tonight.

thanks and greetings,
chris
Jul 23 '05 #5
Christian Hubinger wrote:
kaeli wrote:

[snip]

Let me know if you get one set up.
I'm curious now. :)


Will let you know - maybe i'll manage it to bring it online tonight.


Well i've put it online today.

Register yourself at http://www.jobline.cc/jobline.cc
And after logging in insert the URL:
http://www.jobline.cc/jobline.cc/Def...c.aspx?id=4910

Theere you should see 4 drop down lists updating each other without
doing postbacks - works perfectely in IE but FireFox throws the
described errors.
thanks in advance for your help and greetings,
chris

Jul 23 '05 #6
In article <ne********************@news.sil.at>, e9806056
@student.tuwien.ac.at enlightened us with...

Register yourself at http://www.jobline.cc/jobline.cc


I don't speak German. I don't what to put where in that form.
Register a test account and mail me the username/pass at
tiny_one (at) comcast (dot) net
and I'll check it out when I get home tonight.
Or you can post it here (x-no-archive) and delete the account later.
Whichever floats your boat. :)

You should have a test account set up anyway, even on the production machine,
for things just like this.

For best error tracing, though, you need to pull out as much code as possible
while still recreating the error conditions. Put that in a test page that
doesn't need registering or logging in. It's a LOT easier to trace things
when you pull out all the stuff that does work. Many times I've found my
error just putting together the test case.

--
--
~kaeli~
Condoms should be used on every conceivable occasion.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #7
kaeli wrote:
In article <ne********************@news.sil.at>, e9806056
@student.tuwien.ac.at enlightened us with...
Register yourself at http://www.jobline.cc/jobline.cc
I don't speak German.


Well i understand we need to add a flag to our language change menu ;)
I don't what to put where in that form.
Register a test account and mail me the username/pass at
tiny_one (at) comcast (dot) net
and I'll check it out when I get home tonight.
Or you can post it here (x-no-archive) and delete the account later.
Whichever floats your boat. :)
Well thanks a lot for you help offer but i've just updated the Ajax.NET
dll we are using to handle XmlHttpRequests and the problem disappeared.
So it was actually a problem with one of the client script this library
thrown on the client.
You should have a test account set up anyway, even on the production machine,
for things just like this.
We are planning to have such a test platform online as soon as we do the
official launch of the plattform. So everything now online is a test
plattform.
For best error tracing, though, you need to pull out as much code as possible
while still recreating the error conditions. Put that in a test page that
doesn't need registering or logging in. It's a LOT easier to trace things
when you pull out all the stuff that does work. Many times I've found my
error just putting together the test case.

Shurely that is what i did on the page i use for testing. The problem is
that we are using our own home brewn portal software and therefore i
neet to test if things work inside that environment. Thats the reason
why i didn't put a simple blank page online.
But you are accutally right i'll setup such a simple playground in the
near future to track down such problems.

So again thanks a lot for your offer.

greetings from vienna,
chris
Jul 23 '05 #8
In article <ne********************@news.sil.at>, e9806056
@student.tuwien.ac.at enlightened us with...

Well thanks a lot for you help offer but i've just updated the Ajax.NET
dll we are using to handle XmlHttpRequests and the problem disappeared.
So it was actually a problem with one of the client script this library
thrown on the client.


I had a feeling it was.
Glad you solved the problem.

--
--
~kaeli~
Murphy's Law #2000: If enough data is collected, anything
may be proven by statistical methods.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #9
Christian Hubinger wrote:
kaeli wrote:
@student.tuwien.ac.at enlightened us with...
Register yourself at http://www.jobline.cc/jobline.cc

I don't speak German.


Well i understand we need to add a flag to our language change menu ;)


No, you don't :) <http://www.cs.tut.fi/~jkorpela/flags.html>
PointedEars
--
Messen, was messbar ist, und messbar machen, was noch nicht messbar ist.
-- Galileo Galilei
Jul 23 '05 #10

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

Similar topics

2
by: Jp Calderone | last post by:
Due to some bizarre constraints placed on me, I've written the following metaclass: import types def remove(t, o): return tuple() class BizarreMetaclass(type): def __new__(klass, name,...
1
by: Mike the Canadian | last post by:
I am having a strange problem with field verification in a form. The JavaScript below works just fine in Firefox but in IE. "license" is a pull-down list and "requiredDiscount" is a text field....
9
by: sylsau | last post by:
Hi, I am doing a little program who calculates the permutation of a set of vertex. I use the recursivity for this calcul. My function who calculate the permutations : void permutation(set...
7
by: Hoss | last post by:
Hello all- This is what im trying to achieve. At the top of my page there is some search functionality, through which you cause to be loaded a string representing an HTML page. Below this and...
2
by: niels.froehling | last post by:
Hy; I converted the tables (for _tabular_ :) data) in a project from the plain <table><tr><td></td></tr></table> structure to seperation into head/foot/body divisions (not the <div>-element)....
4
by: Daniel Guettler | last post by:
I'm getting lots of "Error: too much recursion" in my Firefox Error Console I have created these little files to test it. It justs opens a new window and closes it again. I see plenty of errors...
4
by: szimek | last post by:
Hi, I've already posted an email with this problem, but this time I think I got a bit more info. The app I'm currently working on works like this: when user clicks on a clickable element, it...
8
by: =?GB2312?B?yum09MXt?= | last post by:
today I forgot to include some header,then I found the error message by the compiler is quite strange. so I want to know exactly the inner details of the compiler impletation,if possible. and I...
2
by: scdowney | last post by:
First and foremost, thank you in advance for any attempts to help me out. I am working on a project with work, and it requires I use CSS selectors to locate elements within a webpage. For the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.