Can't create DOM Document

Discussion in 'Javascript' started by Gil_H, Apr 17, 2007.

  1. Gil_H

    Gil_H Guest

    Hi,

    I'm trying to create a php form which is auto completed after onchange
    action of a drop down.
    I've created a js file and linked it to a PHP file, which is linked
    with a XML file.

    Inside the PHP - after i tried to print the response and got a blank
    one:

    var response = xmlHttp.responseText;
    alert(response);

    I've tried to print after creating the DomDocument, but it probably
    doesn't work, because it doesn't print anything:

    <?
    $q=$_GET["q"];
    $xmlDoc=new DomDocument();
    print $q;
    .....
    .....
    ?>

    If i put the print $q before the Dom creation: $xmlDoc=new
    DomDocument(); it does print.

    How can i create the DOM without an error? where is my mistake?

    I need any reply/advice,

    Gil H.
     
    Gil_H, Apr 17, 2007
    #1
    1. Advertising

  2. Gil_H

    Darko Guest

    On Apr 17, 3:10 pm, Gil_H <> wrote:
    > Hi,
    >
    > I'm trying to create a php form which is auto completed after onchange
    > action of a drop down.
    > I've created a js file and linked it to a PHP file, which is linked
    > with a XML file.
    >
    > Inside the PHP - after i tried to print the response and got a blank
    > one:
    >
    > var response = xmlHttp.responseText;
    > alert(response);
    >
    > I've tried to print after creating the DomDocument, but it probably
    > doesn't work, because it doesn't print anything:
    >
    > <?
    > $q=$_GET["q"];
    > $xmlDoc=new DomDocument();
    > print $q;
    > ....
    > ....
    > ?>
    >
    > If i put the print $q before the Dom creation: $xmlDoc=new
    > DomDocument(); it does print.
    >
    > How can i create the DOM without an error? where is my mistake?
    >
    > I need any reply/advice,
    >
    > Gil H.


    I rarely see such confusing and disorganised questions. Could you
    please rephrase your question? What is a "php form"? What is that AJAX
    thing doing in the middle of PHP code? Is it just me, or is this more
    a question for PHP group than for JS?
     
    Darko, Apr 17, 2007
    #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. Wendy S
    Replies:
    1
    Views:
    6,458
    Darren Davison
    Aug 5, 2003
  2. johnmmcparland
    Replies:
    1
    Views:
    3,351
    Joe Kesselman
    Apr 30, 2009
  3. Ion Freeman
    Replies:
    17
    Views:
    862
    Tom Anderson
    Jul 11, 2009
  4. Just Another Victim of the Ambient Morality

    How can one get the Hpricot DOM document from Mechanize?

    Just Another Victim of the Ambient Morality, Sep 13, 2008, in forum: Ruby
    Replies:
    3
    Views:
    126
    Aaron Patterson
    Sep 18, 2008
  5. SMH
    Replies:
    2
    Views:
    272
Loading...

Share This Page