Hello,
I keep reading about how NOT to use innerHtml in my Ajax applications,
but no one suggests how to accomplish things without it.I'm looking
for a tutorial, or does someone know of a good book that helps. I use
a lot of php code, so examples with this would be nice.
Thanks
Mike 8 1559
Mike said the following on 11/24/2007 9:27 PM:
Hello,
I keep reading about how NOT to use innerHtml in my Ajax applications,
Where? And why?
If all you are doing is retrieving some date from the server and display
it on the page, the innerHMTL can't be beat for support.
but no one suggests how to accomplish things without it.
To accomplish what?
I'm looking for a tutorial, or does someone know of a good book that helps.
JS Books are junk. Especially books about AJAX.
I use a lot of php code, so examples with this would be nice.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Randy Webb wrote:
Mike said the following on 11/24/2007 9:27 PM:
>Hello, I keep reading about how NOT to use innerHtml in my Ajax applications,
Where? And why?
Good question.
If all you are doing is retrieving some date from the server and display
it on the page, the innerHMTL can't be beat for support.
Yes, it can, for example by using an `input' or `textarea' element. We are
talking about "some data", after all; that is not necessarily HTML code.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Mike said the following on 11/25/2007 9:35 AM:
"Yes, you are correct. People use input and textarea elements for
displaying information in a web page after it has been retrieved
using AJAX."
You snipped my sarcasm markers.
I'm looking for examples of not using innerhtml, using something else.
You still haven't told what it is you are wanting to display. Is it HTML
code, Javascript, plain text, what?
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Just output from a database query, but without reloading, thats why
I'm using AJAX.I would put the data in a table or textbox.
Thanks,
Mike
On Nov 25, 10:32 am, Randy Webb <HikksNotAtH...@aol.comwrote:
Mike said the following on 11/25/2007 9:35 AM:
"Yes, you are correct. People use input and textarea elements for
displaying information in a web page after it has been retrieved
using AJAX."
You snipped my sarcasm markers.
I'm looking for examples of not using innerhtml, using something else.
You still haven't told what it is you are wanting to display. Is it HTML
code, Javascript, plain text, what?
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/
So any examples NOT using innerhtml?
I'm just looking for the relevant snippets
A. What to send back from the php page
B. What functions to use (NOT innerhtml) to extract the data into my
page.
Thanks
Mike
On Nov 25, 12:25 pm, Mike <ampel...@gmail.comwrote:
Just output from a database query, but without reloading, thats why
I'm using AJAX.I would put the data in a table or textbox.
Thanks,
Mike
On Nov 25, 10:32 am, Randy Webb <HikksNotAtH...@aol.comwrote:
Mike said the following on 11/25/2007 9:35 AM:
"Yes, you are correct. People use input and textarea elements for
displaying information in a web page after it has been retrieved
using AJAX."
You snipped my sarcasm markers.
I'm looking for examples of not using innerhtml, using something else.
You still haven't told what it is you are wanting to display. Is it HTML
code, Javascript, plain text, what?
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/- Hide quoted text -
- Show quoted text -
The reason I ask is because ALL the books are using innerhtml and I'm
trying to learn the DOM way, not the javascript way.
Thanks
Mike
On Nov 25, 12:25 pm, Mike <ampel...@gmail.comwrote:
Just output from a database query, but without reloading, thats why
I'm using AJAX.I would put the data in a table or textbox.
Thanks,
Mike
On Nov 25, 10:32 am, Randy Webb <HikksNotAtH...@aol.comwrote:
Mike said the following on 11/25/2007 9:35 AM:
"Yes, you are correct. People use input and textarea elements for
displaying information in a web page after it has been retrieved
using AJAX."
You snipped my sarcasm markers.
I'm looking for examples of not using innerhtml, using something else.
You still haven't told what it is you are wanting to display. Is it HTML
code, Javascript, plain text, what?
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/- Hide quoted text -
- Show quoted text -
Mike said the following on 11/25/2007 12:25 PM:
Just output from a database query, but without reloading, thats why
I'm using AJAX.I would put the data in a table or textbox.
And how you do it depends on where it is in a "table" or a "textbox".
One has a .value property, the other one doesn't. And, it depends on the
data itself and what it's intended purpose is. It is a lot easier to
copy/paste from an input element than it is from a "table".
Thanks,
They can't trim signatures and they post upside down.
How can you identify most Google Group posters without viewing the headers?
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
On Nov 25, 7:58 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
Mike said the following on 11/25/2007 12:25 PM:
Just output from a database query, but without reloading, thats why
I'm using AJAX.I would put the data in a table or textbox.
And how you do it depends on where it is in a "table" or a "textbox".
One has a .value property, the other one doesn't. And, it depends on the
data itself and what it's intended purpose is. It is a lot easier to
copy/paste from an input element than it is from a "table".
Thanks,
They can't trim signatures and they post upside down.
How can you identify most Google Group posters without viewing the headers?
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/
Thanks? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Chris |
last post by:
How can I get the innerHTML of a <div> area only when the page loads, then use that variable in a function?
Here is my code:
function setContent(zz)
{
var lb =...
|
by: KK |
last post by:
Please help!
I am currently experiencing a bug in Safari v125.9.
When I modify the value of form input box and then get the innerHTML
property of the surrounding div object - I am returned the...
|
by: Andrew Poulos |
last post by:
Given that I need to be able to add a TYPE attribute when I'm using
createElement and it seems to fail in both IE and FF (but not MZ) is it
'safer' to use innerHTML instead?
I can dynamically...
|
by: RobG |
last post by:
I know you aren't supposed to use innerHTML to mess with table
structure, but it seems you can't use it just after a table without
damaging the containing element.
I added a table to a div using...
|
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...
|
by: sveinn |
last post by:
Hi all,
I've read through this group searching for an answear about this
problem.
Few have come close but not quite what I need.
My problem is this: I'm using Ajax to fetch a new table with...
|
by: PJ |
last post by:
Greetings...
I have stumbled upon a small problem.
I use Ajax to retrieve part of a page I need to update. I update a DIV
element with the HTML contents I get from another page.
It works...
|
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 =...
|
by: PaPa |
last post by:
I'm not sure this is a javascript issue or an HTML issue. I notice
that when I extract the contents of a div using the innerHTML property
(?), that I wind up with a literal variable (?) which...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |