Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-10-2009, 09:13 PM   PM User | #1
qmqmqm
New to the CF scene

 
Join Date: Mar 2009
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
qmqmqm is an unknown quantity at this point
problem: ajax call v.s. opening page directly

if I open the php file directly, it will generate the "mytest" file.
If I use ajax to call the php file however, SOMETIMES it works, but other times the "mytest" file will not be generated.
However I do receive the "hi" back from the ajax call every time.

Does anyone know why this is?

Code:
<?php

$profile_name=$_GET["my_name"];


$file_path = "/mytest";

$file=fopen($file_path, "w");

fwrite($file, "test...");

fclose($file);

echo "hi";

?>
My Ajax call is copied from w3schools, and shouldn't be a problem. I also used the ajax function in jquery and the same problem.

BTW I am using windows XP and IE, running xampp as my webserver and sql on localhost.

If anyone can give me some advise it would be greatly appreciated!

Thanks,

Tom

Last edited by qmqmqm; 03-10-2009 at 09:19 PM..
qmqmqm is offline   Reply With Quote
Old 03-12-2009, 03:27 PM   PM User | #2
A1ien51
Senior Coder

 
A1ien51's Avatar
 
Join Date: Jun 2002
Location: Between DC and Baltimore In a Cave
Posts: 2,717
Thanks: 1
Thanked 94 Times in 88 Posts
A1ien51 will become famous soon enough
Sounds like you are probably cached.

Code:
xmlhttp.open("GET", theURL ,true);
xmlhttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
xmlhttp.send();
Eric
__________________
Tech Author [Ajax In Action, JavaScript: Visual Blueprint]
A1ien51 is offline   Reply With Quote
The Following 2 Users Say Thank You to A1ien51 For This Useful Post:
oesxyl (03-13-2009), qmqmqm (03-17-2009)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:27 AM.


Advertisement
Log in to turn off these ads.