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

Textbox typing lag when accessing AJAX method

JM
Hi,

I transferred an AJAX application to the server to be used across the
Internet. On my localhost, it works great. But when I transferred it to
the server, the user control freezes for a second or two whenever it
calls the AJAX method, including the textbox where the user inputs the
chat message. All it does is retrieve new messages from the server
every second. Please help if you have any idea to how to make the
textbox run smoothly, without lag when the user types.

Thanks

Nov 19 '05 #1
7 2129
Are you using asynchronous calls, passing along an OnComplete and OnTimeout
method?

--

Joshua Mitts
jo****@msn.com
"JM" <jo******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hi,

I transferred an AJAX application to the server to be used across the
Internet. On my localhost, it works great. But when I transferred it to
the server, the user control freezes for a second or two whenever it
calls the AJAX method, including the textbox where the user inputs the
chat message. All it does is retrieve new messages from the server
every second. Please help if you have any idea to how to make the
textbox run smoothly, without lag when the user types.

Thanks

Nov 19 '05 #2
JM
Nope, I don't use OnComplete and OnTimeout. Any suggestion on how I can
fix this problem? Thanks!!!

Nov 19 '05 #3
JM
Nope, I don't use OnComplete and OnTimeout. Any suggestion how I can fix
this problem? Thanks!!

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 19 '05 #4
Nope, I don't use OnComplete and OnTimeout. Any suggestion on how I can
fix this problem? Thanks!!!
*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #5
Check out this page, it has an explanation of how to use OnComplete and
OnTimeout:

http://atlas.asp.net/quickstart/atla...lt.aspx#simple

The idea is that you need to wait for the reply from the server in a
seperate thread (asynchronous), and using OnComplete and OnTimeout makes
that possible.

Also, I would look at your architecture...if you are building chat, you may
want to think about another design besides checking for new messages every
second. It may be the only way, especially if you want cross-browser
compatibility, but...something like a rich client control or ActiveX may
accomplish the job a lot easier, since they can use a dedicated socket
connection to get data from the server instantly.

--

Joshua Mitts
jo****@msn.com

"JM" <jo******@gmail.com> wrote in message
news:eu**************@tk2msftngp13.phx.gbl...
Nope, I don't use OnComplete and OnTimeout. Any suggestion how I can fix
this problem? Thanks!!

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

Nov 19 '05 #6
JM
Thanks Josh. By the way, I am currently using AJAX.NET since we are
using .NET 1.1.

Nov 19 '05 #7
AJAX.NET allows you to do asynchronous calls. If your call looks
something like this

var res = PageName.MethodName(param1, param2)

then you can make the same call asynchronous:

function MethodNameCallBack(res)
{
//do stuff
}

PageName.MethodName(param1, param2, MethodNameCallBack)

This will allow your page to load while waiting for the information
from the server. Also, if you're doing a lot of AJAX during a page load
you're obviously going to have a latency since each requires a trip to
the server. Try to initially load the page with as much information as
possible and limit AJAX calls to updates.

Best of luck,

Matt Furnari

Nov 19 '05 #8

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

Similar topics

14
by: Gidi | last post by:
Hi, For the last week, i'm looking for a way to make a TextBox always write in English (No matter what the OS default language is). i asked here few times but the answers i got didn't help me. i...
9
by: Jerry | last post by:
In limiting textbox input to 500 characters I would like to include a dynamic count of characters input while the user is typing into a textbox. This would obviously be a client side control,...
7
by: siddhiash | last post by:
Hi Friends I want to add PasswordChar Property which shows ****** for string which I type in PropertyGrid Control. Regards, Siddharth
6
by: JohnR | last post by:
I have a table with 1 row which is used to hold some application wide items (one item per field, hence I only need 1 row). I want to bind one of the fields to a textbox. After setting up the...
2
by: Scott McDaniel | last post by:
The code below cannot locate the Textbox "tbDuration" in my ASP.NET 2.0 page. <Ajax.AjaxMethod()> _ Public Function calcTimeSpan(ByVal StartTime As String, ByVal EndTime As String) As String Dim...
7
by: Anil Gupte | last post by:
I have read a lot about getting lines from a multiline textbox in VB.Net. However, I cannot for the life of me figure out how to write to a multiline textbox. Basically, I have created an array of...
5
by: Max | last post by:
I tried the following with Web Dev 2008 with -and- without Ajax Extension 3.5 - using IE 7 I reduced my webform1 to a Scriptmanager and an Updatepanel with 2 textbox and a button. I type something...
4
by: Hrsoft | last post by:
I'm a newbie with asp.net I need to transform a user textbox to uppercase, when typing. Is this possible? I read about Ajax Maskedit, but it is only to certain formats, like dates, etc Thanks...
9
by: David C | last post by:
I have an asp.net page that contains a FormView with several controls bound to a SqlDataSource. One of the controls is a TextBox bound to a date column. I have the following additional properties...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.