how to display php results in a div

Discussion in 'Javascript' started by Asra, Aug 20, 2004.

  1. Asra

    Asra Guest

    Hello,
    I have a web page with lots of divs. In one of them, there is a form
    which calls for a php document. The problem is that the php results
    have to be shown only in that div. Currently, the whole page is
    replaced by the php document. Any help would be greatly appreciated.
    -Asra
     
    Asra, Aug 20, 2004
    #1
    1. Advertising

  2. Asra wrote:

    > I have a web page with lots of divs. In one of them, there is a form
    > which calls for a php document. The problem is that the php results
    > have to be shown only in that div. Currently, the whole page is
    > replaced by the php document. Any help would be greatly appreciated.


    Solutions:

    A) Retrieve the results with XMLHttpRequest and add element nodes to
    the document. Will AFAIK currently only work with Mozilla/5.0,
    IE/Win with enabled (and not too much restricted) ActiveX support
    and Safari/MacOS X, and will of course only work with enabled
    client-side script support.

    B) Use "iframe" or "object" elements to refer to a document with the form.
    Submitting the form will then only replace the container's location/
    document. "iframe" elements will not work with NN4, "object" elements
    embedding (X)HTML documents will probably not work with IE.

    C) Have the PHP script generate the whole document, including the results
    if certain request variables are set.

    Solution C would be best because most reliable.


    PointedEars
     
    Thomas 'PointedEars' Lahn, Aug 21, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. K Viltersten

    <div ... /> and <div ...></div>

    K Viltersten, Mar 30, 2009, in forum: ASP .Net
    Replies:
    4
    Views:
    765
  2. Rajive Narain
    Replies:
    0
    Views:
    1,943
    Rajive Narain
    Sep 18, 2009
  3. Asra

    display php results in a div

    Asra, Aug 20, 2004, in forum: Javascript
    Replies:
    0
    Views:
    79
  4. Asra
    Replies:
    2
    Views:
    101
    Csaba Gabor
    Aug 20, 2004
  5. Replies:
    3
    Views:
    161
    Michael Fesser
    Oct 28, 2004
Loading...

Share This Page