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 5 of 9 Topic 35486 of 37128
Post > Topic >>

Re: Using innerhtml

by Mtek <mtek@[EMAIL PROTECTED] > May 6, 2008 at 05:42 AM

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]
>
> > wrote:
>
> > > Mtek a =E9crit :
>
> > > > Hi,
>
> > > > This is the content of my DIV now:
>
> > > no, that is the code given to the server
> > > we need the code received by the browser
>
> > > >               echo "      <div class=3D'innerb'>";
> > > (snip)
> > > >               echo "</div>";
>
> > > > We want to refresh the DIV (innerb) without refre****ng the page,
and=

> > > > if we do not have to use ajax either.
>
> > > you'll certainly need Ajax
> > > or to send the form and get-it back
>
> > > > So, the user selected the date ($pdate) from the combobox,
>
> > > what is a "combobox" ?
> > > where it is ?
>
> > > > I know this can be
> > > > done, but it is just a matter of finding the code or something
> > > > similar......
>
> > > <http://developer.mozilla.org/en/docs/AJAX>
>
> > > --
> > > sm
>
> > The combo box is in another part of the screen.  The page is rather
> > large.  It is not a form.  It just has one combo box, and once the
> > user selects an item, I want the script to get the results from MySQL
> > and display them, without having to redraw the entire page.......
>
> > I know this can be done, I just do not know how.....
>
> > John.- Hide quoted text -
>
> > - Show quoted text -
>
> As mentioned in a previous post you have only two options if you do
> not want a total page refresh...
>
> 1). To bring over not only the options, but also the results of each
> option, and generate the entire page at once storing the results in a
> series of hidden div elements. Then when they select an option make
> that matching div visible. or...
>
> 2). Query the server when an option is selected. If this is your
> choice then you must either use XMLHttpRequest and process the results
> in your callback handler or put your combo box in a form and set the
> target of the form to a (i)Frame.
>
> Unless you are dealing with a script that is being called from a
> different domain I would use XMLHttpRequest as any modern browser that
> can do one, can also do the other as they both require Javascript and
> all modern browsers sup****t XMLHttpRequest in one form or another.
>
> If you choose method 2 (the (i)Frame method) your return code can
> include javascript that calls javascript methods in the parent frame.
>
> 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.
 




 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:58:05 CDT 2008.