phpcodec Posted September 1, 2008 Share Posted September 1, 2008 I have this code below in a chat script i have, it reports the response text fine, but when i want to know the length of the text it always shows 0 in firefox but in IE it shows the correct length, could you tell me whats wrong xmlHttp.responseText.length Link to comment https://forums.phpfreaks.com/topic/122248-ajax-length/ Share on other sites More sharing options...
Ken2k7 Posted September 1, 2008 Share Posted September 1, 2008 I have this code below in a chat script i have, it reports the response text fine, but when i want to know the length of the text it always shows 0 in firefox but in IE it shows the correct length, could you tell me whats wrong xmlHttp.responseText.length Not exactly. Could you show us more of the code? Link to comment https://forums.phpfreaks.com/topic/122248-ajax-length/#findComment-631309 Share on other sites More sharing options...
corbin Posted September 1, 2008 Share Posted September 1, 2008 It might be xmlHttp.responseText.value.length, but I don't remember if response text is plain text or an object. Link to comment https://forums.phpfreaks.com/topic/122248-ajax-length/#findComment-631396 Share on other sites More sharing options...
Ken2k7 Posted September 1, 2008 Share Posted September 1, 2008 It might be xmlHttp.responseText.value.length, but I don't remember if response text is plain text or an object. It's plain text. Link to comment https://forums.phpfreaks.com/topic/122248-ajax-length/#findComment-631437 Share on other sites More sharing options...
corbin Posted September 2, 2008 Share Posted September 2, 2008 Ah.... Ignore my suggestion then ;p. My second guess would be that the problem involves variable scope. Link to comment https://forums.phpfreaks.com/topic/122248-ajax-length/#findComment-631542 Share on other sites More sharing options...
Ken2k7 Posted September 2, 2008 Share Posted September 2, 2008 Ah.... Ignore my suggestion then ;p. My second guess would be that the problem involves variable scope. Yup, that may be the problem. I wish I had more code to work with. :-\ Link to comment https://forums.phpfreaks.com/topic/122248-ajax-length/#findComment-632078 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.