Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > JavaScript > Re: Using inner...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 9 Topic 35486 of 37128
Post > Topic >>

Re: Using innerhtml

by Captain Paralytic <paul_lautman@[EMAIL PROTECTED] > May 6, 2008 at 08:23 AM

On 6 May, 16:19, Mtek <m...@[EMAIL PROTECTED]
> wrote:
> On May 6, 9:52 am, sheldonlg <sheldonlg> wrote:
>
>
>
> > Mtek wrote:
> > > On May 6, 6:56 am, Tom Cole <tco...@[EMAIL PROTECTED]
> wrote:
> > >> On May 6, 12:37 am, Mtek <m...@[EMAIL PROTECTED]
> wrote:
>
> > >>> On May 5, 5:46 pm, SAM
<stephanemoriaux.NoAd...@[EMAIL PROTECTED]
>
> > >> You're not going to be able to include PHP code inside your HTML
and
> > >> have it magically generate results for you on the client side.
>
> > >> HTH.
>
> > > No, cannot include PHP on the client side, but how about calling a
PHP
> > > routine on the server and returning the results?  I've seen simple
> > > examples of this, though mine is a bit more complex......
>
> > > John.
>
> > Yes, they call that AJAX.
>
> Hmmm....I was trying something like this.  Can you tell me where I'm
> wrong.  I thought it would work.  I'll try reading up on AJAX, but I
> was curious about this method.  It give me an error about the reg_date
> not being defined in the PHP script:
>
> .
> .
> .
>   <script>
>   function getrows(reg_date) {
>      do***ent.getElementById("innerb").innerHTML = XMLHttpRequest("URL/
> viewrows.php");
>   }
>   </script>
> .
> .
> .
>             <?
>              echo "<SELECT NAME='reg_date' onChange=
> \"Javascript:getrows(this.value);\" size=1>\n";
>              $result = mysql_query("SELECT
> DISTINCT(DATE_FORMAT(reg_date, '%m/%d/%Y')) FROM reg_data ORDER BY
> reg_date;");
>              while ($rows = mysql_fetch_array($result)) {
>                echo "<OPTION>";
>                echo $rows['reg_date'];
>                echo "</OPTION>";
>              }
>              echo "</SELECT>\n";
>             ?>
> .
> .
> .
>
>             <?
>               echo "  <tbody>";
>               echo "  <tr>";
>               echo "    <td colspan='6'>";
>               echo "      <div class='innerb'>";
>               echo "        <table class='tabletwo'>";
>               include('viewrows.php');
>               echo "    </table>";
>               echo "</div>";
>               echo "</td></tr>";
>               echo "</tbody>";
>               echo "</table>";
>             ?>
> .
> .
> .
>
> Thanks for everyone's help so far......
>
> John

This reall belongs in a php group, but try this
$result = mysql_query("SELECT
DISTINCT(DATE_FORMAT(reg_date, '%m/%d/%Y')) reg_date FROM reg_data
ORDER BY
reg_date;");
 




 9 Posts in Topic:
Using innerhtml
Mtek <mtek@[EMAIL PROT  2008-05-05 12:11:39 
Re: Using innerhtml
SAM <stephanemoriaux.N  2008-05-06 00:46:58 
Re: Using innerhtml
Mtek <mtek@[EMAIL PROT  2008-05-05 21:37:30 
Re: Using innerhtml
Tom Cole <tcole6@[EMAI  2008-05-06 04:56:10 
Re: Using innerhtml
Mtek <mtek@[EMAIL PROT  2008-05-06 05:42:31 
Re: Using innerhtml
sheldonlg <sheldonlg&g  2008-05-06 10:52:04 
Re: Using innerhtml
Tom Cole <tcole6@[EMAI  2008-05-06 07:44:44 
Re: Using innerhtml
Mtek <mtek@[EMAIL PROT  2008-05-06 08:19:03 
Re: Using innerhtml
Captain Paralytic <pau  2008-05-06 08:23:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 14:57:13 CDT 2008.