Jump to content

How to Echo to a specific DIV?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
ductiletoaster

ductiletoaster

    Newbie

  • Members
  • PipPip
  • 15 posts
ok my contact form script is in a separate file as my contact.php page. I made my contact form so that it could validate with JavaScript and PHP if JavaScript wasn't available. Well the script echo's a statement based on the validation but it creates a new page.... i want it to simply print to a targetDIV!

#2
so1i

so1i

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 312 posts
I think the way to do it is to use the DOM class built into PHP. It isn't as simple as using innerHTML in JavaScript, but it will work if you can work out how to put your code into it. Here is an interesting article which might help you.

PHP DOM Class