473,472 Members | 1,728 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Browser problem with mozilla browser

40 New Member
hi!


I am sending the code which is worked on browsers IE and Eclipse internal browser but not with mozilla. which is used to generate dynamic time on key stroke.


[HTML]<html>
<body>

<script type="text/javascript">
function ajaxFunction()
{
var xmlHttp;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4){
document.myForm.time.value=xmlHttp.responseText;

}
}
}
xmlHttp.open("post","time.jsp");
xmlHttp.send("yjkyki");

}
</script>

<form name="myForm" >
Name: <input type="text" name="username" onkeyup="ajaxFunction();"/>
Time: <input type="text" width="150" name="time" />

</form>

</body>
</html>[/HTML]


test.jsp

Expand|Select|Wrap|Line Numbers
  1. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  2.     pageEncoding="ISO-8859-1"%>
  3.  
  4.  
  5.  
  6.  
  7.  
  8. <% java.util.Date d =new java.util.Date();
  9. %>
  10.  
  11. <%=d.getHours()+":"+d.getMinutes()+":"+d.getSeconds() %> -->
  12.  
  13. <%System.out.println(d.toString());
  14. System.out.println("requested to server");%>
Nov 23 '07 #1
5 1633
gits
5,390 Recognized Expert Moderator Expert
hi ...

do you get any errors? may be you could have a look at the FF javascript-console and post the error you find there?

kind regards
Nov 23 '07 #2
mrhoo
428 Contributor
try this- xmlHttp=new xmlHttpRequest()
instead of xmlHttp=new XMLHttpRequest()
Nov 23 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
I am sending the code which is worked on browsers IE and Eclipse internal browser but not with mozilla. which is used to generate dynamic time on key stroke.
Is the JSP page called time.jsp or test.jsp?

Check the output without using Ajax and make sure the server-side page actually works.
Nov 26 '07 #4
acoder
16,027 Recognized Expert Moderator MVP
try this- xmlHttp=new xmlHttpRequest()
instead of xmlHttp=new XMLHttpRequest()
Are you sure about that?
Nov 26 '07 #5
mrhoo
428 Contributor
Yikes!

XMLHttpRequest is the correct syntax.

Maybe
xmlHttp.open("post","time.jsp");
should be
xmlHttp.open("POST","time.jsp");
Nov 26 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Aurélien Géron | last post by:
Hi, I'd like to write a simple portable browser plugin for Internet Explorer, Netscape and if possible other navigators too. Is there a way to do that using Python? For now I'd like to develop...
7
by: Rune Strand | last post by:
What would it take to create a Firefox extension that enables Python as a script language in the browser - just like Javascript? Is it at all possible? Are the hundred good reasons not to bother? ...
34
by: Charles Douglas Wehner | last post by:
This is a serious question - but probably one that has been asked many times before. Go to http://wehner.org It has FRAMES. Select ADDISON. The main page (to the right of the buttons) shows...
5
by: DU | last post by:
Hi! I really need to understand what is so-called browser error correction mechanisms. Can you explain this? I read somewhere (and I no longer can find where I read that) that browsers try to...
16
by: Java script Dude | last post by:
To all Mozilla JS Guru's (IE dudes welcome), I have spent the last three years developing complex DHTML applications that must work in IE 5.5sp2+ but I use Mozilla 1.3+** to do all my...
2
by: swathi | last post by:
----------------------------------------------------------------------- A poll associated with this post was created, to vote and see th results, please visit...
0
by: Stefano | last post by:
Hi all, I'm trying to create a browser definition file (.browser) that matches crawlers user agents. I don't want modify browser files in the Config system folder. I'd like to use App_Browsers...
22
by: petermichaux | last post by:
Hi, I would like to display a message to Internet Explorer clients to encorage them to get Firefox. Yes they may like Internet Explorer but it is my site :) http://www.explorerdestroyer.com/...
0
by: etnaelk | last post by:
Hi all, I have a real bugger of a problem that I just haven't been able to figure out. I am working on writing my own proxy server in C# using TcpListener, TcpClient, HttpWebRequest/Response and...
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
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.