Hi,
I am new to prototype.js and appreciate it a lot.
One simple thing however seems to be impossible? I have a <tdelement
which I want to fill with
- an input field
- text
- another input field
at one step.
i.e.
td = ... (simply the <tdelement)
in1 = new Element('input', ...)
in2 = new Element('input', ...)
Now none of these works: (because in some cases, the element itself is
printed, not its content)
td.update(in1).update(td.innerHTML + 'bla').update(td.innerHTML + in2)
td.update(in1 + 'bla' + in2)
td.update(in1.innerHTML + 'bla' + in2.innerHTML)
....so what *does* it?
(or simply: how do I get the content of a new, not-yet-written,
element?)
Thx!
*************
Marty - it's perfect! You're just not thinking fourth dimensionally!
[Emmett "Doc" Brown]
If you wish to email me, please use newsreply at wuwei minus webservices dot de 4 1665
Hi Marty,
If you are using script.aculo.us, try checking out Builder.node and
Builder.build. Using Builder.node
you can do things like:
var td = Builder.node ('td', {style: '...'},
[Builder.node('input', ...), Builder.node('input',...), 'some plain
text, etc.']);
and Builder.build can even acccept entire xhtml fragments.
On Jun 4, 10:14*am, Daniel Loose <gruenwiesl...@web.dewrote:
Hi,
I am new to prototype.js and appreciate it a lot.
One simple thing however seems to be impossible? I have a <tdelement
which I want to fill with
- an input field
- text
- another input field
at one step.
i.e.
td = ... (simply the <tdelement)
in1 = new Element('input', ...)
in2 = new Element('input', ...)
Now none of these works: (because in some cases, the element itself is
printed, not its content)
td.update(in1).update(td.innerHTML + 'bla').update(td.innerHTML + in2)
td.update(in1 + 'bla' + in2)
td.update(in1.innerHTML + 'bla' + in2.innerHTML)
...so what *does* it?
(or simply: how do I get the content of a new, not-yet-written,
element?)
Thx!
*************
Marty - it's perfect! You're just not thinking fourth dimensionally!
[Emmett "Doc" Brown]
If you wish to email me, please use newsreply at wuwei minus webservices dot de
On Jun 4, 7:14 am, Daniel Loose <gruenwiesl...@web.dewrote:
>
One simple thing however seems to be impossible? I have a <tdelement
which I want to fill with
- an input field
- text
- another input field
at one step.
What is wrong with innerHTML?
Thx!
Daniel Loose wrote:
I am new to prototype.js and appreciate it a lot.
I am not and I do not. Exactly because you are new to it you are in no
position to assess its quality. Prototype.js is considered junk around here.
One simple thing however seems to be impossible? I have a <tdelement
which I want to fill with
- an input field
- text
- another input field
at one step.
i.e.
td = ... (simply the <tdelement)
in1 = new Element('input', ...)
in2 = new Element('input', ...)
The declaration for the Element constructor would overwrite the object built
into Gecko-based UAs. At least it would attempt to, we are talking host
objects here.
Now none of these works: (because in some cases, the element itself is
printed, not its content)
td.update(in1).update(td.innerHTML + 'bla').update(td.innerHTML + in2)
td.update(in1 + 'bla' + in2)
td.update(in1.innerHTML + 'bla' + in2.innerHTML)
...so what *does* it?
(or simply: how do I get the content of a new, not-yet-written,
element?)
A new element does not yet have content. `input' elements in particular
always have EMPTY content, or no content at all if you will.
[...]
If you wish to email me, please use newsreply at wuwei minus webservices dot de
There is the Reply-To header for this.
PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: pb648174 |
last post by:
I have a single update statement that updates the same column multiple
times in the same update statement. Basically i have a column that
looks like .1.2.3.4. which are id references that need to...
|
by: Jason Keirstead |
last post by:
Is there a way I can add a setter/getter to the HTMLElement prototype
in internet explorer?
This, for example, works fine in Mozilla:
HTMLElement.prototype.__defineSetter__("foobar", function...
|
by: petermichaux |
last post by:
Hi,
I've been reading the recent posts and older archives of
comp.lang.javascript and am surprised by the sentiments expressed about
the prototype.js library for a few reasons:
1) The library...
|
by: bigdadro |
last post by:
I've created a new class using prototype.js. After I make the
ajax.request all references to this.myClassMethodorVariable are lost.
Does the ajax method blow out the object persistance? I'm fairly...
|
by: hardrock |
last post by:
Hello!
I'm working with the prototype library version 1.4.0 and having a
strange error lately. When I want to make an Ajax.Updater call, it
basically works. But as soon as I put the call into...
|
by: Steve-O |
last post by:
The following code works great in FireFox, Opera, Netscape, Safari, and
Gecko, but NOT IE. Why?
I tried using 'native' js with setInterval and setTimeout, but I get
the same result. My IE...
|
by: MORALBAROMETER |
last post by:
Hi all,
I want to update MULTIPLE elements of an HTML page using Ajax. for
this reason i my response is an xml document. I want to use XSL at the
client side to update these elements. How can i...
|
by: cbare |
last post by:
Hello JS Gurus,
One thing I haven't figured out about javascript is the treatment of
__proto__.
Inheritence, whether prototypes or class-based, is just a shorthand
form of delegation (leaving...
|
by: hotflash |
last post by:
Hi Master CroCrew,
I found a good PURE ASP that will allow you to upload 10MB file to the server and the file contents such as Network, Author, Title, etc... will insert to MS Access at the same...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
| |