0

Here's the Question in its simplest of forms,

Steps:

1)When a User comes to my html page,he types a url (abc.html).

2)I want to get some processing done from the php server(using the URL,say abc.php has to get executed) without navigating away from the page in which the user is in,i.e.without navigating away from abc.html (based on suggestions from one of the answers,will be using iframes and src=abc.php)

3)The php script(present in abc.php) should return some data to abc.html

want to achieve this without using JSON/AJAX,can this be achievable at all?(If so,HOW--tutorials or any directions wud HELP A LOt!!)

Since i'm very new to this,i would like to know how to get the file abc.php to be processed by the server.As in where do you place the file for the abc.html to contact the server(abc.php) perform the required processing and return the result which has to be displayed in the same page(abc.html).

I've been searching everywhere with no successful results.Any kind of directions would help.

-New to web development

4
  • Related: stackoverflow.com/questions/6603221/jquery-ajax-php Commented Jul 6, 2011 at 22:05
  • Related: Creating a 2-dimensional jQuery array from a 2-dimensional PHP array with AJAX Commented Jul 6, 2011 at 22:06
  • Yes, JSON and AJAX. The topic is rather large, so probably use jQuery for AJAX (Tutorial, the internet is full of such) and for returning data see one of links above (which aren't the best I must admit) or one of the many related here on SO. It's really a common question. Commented Jul 6, 2011 at 22:08
  • I dont want to use JSON or AJAX.As @aepheus has suggested,i wanted to know how to run a file on the server without navigating away form the current page. Commented Jul 6, 2011 at 22:43

2 Answers 2

0

You can't do this without AJAX. Without AJAX a HTTP request always forces a page to load.

Sign up to request clarification or add additional context in comments.

Comments

0

Let me see if I can correctly rephrase your question. Can I, after loading a page, contact the server without using AJAX?

Yes, you could use an iframe, script, or other server resource fetching tags. Doing something like <script src="abc.php"></script>

Where abc.php echos javascript.

2 Comments

Yes,my ques was that -- after loading a page, contact the server without using AJAX?
where does the file abc.php reside in ? if i click on submit via POST,the $_POST array will get set and will this be available on abc.php ??.. which is residing on the server ?.. i have apache2 running,so where do i put the file abc.php which is supposed to be precessed by the server ??

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.