Closed Thread
Results 1 to 4 of 4

Thread: ECHO to DIV

  1. #1
    Join Date
    Mar 2010
    Posts
    15
    Rep Power
    0

    ECHO to DIV

    ok so im creating a contact form and validation page... i have it so that it can validate using both javascript and php. Now i want to be able to have it still validate even when javascript is disabled. my question is.... is there a way to echo, or print info to a specific div using php.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Jaan Guest

    Re: ECHO to DIV

    Code:
    <?php

    function validateForm(){

        return 
    $something;
        
    }

    $str validateForm();

    // find a div where you want to print it

    echo "<div id='someDiv'>".$str."</div>";

    ?>
    Something like that ?

  4. #3
    Join Date
    Mar 2010
    Posts
    15
    Rep Power
    0

    Re: ECHO to DIV

    now that just echo's a div i wanted to know if u can send data to be displayed with in an already existing div

  5. #4
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Posts
    3,082
    Blog Entries
    7
    Rep Power
    42

    Re: ECHO to DIV

    you can always change the content of an div with a javascript, and load the new content from the server with ajax calls.
    __________________________________________
    I study Information Systems at Karlstad University when I'm not on CodeCall

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. echo <a href>
    By newphpcoder in forum PHP Development
    Replies: 1
    Last Post: 05-12-2011, 02:23 PM
  2. Comparison printf to echo
    By xXAlphaXx in forum PHP Development
    Replies: 6
    Last Post: 02-05-2011, 02:40 PM
  3. How to Echo to a specific DIV?
    By ductiletoaster in forum PHP Development
    Replies: 1
    Last Post: 03-24-2010, 01:31 AM
  4. using echo and formatting code
    By hayschooler in forum PHP Development
    Replies: 5
    Last Post: 03-20-2010, 06:33 PM
  5. How to Only Echo something Once In a Loop?
    By tradingjamie in forum Database & Database Programming
    Replies: 3
    Last Post: 07-20-2009, 02:07 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts