473,320 Members | 1,965 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,320 software developers and data experts.

Very simple question from a novice

I try to change the text in a <p> using getElementById(). I wonder what properties exists, and which one to use here. (The following does not work.)

Regards Knut

______________________

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>JavaScript</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<SCRIPT language="javascript">
function swap() {
document.getElementById('para1').value="New text";
}
</SCRIPT>
</HEAD>

<BODY>
<p id="para1">This is first line</p>
<p id="para2">Here is second line</p>
<FORM action="" method="post">
<INPUT type="button" value="Swap" onClick="swap()">
</FORM>
</BODY>
</HTML>
______________________
May 5 '06 #1
29 1664
Knut Olsen-Solberg said the following on 5/5/2006 9:39 AM:
I try to change the text in a <p> using getElementById(). I wonder what
properties exists, and which one to use here. (The following does not
work.)


That question is asked so many times it is in the Group FAQ:

How do I modify the current page in a browser?
<URL: http://jibbering.com/faq/#FAQ4_15>

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 5 '06 #2
ASM
Randy Webb a écrit :

How do I modify the current page in a browser?
<URL: http://jibbering.com/faq/#FAQ4_15>


I am not sure to agree with this
because iCab (and Opera ?) would understand :
DocAll = (document.all?true:false);
and they works better with DOM
--
Stephane Moriaux et son [moins] vieux Mac
May 5 '06 #3
ASM wrote:
How do I modify the current page in a browser?
<URL: http://jibbering.com/faq/#FAQ4_15>

I am not sure to agree with this


I agree, that answer in the FAQ seems quite out-dated. It doesn't even test
whether .innerHTML is supported before setting it.

I realize FAQs are difficult to maintain, but with it being posted and cited
so often here, it really should contain better answers than this. IMO.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
May 5 '06 #4
On 05/05/2006 16:21, Matt Kruse wrote:

[Randy Webb:]
<URL: http://jibbering.com/faq/#FAQ4_15>

[snip]
[...] that answer in the FAQ seems quite out-dated. It doesn't even
test whether .innerHTML is supported before setting it.


True, but the linked alternative version does.

It might also be worth mentioning that, when the string doesn't contain
markup, it can be much more efficient to use the data property defined
in the W3C DOM.

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
May 5 '06 #5
Matt Kruse said the following on 5/5/2006 11:21 AM:
ASM wrote:
How do I modify the current page in a browser?
<URL: http://jibbering.com/faq/#FAQ4_15> I am not sure to agree with this


I agree, that answer in the FAQ seems quite out-dated. It doesn't even test
whether .innerHTML is supported before setting it.


Did you read that section? First line:
<quote>
At its simplest in current DOM2 (with innerHTML extension) (IE5+ NS6 )
</quote>
It doesn't test for innerHTML because it specifies that it needs the
innerHTML extension. But the browser list it specifies (IE5+ NS6) is
very outdated.

But, a test for support of innerHTML doesn't mean it actually changes
the document - visibly. Search the archives for document.chicken and you
can find those threads.

I realize FAQs are difficult to maintain, but with it being posted and cited
so often here, it really should contain better answers than this. IMO.


It links to the notes on it:

<URL: http://www.jibbering.com/faq/faq_not..._dynwrite.html >

Which is very in depth, coves testing for innerHTML (as well as it can
be tested for) and covers the problems with gEBI emulation.

Do you have a better snippet that could be used that is solid code?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 5 '06 #6
ASM said the following on 5/5/2006 10:54 AM:
Randy Webb a écrit :

How do I modify the current page in a browser?
<URL: http://jibbering.com/faq/#FAQ4_15>
I am not sure to agree with this
because iCab (and Opera ?) would understand :
DocAll = (document.all?true:false);


As will IE and any other browser that supports document.all, but that is
superceded a few lines later.
and they works better with DOM


DocDom = (document.getElementById?true:false);
DocAll = (document.all?true:false);
DocStr=''
if (DocAll) DocStr="return document.all[id]"

//If the browser supports document.all, then DocStr is
//defined to use document.all

if (DocDom) DocStr="return document.getElementById(id)"

//If the browser supports getElementById, then DocStr is *redefined*
//to use getElementById

So, if your browser supports gEBI, then it uses it.

Its the same as writing:

if (document.getElementById){
//use gEBI
} else if(document.all){
//use document.all
}

It only uses document.all if the browser doesn't support getElementById.

Although I think the way it is written is overly convoluted and
document.all support should be dropped entirely from that section, and
it becomes:

document.getElementById('divID').innerHTML = 'new content';

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 5 '06 #7
ASM
Randy Webb a écrit :
ASM said the following on 5/5/2006 10:54 AM:
Randy Webb a écrit :

How do I modify the current page in a browser?
<URL: http://jibbering.com/faq/#FAQ4_15>


I am not sure to agree with this
because iCab (and Opera ?) would understand :
DocAll = (document.all?true:false);


As will IE and any other browser that supports document.all, but that is
superceded a few lines later.


sorry I'd read
if (DocAll) DocStr="return document.all[id]"
*else*
if (DocDom) DocStr="return document.getElementById(id)"

And I saw a lot of things intersting in this FAQ
--
Stephane Moriaux et son [moins] vieux Mac
May 5 '06 #8
Randy Webb wrote:
It doesn't test for innerHTML because it specifies that it needs the
innerHTML extension. But the browser list it specifies (IE5+ NS6) is
very outdated.
This isn't a very "general" approach, though.
It links to the notes on it:
<URL: http://www.jibbering.com/faq/faq_not..._dynwrite.html >
Which is very in depth, coves testing for innerHTML (as well as it can
be tested for) and covers the problems with gEBI emulation.
Do you have a better snippet that could be used that is solid code?


Perhaps a condensed version of the "alt" dynwrite, with a link to the
in-depth explanation?

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
May 5 '06 #9
Matt Kruse said the following on 5/5/2006 1:42 PM:
Randy Webb wrote:
It doesn't test for innerHTML because it specifies that it needs the
innerHTML extension. But the browser list it specifies (IE5+ NS6) is
very outdated.


This isn't a very "general" approach, though.


Actually, I think it is more general/in-depth than it needs to be for an
FAQ Entry. The only use for the document.all code is IE4 and 1 or 2
other minimal use browsers. For an FAQ Entry, it could be nothing more than:

document.getElementById('containerID').innerHTML = newHTML;

With a link to the alt_dynwrite page.
It links to the notes on it:
<URL: http://www.jibbering.com/faq/faq_not..._dynwrite.html >
Which is very in depth, coves testing for innerHTML (as well as it can
be tested for) and covers the problems with gEBI emulation.
Do you have a better snippet that could be used that is solid code?


Perhaps a condensed version of the "alt" dynwrite, with a link to the
in-depth explanation?


Condensed:

document.getElementById('containerID').innerHTML = newHTML;

Can't get any simpler :) Anything you need to support that doesn't fit
that line of code is either so old or so obsolete that it is a lot more
work than should be required.

And personally, I think the alt_dynwrite page is incomplete/inaccurate.
It could cover inserting plain text only with something like:

function changeText(divId,newContent){
document.getElementById(divId).firstChild.nodeValu e = newContent;
}

With necessary feature testing and resort to innerText and other methods
that are not as memory expensive as innerHTML. But, as some dude named
Jim Ley once said
<quote>
innerHTML is the most widely supported option, it works all over the
place, including PocketIE, IE4 etc. where nodeValue approaches won't,
it's simple to use and explain, and speed is rarely particularly
relevant.
</quote>
And that was back in 2003.......
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 5 '06 #10
VK

Randy Webb wrote:
Condensed:

document.getElementById('containerID').innerHTML = newHTML;

Can't get any simpler :) Anything you need to support that doesn't fit
that line of code is either so old or so obsolete that it is a lot more
work than should be required.


It should be at least a short note about tables which require separate
way of content handling (except cell content where innerHTML is
applicable again). Otherwise such FAQ would encourage
myTableBody.innerHTML = "<tr><td>....</tr>";
btw what about the FAQ posting problem?
<http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/2b234f5ba2cae095>

I'm not looking for glory or cratitude of any kind :-) but at least it
could be *some* answer like "we changed our mind, screw you and your
program!"

May 5 '06 #11
VK said the following on 5/5/2006 3:26 PM:
Randy Webb wrote:
Condensed:

document.getElementById('containerID').innerHTML = newHTML;

Can't get any simpler :) Anything you need to support that doesn't fit
that line of code is either so old or so obsolete that it is a lot more
work than should be required.
It should be at least a short note about tables which require separate
way of content handling (except cell content where innerHTML is
applicable again). Otherwise such FAQ would encourage
myTableBody.innerHTML = "<tr><td>....</tr>";


In all the questions about tables and innerHTML, how many have ever said
"I tried DynWrite but it doesn't work with tables"? None. The purpose of
the quick answer is just that - a quick general answer. And as such, the
Tables section should be elsewhere.

btw what about the FAQ posting problem?
<http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/2b234f5ba2cae095>

I'm not looking for glory or cratitude of any kind :-) but at least it
could be *some* answer like "we changed our mind, screw you and your
program!"


They changed there minds, screw you and your program. <g>

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 5 '06 #12
VK

Randy Webb wrote:
VK said the following on 5/5/2006 3:26 PM:
It should be at least a short note about tables which require separate
way of content handling (except cell content where innerHTML is
applicable again). Otherwise such FAQ would encourage
myTableBody.innerHTML = "<tr><td>....</tr>";


In all the questions about tables and innerHTML, how many have ever said
"I tried DynWrite but it doesn't work with tables"? None. The purpose of
the quick answer is just that - a quick general answer. And as such, the
Tables section should be elsewhere.


It should be understood that the FAQ improvement discussions have only
theoretical value: nothing will be ever changed anyway. Withing this
theoretical frame: you may be right.

btw what about the FAQ posting problem?
<http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/2b234f5ba2cae095>

I'm not looking for glory or cratitude of any kind :-) but at least it
could be *some* answer like "we changed our mind, screw you and your
program!"


They changed there minds, screw you and your program. <g>


Thanks for feedback.

May 6 '06 #13
VK said the following on 5/6/2006 1:04 AM:
Randy Webb wrote:
VK said the following on 5/5/2006 3:26 PM:
It should be at least a short note about tables which require separate
way of content handling (except cell content where innerHTML is
applicable again). Otherwise such FAQ would encourage
myTableBody.innerHTML = "<tr><td>....</tr>"; In all the questions about tables and innerHTML, how many have ever said
"I tried DynWrite but it doesn't work with tables"? None. The purpose of
the quick answer is just that - a quick general answer. And as such, the
Tables section should be elsewhere.


It should be understood that the FAQ improvement discussions have only
theoretical value: nothing will be ever changed anyway.


You really should consult your doctor to change your medication VK.
Withing this theoretical frame: you may be right.


It has nothing to do with "theoretical", it has to do with my belief
that I am right. And whether the FAQ ever gets changed (It inevitably
will), it won't change my belief that I am right about that.
btw what about the FAQ posting problem?
<http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/2b234f5ba2cae095>

I'm not looking for glory or cratitude of any kind :-) but at least it
could be *some* answer like "we changed our mind, screw you and your
program!"

They changed there minds, screw you and your program. <g>


Thanks for feedback.


As for posting the FAQ, all it would take is someone willing to
copy/paste the FAQ to a new post three times a week. I am willing to do
that until it can be automated again. Can't assure the exact time every
day but I can post it pretty close to the same time every day.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 6 '06 #14
JRS: In article <58********************@comcast.com>, dated Fri, 5 May
2006 12:29:15 remote, seen in news:comp.lang.javascript, Randy Webb
<Hi************@aol.com> posted :

Although I think the way it is written is overly convoluted and
document.all support should be dropped entirely from that section, and
it becomes:

document.getElementById('divID').innerHTML = 'new content';

The FAQ code was, IIRC, derived from a version which attempted to
support NS4.

I half agree with you; the middle half. For the final quarter, which
you did not reach, I'd put that into a function, for brevity in use -
quicker to type, download, read, and negligibly slower to execute. For
the first quarter, see ...

Consider :

if (document.all && !document.getElementById) { // e.g. IE4
document.getElementById = function(id) { return document.all[id] } }

function Wryt(ID, Str) { document.getElementById(ID).innerHTML = Str }
with an adjacent note saying that the first is to be executed once (if
older systems are also to be supported) and that Wryt is used as
Write("SomeID", "SomeHTMLString")
where SomeID should be ... ("unique within the document and include
files and not reserved" may be stronger than needed).

However, the FAQ version has the advantage that it answers the question
without exposing an ersatz getElementById; one might have instead
something like

function Wryt(ID, Str) {
var R = document.getElementById ? document.getElementById(ID) :
document.all ? document.all[ID] : null ;
R.innerHTML = Str }
or
function Wryt(ID, Str) {
(document.getElementById ? document.getElementById(ID) :
document.all ? document.all[ID] : null).innerHTML = Str }

deeming the reduced efficiency unimportant.
ISTM that there should be, somewhere in the FAQ, an implication by
example of the general desirability of using functions for what would
otherwise be repeated code; and that would suffice.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
May 6 '06 #15
Dr John Stockton said the following on 5/6/2006 1:02 PM:
JRS: In article <58********************@comcast.com>, dated Fri, 5 May
2006 12:29:15 remote, seen in news:comp.lang.javascript, Randy Webb
<Hi************@aol.com> posted :
Although I think the way it is written is overly convoluted and
document.all support should be dropped entirely from that section, and
it becomes:

document.getElementById('divID').innerHTML = 'new content';

The FAQ code was, IIRC, derived from a version which attempted to
support NS4.


NS4 and IE4 both were covered before it was last modified. Trying to
retain IE4 support is what lead to the current version.
I half agree with you; the middle half. For the final quarter, which
you did not reach, I'd put that into a function, for brevity in use -
quicker to type, download, read, and negligibly slower to execute. For
the first quarter, see ...
Consider :

if (document.all && !document.getElementById) { // e.g. IE4
document.getElementById = function(id) { return document.all[id] } }
If people want to support an antiquated IE4, then let them. But IE4 is
sufficiently outdated that it shouldn't be covered in the FAQ.
function Wryt(ID, Str) { document.getElementById(ID).innerHTML = Str }
I don't see the point in functionalizing gEBI there.

with an adjacent note saying that the first is to be executed once (if
older systems are also to be supported) and that Wryt is used as
Write("SomeID", "SomeHTMLString")
Assuming you mean Wryt("....."). I don't care for the name Write as it
is only a typo from write (which is seen here in c.l.j)
where SomeID should be ... ("unique within the document and include
files and not reserved" may be stronger than needed).
It probably isn't strong enough an explanation. The current notes
specify that the SomeID should be unique and goes on to explain that not
only unique to ID's but unique entirely - names and ID's.
However, the FAQ version has the advantage that it answers the question
without exposing an ersatz getElementById; one might have instead
something like

function Wryt(ID, Str) {
var R = document.getElementById ? document.getElementById(ID) :
document.all ? document.all[ID] : null ;
R.innerHTML = Str }
or
function Wryt(ID, Str) {
(document.getElementById ? document.getElementById(ID) :
document.all ? document.all[ID] : null).innerHTML = Str }

deeming the reduced efficiency unimportant.


Very true. Except with regards to document.all. If one wanted to support
IE4, then write a document.all branch as the emulation used above
doesn't cover all the differences in gEBI and the .all collection.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 6 '06 #16
JRS: In article <uI******************************@comcast.com>, dated
Sat, 6 May 2006 18:10:32 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :
Dr John Stockton said the following on 5/6/2006 1:02 PM:

function Wryt(ID, Str) { document.getElementById(ID).innerHTML = Str }


I don't see the point in functionalizing gEBI there.


There is no need for you to do so unassisted; and really no expectation
thereof. Assuming that there are several places in the page code where
such an innerHTML assignment must be executed, it is briefer and clearer
to encapsulate that in a function with a mnemonic name; the time taken
by the additional function call is unlikely to be significant.

with an adjacent note saying that the first is to be executed once (if
older systems are also to be supported) and that Wryt is used as
Write("SomeID", "SomeHTMLString")


Assuming you mean Wryt("....."). I don't care for the name Write as it
is only a typo from write (which is seen here in c.l.j)


Agreed, I manifestly meant Wryt; one cannot use a misspelt function.

where SomeID should be ... ("unique within the document and include
files and not reserved" may be stronger than needed).


It probably isn't strong enough an explanation. The current notes
specify that the SomeID should be unique and goes on to explain that not
only unique to ID's but unique entirely - names and ID's.


If I had meant partially unique (within the script of the document), I
would have so indicated. Even new readers probably realise that there
can be no clash, when running a page, between identifiers in javascript
and ordinary words shown by HTML.

For the present purpose, it is only necessary that the stated condition
should be sufficiently strong and not describes as absolutely necessary.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
May 7 '06 #17
Dr John Stockton said the following on 5/7/2006 10:37 AM:
JRS: In article <uI******************************@comcast.com>, dated
Sat, 6 May 2006 18:10:32 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :
Dr John Stockton said the following on 5/6/2006 1:02 PM:
function Wryt(ID, Str) { document.getElementById(ID).innerHTML = Str }

I don't see the point in functionalizing gEBI there.


There is no need for you to do so unassisted; and really no expectation
thereof.


Your ignorance amazes me sometimes. You are starting to act like TL with
your personal insinuations. I thought you were more intelligent than
that, I guess I was wrong.
Assuming that there are several places in the page code where
such an innerHTML assignment must be executed, it is briefer and clearer
to encapsulate that in a function with a mnemonic name; the time taken
by the additional function call is unlikely to be significant.
Do you have a function that returns a number for a string value when
that string value is a form input? Or, do you use +(fieldRef)? If you
use the + method, then by your reasoning that is incorrect and should be
encapsulated in a function if you use it in "several places". As for the
time taken, why do you use + to convert to a number instead of
Number(stringRef)? Speed.

This entire speed/clarity issue has been discussed before, in depth. I
am sure that if you do not recall it then you can find it your next trip
to the Library.
with an adjacent note saying that the first is to be executed once (if
older systems are also to be supported) and that Wryt is used as
Write("SomeID", "SomeHTMLString")

Assuming you mean Wryt("....."). I don't care for the name Write as it
is only a typo from write (which is seen here in c.l.j)


Agreed, I manifestly meant Wryt; one cannot use a misspelt function.


Aside from the misspelled word, agreed. If it were going to be a
function with a name to replace DynWrite, then name it DynWrite.
where SomeID should be ... ("unique within the document and include
files and not reserved" may be stronger than needed).

It probably isn't strong enough an explanation. The current notes
specify that the SomeID should be unique and goes on to explain that not
only unique to ID's but unique entirely - names and ID's.


If I had meant partially unique (within the script of the document), I
would have so indicated. Even new readers probably realise that there
can be no clash, when running a page, between identifiers in javascript
and ordinary words shown by HTML.


Are you kidding? New readers would know that they can't have duplicate
ID's and/or names? I appreciate the laugh. Most of them don't even know
what +(stringRef) does (It gets asked a lot).

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 7 '06 #18
Thanks!
Am I right assuming that getElementById('aID') cannot be used if aID is something in a form, e.g. an input, or an image?
I have tried, and if we have <INPUT id="ainp" type="text" size=9"> then
a=parseFloat(document.getElementById('ainp').inner HTML); does not work.
Nor does
a=parseFloat(document.getElementById('ainp').value );

I can make this work though: <INPUT name="ainp" type="text" size=9"> // name, not id
a=parseFloat(document.aform.ainp.value); // Of course the form had the name="aform".

I would highly appreciate to see these rules. I have searched for information about this for several hours, but they are either buried in an awful lot of details, or I just get small pieces of it...

Regards Knut

Randy Webb wrote:
Knut Olsen-Solberg said the following on 5/5/2006 9:39 AM:
I try to change the text in a <p> using getElementById(). I wonder
what properties exists, and which one to use here. (The following does
not work.)

That question is asked so many times it is in the Group FAQ:

How do I modify the current page in a browser?
<URL: http://jibbering.com/faq/#FAQ4_15>


May 8 '06 #19
VK

Knut Olsen-Solberg wrote:
Thanks!
Am I right assuming that getElementById('aID') cannot be used if aID is something in a form, e.g. an input, or an image?
I have tried, and if we have <INPUT id="ainp" type="text" size=9"> then
a=parseFloat(document.getElementById('ainp').inner HTML); does not work.
Nor does
a=parseFloat(document.getElementById('ainp').value );

I can make this work though: <INPUT name="ainp" type="text" size=9"> // name, not id
a=parseFloat(document.aform.ainp.value); // Of course the form had the name="aform".

I would highly appreciate to see these rules. I have searched for information about this for several hours, but they are either buried in an awful lot of details, or I just get small pieces of it...


You may play with this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html401/loose.dtd">
<html>
<head>
<title>JavaScript</title>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">

<script type="text/javascript">
function swap() {
var tmp = $('para1').innerHTML;
$('para1').innerHTML = $('para2').innerHTML;
$('para2').innerHTML = tmp;

tmp = document.forms['myForm'].elements['text1'].value;
document.forms['myForm'].elements['text1'].value
= document.forms['myForm'].elements['text2'].value;
document.forms['myForm'].elements['text2'].value = tmp;
}

function $(id) {
return document.getElementById(id);
}

</script>
</head>

<body>
<p id="para1">This is first line</p>
<p id="para2">Here is second line</p>
<form name="myForm" action="" method="post">
<input type="text" name="text1" value="This is first value"><br>
<input type="text" name="text2" value="This is second value"><br>
<input type="button" value="Swap" onClick="swap()">
</form>
</body>
</html>
In the first swap block (getElementById) you are using DOM 1 methods.
In the second swap block (document.forms) you are using form-specific
methods from DOM 0.

You can use DOM 1 instead of DOM 0. Thus you can give ID's to form
elements and retrieve getElementById('ElementID').value.

You cannot use DOM 0 instead of DOM 1 because DOM 0 simply doesn't have
an ability to address any given element on the page.

In any case .value property appertains to form elements. DOM elements
like <p> <div> etc. do have innerHTML and nodeValue properties instead.

May 8 '06 #20
On 5 May 2006 12:26:56 -0700, "VK" <sc**********@yahoo.com> wrote:
btw what about the FAQ posting problem?
<http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/2b234f5ba2cae095>

I'm not looking for glory or cratitude of any kind :-) but at least it
could be *some* answer like "we changed our mind, screw you and your
program!"


I had to go to Holland for meetings, then I went to map the Isle of
Wight with the openstreetmap.org people, the FAQ restarting got lost
in a 3 hour delay at schiphol when I was sitting on the tarmac.

It will happen, and after looking at your code, there will be changes
- I ain't running it under a webserver, but it will be substantially
based on your code I'm sure. An annoucement will be made when it's
back

Cheers,

Jim.
May 8 '06 #21
JRS: In article <Op******************************@comcast.com>, dated
Sun, 7 May 2006 15:00:08 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :
Dr John Stockton said the following on 5/7/2006 10:37 AM:
JRS: In article <uI******************************@comcast.com>, dated
Sat, 6 May 2006 18:10:32 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :
Dr John Stockton said the following on 5/6/2006 1:02 PM:
function Wryt(ID, Str) { document.getElementById(ID).innerHTML = Str }
I don't see the point in functionalizing gEBI there.


There is no need for you to do so unassisted; and really no expectation
thereof.


Your ignorance amazes me sometimes. You are starting to act like TL with
your personal insinuations. I thought you were more intelligent than
that, I guess I was wrong.


You lack the ability to judge. And being a typical Merkin, you resent
being given the treatment that you feebly apply to others.

Assuming that there are several places in the page code where
such an innerHTML assignment must be executed, it is briefer and clearer
to encapsulate that in a function with a mnemonic name; the time taken
by the additional function call is unlikely to be significant.


Do you have a function that returns a number for a string value when
that string value is a form input? Or, do you use +(fieldRef)? If you
use the + method, then by your reasoning that is incorrect and should be
encapsulated in a function if you use it in "several places". As for the
time taken, why do you use + to convert to a number instead of
Number(stringRef)? Speed.


You have failed to perceive the distinction. A call to Wryt is
considerably shorter that what would otherwise be used, and less
susceptible to typos; but it's hard to see how one could code anything
more briefly than +. I referred to "such an innerHTML assignment"; you
are not justified in extending the reference in that manner. In fact,
you would be unjustified in extending it to LZ, although there a
corresponding argument is applicable. While it's not necessarily
obvious that the unary + operator is allowed, there's only two possible
meanings only one of which is reasonable.

Aside from the misspelled word, agreed. If it were going to be a
function with a name to replace DynWrite, then name it DynWrite.


It is distinct, and so should have a distinct public name. If a user
prefers to use the original name, then he can either rename the function
or assign DynWrite = Wryt .

where SomeID should be ... ("unique within the document and include
files and not reserved" may be stronger than needed).
It probably isn't strong enough an explanation. The current notes
specify that the SomeID should be unique and goes on to explain that not
only unique to ID's but unique entirely - names and ID's.


If I had meant partially unique (within the script of the document), I
would have so indicated. Even new readers probably realise that there
can be no clash, when running a page, between identifiers in javascript
and ordinary words shown by HTML.


Are you kidding? New readers would know that they can't have duplicate
ID's and/or names?


That's not what I wrote, though. If you actually read what I wrote in
the earlier quote, even you should be able to see that it was *telling*
the reader that he should not have duplicates (within the script) for
the names used as the first argument of Wryt. For an absolute
prohibition, "must" would have been used.

In the later quote, the sentence including "new readers" refers to the
irrelevance of such as the repetition of "The" in
<body><p>The</p><script><div ID="The">The</div></script></body>
You remind me : I'd like to locate the (thought to be) C P Snow quote in
which an academic (A) says, of another (B), that A does not so much mind
the B has not written any books as that B seems not to have read any.

General : my Rounding is now in js-round js-rndg1 js-rndg2 js-rndg3 and
no longer in $rnd.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
May 8 '06 #22
Dr John Stockton said the following on 5/8/2006 10:23 AM:
JRS: In article <Op******************************@comcast.com>, dated
Sun, 7 May 2006 15:00:08 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :
Dr John Stockton said the following on 5/7/2006 10:37 AM:
JRS: In article <uI******************************@comcast.com>, dated
Sat, 6 May 2006 18:10:32 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :
Dr John Stockton said the following on 5/6/2006 1:02 PM:
> function Wryt(ID, Str) { document.getElementById(ID).innerHTML = Str }
I don't see the point in functionalizing gEBI there.
There is no need for you to do so unassisted; and really no expectation
thereof. Your ignorance amazes me sometimes. You are starting to act like TL with
your personal insinuations. I thought you were more intelligent than
that, I guess I was wrong.


You lack the ability to judge.


I have never said differently. But coming from someone that is as
judgmental as you are, that is hilarious.
And being a typical Merkin, you resent being given the treatment that
you feebly apply to others.
Your ignorance is overwhelming. The only person that is more judgmental,
arrogant, and condescending in this group than you is TL and you are
approaching him very quickly.

Again, I thought you were more intelligent than that but I was wrong.

If you want to continue the personal attacks, then go ahead. I won't
stoop to your level.
Assuming that there are several places in the page code where
such an innerHTML assignment must be executed, it is briefer and clearer
to encapsulate that in a function with a mnemonic name; the time taken
by the additional function call is unlikely to be significant.

Do you have a function that returns a number for a string value when
that string value is a form input? Or, do you use +(fieldRef)? If you
use the + method, then by your reasoning that is incorrect and should be
encapsulated in a function if you use it in "several places". As for the
time taken, why do you use + to convert to a number instead of
Number(stringRef)? Speed.


You have failed to perceive the distinction.


No, you have failed to understand that I do know the distinction. The
code in the FAQ is *NOT* used for being "briefer" or "clearer", it is
used for *speed*. And no other reason. As I said, that argument was
hashed to death - search the archives.
A call to Wryt is considerably shorter that what would otherwise be used,
and less susceptible to typos; but it's hard to see how one could code
anything more briefly than +.
Wryt is just as susceptible to typos as anything else. And for someone
looking in the FAQ to learn from, not letting them learn the mistakes of
typos is doing them a disservice.
I referred to "such an innerHTML assignment"; you are not justified
in extending the reference in that manner.
The comparison is valid. You said that the speed difference was
"unlikely to be significant" and I applied that same reasoning to your
own code. You didn't like it though.
In fact, you would be unjustified in extending it to LZ, although there a
corresponding argument is applicable. While it's not necessarily
obvious that the unary + operator is allowed, there's only two possible
meanings only one of which is reasonable.
Only two uses for + ? Wrong.
> where SomeID should be ... ("unique within the document and include
> files and not reserved" may be stronger than needed).
It probably isn't strong enough an explanation. The current notes
specify that the SomeID should be unique and goes on to explain that not
only unique to ID's but unique entirely - names and ID's.
If I had meant partially unique (within the script of the document), I
would have so indicated. Even new readers probably realise that there
can be no clash, when running a page, between identifiers in javascript
and ordinary words shown by HTML.

Are you kidding? New readers would know that they can't have duplicate
ID's and/or names?


That's not what I wrote, though.


It doesn't matter what is written, what matters is the interpretation
and you implied precisely what I wrote.
If you actually read what I wrote in the earlier quote, even you should
be able to see that it was *telling* the reader that he should not have
duplicates (within the script) for the names used as the first argument
of Wryt. For an absolute prohibition, "must" would have been used.


And you think that readers of the FAQ who are trying to learn something
from it are going to search for this thread and understand that? Heck,
they can't even find the FAQ and understand what the unary + does, much
less know to try to find this thread. Your pedantics get boring.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 10 '06 #23
VK

Jim Ley wrote:
after looking at your code, there will be changes
- I ain't running it under a webserver, but it will be substantially
based on your code I'm sure. An annoucement will be made when it's
back


Thanks, ACK

May 10 '06 #24
function swap() {
document.getElementById('para1').innerHTML="New text";
}

May 10 '06 #25
JRS: In article <lq******************************@comcast.com>, dated
Tue, 9 May 2006 00:07:36 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :
Dr John Stockton said the following on 5/8/2006 10:23 AM:


On the fifth of August? I think not. And the time was 15:23.

A call to Wryt is considerably shorter that what would otherwise be used,
and less susceptible to typos; but it's hard to see how one could code
anything more briefly than +.


Wryt is just as susceptible to typos as anything else. And for someone
looking in the FAQ to learn from, not letting them learn the mistakes of
typos is doing them a disservice.


Using Wryt is less susceptible. In each case, one must type the ID &
display string correctly, and a pair of parentheses. A typo in "Wryt"
will generally give an error message on first test. But a type in
"innerHTML" will result in the assignment of the string to a new
property without affecting the screen. That's less noticeable.

In fact, you would be unjustified in extending it to LZ, although there a
corresponding argument is applicable. While it's not necessarily
obvious that the unary + operator is allowed, there's only two possible
meanings only one of which is reasonable.


Only two uses for + ? Wrong.


Only two *possible* meanings for the *unary* + *operator* is what I
wrote. Binary + either concatenates strings (one of which may have been
converted from a Number) or adds Numbers. Therefore, the only possible
effects for unary + are conversion to String and conversion to Number.

Perhaps if you were to read a larger proportion of the words in each
sentence you would get better results.
One understands that the USA claims to lead the World. One observes
that the trend in educational standards, over the last forty years, is
dumbing down. The observed effect is therefore as should be expected.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
May 10 '06 #26
Dr John Stockton said the following on 5/9/2006 2:30 PM:
JRS: In article <lq******************************@comcast.com>, dated
Tue, 9 May 2006 00:07:36 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :
Dr John Stockton said the following on 5/8/2006 10:23 AM:
On the fifth of August? I think not. And the time was 15:23.


I did not write the fifth of August. I have explained it to you before,
and evidently you didn't understand it. But if you are ignorant enough
to think in May that I am referring to a date in August then you are
worse than I thought.

But try harder son.
A call to Wryt is considerably shorter that what would otherwise be used,
and less susceptible to typos; but it's hard to see how one could code
anything more briefly than +.

Wryt is just as susceptible to typos as anything else. And for someone
looking in the FAQ to learn from, not letting them learn the mistakes of
typos is doing them a disservice.


Using Wryt is less susceptible. In each case, one must type the ID &
display string correctly, and a pair of parentheses. A typo in "Wryt"
will generally give an error message on first test. But a type in
"innerHTML" will result in the assignment of the string to a new
property without affecting the screen. That's less noticeable.


You need to go to your Physician and get a prescription for Prozac. You
don't think that not changing the visible display wouldn't be
noticeable? You really are a work of art my boy.
In fact, you would be unjustified in extending it to LZ, although there a
corresponding argument is applicable. While it's not necessarily
obvious that the unary + operator is allowed, there's only two possible
meanings only one of which is reasonable.

Only two uses for + ? Wrong.


Only two *possible* meanings for the *unary* + *operator* is what I
wrote. Binary + either concatenates strings (one of which may have been
converted from a Number) or adds Numbers. Therefore, the only possible
effects for unary + are conversion to String and conversion to Number.


Again, and you think that people reading the FAQ attempting to learn
will know the difference between the different uses of +?

<snipped some more of JRS' pedantic ramblings about the USA>

Irony: If it weren't for the US, JRS wouldn't even be posting here.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 10 '06 #27
JRS: In article <mL********************@comcast.com>, dated Tue, 9 May
2006 23:52:08 remote, seen in news:comp.lang.javascript, Randy Webb
<Hi************@aol.com> posted :
Dr John Stockton said the following on 5/9/2006 2:30 PM:
JRS: In article <lq******************************@comcast.com>, dated
Tue, 9 May 2006 00:07:36 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :
Dr John Stockton said the following on 5/8/2006 10:23 AM: A call to Wryt is considerably shorter that what would otherwise be used,
and less susceptible to typos; but it's hard to see how one could code
anything more briefly than +.
Wryt is just as susceptible to typos as anything else. And for someone
looking in the FAQ to learn from, not letting them learn the mistakes of
typos is doing them a disservice.


Using Wryt is less susceptible. In each case, one must type the ID &
display string correctly, and a pair of parentheses. A typo in "Wryt"
will generally give an error message on first test. But a type in
"innerHTML" will result in the assignment of the string to a new
property without affecting the screen. That's less noticeable.


You need to go to your Physician and get a prescription for Prozac. You
don't think that not changing the visible display wouldn't be
noticeable? You really are a work of art my boy.


But I did not write that it would not be noticeable, but that it would
be less noticeable. You're still not reading what you respond to with
sufficient care or ability.

In fact, you would be unjustified in extending it to LZ, although there a
corresponding argument is applicable. While it's not necessarily
obvious that the unary + operator is allowed, there's only two possible
meanings only one of which is reasonable.
Only two uses for + ? Wrong.


Only two *possible* meanings for the *unary* + *operator* is what I
wrote. Binary + either concatenates strings (one of which may have been
converted from a Number) or adds Numbers. Therefore, the only possible
effects for unary + are conversion to String and conversion to Number.


Again, and you think that people reading the FAQ attempting to learn
will know the difference between the different uses of +?


Irrelevant. I'm there refuting your error in misinterpreting my
previous statement. Don't quote what you have not read.

--
© John Stockton, Surrey, UK. ??*@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Check boilerplate spelling -- error is a public sign of incompetence.
Never fully trust an article from a poster who gives no full real name.
May 10 '06 #28
Dr John Stockton said the following on 5/10/2006 4:59 PM:
JRS: In article <mL********************@comcast.com>, dated Tue, 9 May
2006 23:52:08 remote, seen in news:comp.lang.javascript, Randy Webb
<Hi************@aol.com> posted :
Dr John Stockton said the following on 5/9/2006 2:30 PM:
JRS: In article <lq******************************@comcast.com>, dated
Tue, 9 May 2006 00:07:36 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :
Dr John Stockton said the following on 5/8/2006 10:23 AM: A call to Wryt is considerably shorter that what would otherwise be used,
> and less susceptible to typos; but it's hard to see how one could code
> anything more briefly than +.
Wryt is just as susceptible to typos as anything else. And for someone
looking in the FAQ to learn from, not letting them learn the mistakes of
typos is doing them a disservice.
Using Wryt is less susceptible. In each case, one must type the ID &
display string correctly, and a pair of parentheses. A typo in "Wryt"
will generally give an error message on first test. But a type in
"innerHTML" will result in the assignment of the string to a new
property without affecting the screen. That's less noticeable. You need to go to your Physician and get a prescription for Prozac. You
don't think that not changing the visible display wouldn't be
noticeable? You really are a work of art my boy.


But I did not write that it would not be noticeable, but that it would
be less noticeable. You're still not reading what you respond to with
sufficient care or ability.


You really are as ignorant as you act at times.

If nothing happens on the page, at all, because the user has error
messages disabled (IE) or they are using Firefox and don't know where
the Error Console is, then they see the same thing (with the exception
of the yellow ! in IE if they know to look for it ) - nothing. Nothing
is nothing. And one is not "less noticeable" than the other. They are
both the same.

Your pedantic juvenile behavior gets old.

But keep trying my son, you can do it.
> In fact, you would be unjustified in extending it to LZ, although there a
> corresponding argument is applicable. While it's not necessarily
> obvious that the unary + operator is allowed, there's only two possible
> meanings only one of which is reasonable.
Only two uses for + ? Wrong.
Only two *possible* meanings for the *unary* + *operator* is what I
wrote. Binary + either concatenates strings (one of which may have been
converted from a Number) or adds Numbers. Therefore, the only possible
effects for unary + are conversion to String and conversion to Number.

Again, and you think that people reading the FAQ attempting to learn
will know the difference between the different uses of +?


Irrelevant.


Only from you. You make a statement, I apply your logic to another
scenario that is similar, and you reply "Irrelevant".
I'm there refuting your error in misinterpreting my previous statement.


The only problem with that is you don't understand what I wrote, nor can
you properly interpret it based on your previous behavior. You are
starting to remind me of TL.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 11 '06 #29
VK wrote:
You may play with this:
Or rather not.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html401/loose.dtd">
http://www.w3.org/TR/html4/loose.dtd

is the recommended URI, pointing to the latest HTML version.
<html>
<head>
<title>JavaScript</title>
<URL:http://www.w3.org/QA/Tips/good-titles>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
Use this only if you really know what you are doing. It is recommended
only for resources that are not served via HTTP. Because it is potentially
harmful for resources that are served via HTTP: the HTTP Content-Type
header takes precedence over this, and if both values are different, the
result is most certainly not what you would expect (without knowing this).
<script type="text/javascript">
function swap() {
var tmp = $('para1').innerHTML;
$('para1').innerHTML = $('para2').innerHTML;
$('para2').innerHTML = tmp;
The return value of $() should be tested before it is used with
property accessors, to avoid runtime errors.

`innerHTML' is a proprietary property that should be tested before
it is read or written to. Standards compliant access methods should
be preferred, mixing standards compliant and proprietary features
should be avoided.

<URL:http://pointedears.de/scripts/test/whatami#inference>
tmp = document.forms['myForm'].elements['text1'].value;
document.forms['myForm'].elements['text1'].value
= document.forms['myForm'].elements['text2'].value;
document.forms['myForm'].elements['text2'].value = tmp;
One wants to optimize here:

var
es = document.forms['myForm'].elements,
text1 = es['text1'],
text2 = es['text2'];

tmp = text1.value;
text1.value = text2.value;
text2.value = tmp;

Further feature tests might be appropriate.
}

function $(id) {
return document.getElementById(id);
}
"The dollar sign is intended for use only in mechanically generated code."
(ECMAScript Language Specification, Edition 3 Final, 7.6 Identifiers)

And the method as is, allowing a shorter identifier aside, is entirely
redundant. It only adds up to stack memory usage.
</script>
</head>

<body>
<p id="para1">This is first line</p>
<p id="para2">Here is second line</p>
<form name="myForm" action="" method="post">
This `form' element does not need a name, ...
<input type="text" name="text1" value="This is first value"><br>
<input type="text" name="text2" value="This is second value"><br>
(and type="text" is redundant, that is the default attribute value)
<input type="button" value="Swap" onClick="swap()">
.... if this line is changed to

<input type="button" value="Swap" onclick="swap(this);">

because as per DOM Level 0, each DOM object representing a form control has
a `form' property that refers to the DOM object representing the ancestor
`form' element. And `this' in an intrinsic event handler attribute value
refers to the object that handles the event (provided that the default
`scripting' language is an ECMAScript implementation, which is the case
here); that is the `input' element here.

Furthermore, items that require support of client-side scripting should
be generated by it:

<script type="text/javascript">
document.write(
'<input type="button" value="Swap" onclick="swap(this);">');
</script>
</form>
</body>
</html>
In the first swap block (getElementById) you are using DOM 1 methods.
These days it would be rather W3C DOM Level 2, although
Document::getElementById() was already defined in W3C DOM Level 1 indeed.

`innerHTML' as used "in the first swap block" does not qualify as a DOM
Level 0 feature, since neither IE nor Netscape before version 4 supported
it.
In the second swap block (document.forms) you are using form-specific
methods from DOM 0.
True, as this also works with NN3/IE3.
You can use DOM 1 instead of DOM 0. Thus you can give ID's to form
elements and retrieve getElementById('ElementID').value.
Where the latter would be rather inefficient, considering that
the same syntax can be used with IDs for ID-aware user agents.
You cannot use DOM 0 instead of DOM 1
Yes, you can.
because DOM 0 simply doesn't have an ability to address any given element
on the page.
True. Specific elements would be required, such as `input' and `textarea'
elements, and it would be best if they were children of a `form' element
then. However, `textarea' elements can be formatted with CSS so that they
look like a `p' or `div' element; only users with UAs that do not support
CSS (properly) would have to see fixed-font display and things like that.
In any case .value property appertains to form elements. DOM elements
like <p> <div> etc. do have innerHTML and nodeValue properties instead.


There is no such thing as a "DOM element". And a DOM element _object_,
representing a _markup_ element, does not need to have any of these
properties. Neither is the term "DOM" restricted to the W3C DOM, nor
does it imply support of proprietary features like `innerHTML'.
PointedEars
--
What one man can invent another can discover.
-- Sherlock Holmes in Sir Arthur Conan Doyle's
"The Adventure of the Dancing Men"
May 17 '06 #30

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

Similar topics

1
by: Liza | last post by:
Hi, I'm a novice to postgress and need to constract a simple tree. In my table I have: regionID int parentID int name char I need to do two functions: find all the children of XXX parent...
0
by: Leszek Dubiel | last post by:
----------------------------------------- BACKGROUND In my company (www.glass.biz) we use ERP software to compute what has to be done to do products for our customers. Main algorithm takes data...
55
by: Ennixo | last post by:
hi, do you know where i can find some ebooks or websites talking about C# optimisation ? for exemple, i just learned that ++i is faster than i++. i would like to know more about the things...
12
by: chadlupkes | last post by:
I've been trying to create a simple (I hope) PHP application to send emails to a membership list. I have yet to successfully connect to my database to pull the names and email addresses. I'm...
8
by: A Trujillo | last post by:
Hi group, I am looking for a simple C# editor, I would like something as simple as Notepad or GetDiz but with the highliting tool. If someone could help it would be greatly appreciated. A...
4
by: Mason Barge | last post by:
I'm learning how to build a website. So far I've gotten pretty good with HTML, CSS, and Paint Shop Pro, and I'm currenly learning the basics of Javascript. I'm hoping, eventually, to build and...
0
by: abcd | last post by:
I have web applicaiton writting in asp.net 1.1. When the first page loads it loads the data only in 2 controls. The data is poped upo by acooneting to access DSN and using ODBCConnection and...
4
by: Timmah1980 | last post by:
I'm sure this is a simple enough fix for someone out there, but I'm afraid it's beyond me! I'm putting together this simple menu for a client: http://www.timkeay.co.uk/mpc2/index.htm It...
15
by: Yew12 | last post by:
I am trying to create a simple login for my webpage, but Im a bit of a novice and cannot see where Im going wrong any help would be much appreciated. I'm using an access database and ODBC. The...
0
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
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...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
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)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
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
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.