473,325 Members | 2,805 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,325 software developers and data experts.

Retrieving time value from an asp page into a javascript function- ajax used

Hi
I am doing a simple application using ajax which wil fetch time from server to a javascript function.
i have one html file and one asp page.
In the html page i have two text boxes by name 'username' and 'time'.
The functionality intended to implementd is when you type somethin on the username textbox the server time should come on the time textbox without page reload.
The time information is coming ffrom an asp page time.asp whose content is
<%
response.expires=-1
response.write(time)
%>
when i start the html page, as soon as i write something on the username text box the whole content of the asp page is coming on the time textbox.ajax technology is working fine bcos im getting the result without reloading the page.

But i want the time thats coming from the asp page.
in the ajax function im using xmlHttp.responseText;
xmlhttp is an activexobjet with parameter as "Microsoft.XMLHTTP".



Regards
TeenzoneZ
Apr 19 '07 #1
2 1404
acoder
16,027 Expert Mod 8TB
I assume this is from the W3Schools tutorial. Check that it's been copied exactly as described in the tutorial.
Feb 4 '08 #2
myth0s
32
Hi
I am doing a simple application using ajax which wil fetch time from server to a javascript function.
i have one html file and one asp page.
In the html page i have two text boxes by name 'username' and 'time'.
The functionality intended to implementd is when you type somethin on the username textbox the server time should come on the time textbox without page reload.
The time information is coming ffrom an asp page time.asp whose content is
<%
response.expires=-1
response.write(time)
%>
when i start the html page, as soon as i write something on the username text box the whole content of the asp page is coming on the time textbox.ajax technology is working fine bcos im getting the result without reloading the page.

But i want the time thats coming from the asp page.
in the ajax function im using xmlHttp.responseText;
xmlhttp is an activexobjet with parameter as "Microsoft.XMLHTTP".



Regards
TeenzoneZ
The code provided with the tutorial should work fine. If you get the content of the file (instead of the time), you should make sure your server can handle ASP pages.
Feb 4 '08 #3

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

Similar topics

9
by: Don | last post by:
How do I retrieve the full path (C:\.....filename) of a file uploaded to a php script on the server. I think $_FILES will only provide 'name', which is only the filename itself. Thanks, Don ...
1
by: Chris Shipley | last post by:
I am trying to present a list of links on a page (Form) where each link opens a different picture gallery. I have the Form page which contains the links, a Gallery page, and several include files....
15
by: Cognizance | last post by:
I need a solution for the following, if anyone can think of one. :) I have: 1 form on the page. (no name, no id value set.) 3 hidden form elements named: catalog, vwoidc, oid !!! I can only...
2
by: 4Ankit | last post by:
hello all, i am having some difficulty retrieving information from my form. I want to add content in my table but the content i want to add to the table is what the user inputs in my form. ...
3
by: Harch84 | last post by:
Hi I am using a javascript for google maps to geocode two locations and I thin want to retrieve the two coordinates and enter them into a Perl Script. Now I have managed to set up the page with the...
1
by: haymansfield | last post by:
Hi, Im trying to capture the value the user inputs into the dialog box brought up when the onBeforeUnload event is given an event.ReturnValue. If the user selects ok i dont need to do...
0
bmallett
by: bmallett | last post by:
First off, i would like to thank everyone for any and all help with this. That being said, I am having a problem retrieving/posting my dynamic form data. I have a form that has multiple options...
9
by: ajos | last post by:
Hello friends, After thinking about this for sometime, i decided to post this in the java forum. Well my problem here in detail is, i have 3 jsp pages where in a.jsp(for example) i have a combo...
1
by: nigelesquire | last post by:
I am in need of your assistance. I have a page with multiple unixtime stamps and I need to display them in readable time and date with the user's time zone. Below is the code. <!DOCTYPE...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.