how to get php reply in a div?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Asra

    #1

    how to get php reply in a div?

    Hi all,

    I have a web page with a lot of divs and one of the divs contains a
    form that calls a php page. I want the php results to be displayed in
    that div only. Unfortunately, right now the result replaces the entire
    document. If I call any javascript function in the form's action
    field, the form field values are not passed to the php page. Is there
    any way to set the innerHtml property of the div from the php page or
    some other workaround?

    Regards,
    Asra Baig
  • Randy Webb

    #2
    Re: how to get php reply in a div?

    Asra wrote:
    [color=blue]
    > Hi all,
    >
    > I have a web page with a lot of divs and one of the divs contains a
    > form that calls a php page. I want the php results to be displayed in
    > that div only. Unfortunately, right now the result replaces the entire
    > document. If I call any javascript function in the form's action
    > field, the form field values are not passed to the php page. Is there
    > any way to set the innerHtml property of the div from the php page or
    > some other workaround?[/color]

    Same answer I gave you last time you asked this same question.

    Have the page submit to itself, and have PHP echo what you want, where
    you want. No JS needed at all.

    <div id="thisIsWhere IWantIt">
    <? php
    echo "I can echo anything I want here, including entire pages";
    echo "or even bits of information that was submitted to me";[color=blue]
    >[/color]
    </div>

    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    Working...