473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Re: Using innerhtml

SAM
Mtek a écrit :
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='innerb'>";
(snip)
echo "</div>";

We want to refresh the DIV (innerb) without refreshing 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
Jun 27 '08 #1
5 1456
On May 5, 5:46*pm, SAM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
Mtek a écrit :
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='innerb'>";
(snip)
* * * * * * * echo "</div>";
We want to refresh the DIV (innerb) without refreshing 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.
Jun 27 '08 #2
On May 6, 12:37*am, Mtek <m...@mtekusa.comwrote:
On May 5, 5:46*pm, SAM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:


Mtek a écrit :
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='innerb'>";
(snip)
* * * * * * * echo "</div>";
We want to refresh the DIV (innerb) without refreshing 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 support 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.
Jun 27 '08 #3
On May 6, 6:56 am, Tom Cole <tco...@gmail.comwrote:
On May 6, 12:37 am, Mtek <m...@mtekusa.comwrote:
On May 5, 5:46 pm, SAM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
Mtek a écrit :
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='innerb'>";
(snip)
echo "</div>";
We want to refresh the DIV (innerb) without refreshing 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 support 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.
Jun 27 '08 #4
On May 6, 8:42*am, Mtek <m...@mtekusa.comwrote:
On May 6, 6:56 am, Tom Cole <tco...@gmail.comwrote:


On May 6, 12:37 am, Mtek <m...@mtekusa.comwrote:
On May 5, 5:46 pm, SAM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
Mtek a écrit :
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='innerb'>";
(snip)
* * * * * * * echo "</div>";
We want to refresh the DIV (innerb) without refreshing 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 support 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.- Hide quoted text -

- Show quoted text -
That's where XMLHttpRequest comes in, that or the form submission
option. AFAIK there's no other way for a browser to initiate a server
request. So where are the simple examples you've seen, maybe that
would help enlighten me to your specific task.

Is it that you don't know/want to learn XMLHttpRequest or do you
really think there's an easier way? If you're uncomfortable with the
idea, you're pretty much stuck with encapsulating your select within a
form and plain ol' submitting the form, having PHP generate your
updated response page. But without a complete page refresh, you're
going to have to intiate an XMLHttpRequest, or generate a form
submission to an (i)Frame.
Jun 27 '08 #5
Mtek wrote:
On May 6, 6:56 am, Tom Cole <tco...@gmail.comwrote:
>On May 6, 12:37 am, Mtek <m...@mtekusa.comwrote:
>>On May 5, 5:46 pm, SAM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
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.
Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Mark Constant | last post by:
I have a drop-down list now and I got it so when something is selected from the drop down list it calls a JavaScript function. I want it so the value selected from the drop-down list is sent as a...
1
by: anonieko | last post by:
> Use x = window.Open(...) x.document.write( yourhtml) > How to print from javascript using .print > How to use ContentWindow > > How t use getElementById > How to get HTML of document...
9
by: Hallvard B Furuseth | last post by:
Why does the FAQ (Q 4.15) recommend innerHTML when so many here say one should use createElement(), replaceChild() etc? Also, why does the "Alternative DynWrite function" at...
6
by: CES | last post by:
All, Visual Studio 2005 doesn't include an auto complete item for innerHTML document.getElementById("SomeID").innerHTML, is their a way of referencing the inner text of an element without using...
11
by: ctman770 | last post by:
Hi Everyone, Is it faster to save the precise location of an html dom node into a variable in js, or to use getElementById everytime you need to access the node? I want to make my application...
7
by: John | last post by:
Hi Everyone, I'm having this extremely annoying problem with Internet Explorer 6, giving me an error message saying "unknown runtime error" whenever I try to alter the contents of a <divelement...
9
by: martymix | last post by:
simple question: I have a simple <dt>test text</dt> I get the innerHTML of that dt, and I try and append some text to it like so: dt = document.getElementsByTagName('dt') var text =...
2
by: rrowles2000 | last post by:
Hi, I have four chuncks of html and I'm trying to sort them. see this link. Basically the sort works for alphabetic sort but not for numerics. Any ideas very welcome? I just can't see what I'm...
2
by: shivendravikramsingh | last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.