Welcome Guest Search | Active Topics | Sign In | Register

Calling server side method causes Javascript to loop infinitely Options
DTU
Posted: Thursday, May 20, 2010 12:46:03 AM
Rank: Advanced Member
Groups: Member

Joined: 5/19/2010
Posts: 35
Hi all,

I've come across a strange issue recently. I'm trying to call a server-side method from a Javascript function, and I've found that when I use either a Callback Execute or a ScriptEvent trigger the function won't fire, and the Javascript function will go into an infinite loop from which it'll eventually fall over.

My code at the moment is:

Code: C#
function checkEnter() {
     if (event.keyCode == "13") {         
        eo_GetObject("ScriptEvent1").trigger("whatever", "anything");
        }
    }


Using a Callback Execute does the same thing. Is there anything which might be causing this? Thanks in advance.
eo_support
Posted: Thursday, May 20, 2010 7:25:32 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

I would suggest you to try trigger your server side function with a standard button and see if it works. If that still fails, then the problem would be most likely somewhere in your code. If that does work, you can try to isolate the problem into a test page and we will be happy to take a look. Make sure the test page contains only code needed to reproduce the problem and also runs independently.

Thanks
DTU
Posted: Thursday, May 20, 2010 7:03:08 PM
Rank: Advanced Member
Groups: Member

Joined: 5/19/2010
Posts: 35
The server side function works fine on its own. The loop occurs when calling a Callback Execute or ScriptEvent Trigger are called, even if the respective Callback or ScriptEvent don't have an associated server side method.

Either way I'll try and send a sample page to look at to you.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.