473,804 Members | 3,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

make select, better DOM or innerhtml

for make on-fly some box te3xt and select,
(select that will be use for to choose datas)
is better to use Dom or innerhtml?
Jun 24 '07 #1
2 1587
ASM
artev a écrit :
for make on-fly some box te3xt and select,
(select that will be use for to choose datas)
is better to use Dom or innerhtml?
http://stephane.moriaux.perso.wanado...nerHTML_danger

--
Stephane Moriaux et son (moins) vieux Mac
Stephane Moriaux and his (less) old Mac already out of date
Jun 24 '07 #2
On Jun 24, 3:23 pm, ASM <stephanemoriau x.NoAd...@wanad oo.fr.invalid>
wrote:
artev a écrit :
for make on-fly some box te3xt and select,
(select that will be use for to choose datas)
is better to use Dom or innerhtml?

http://stephane.moriaux.perso.wanado...nerHTML_danger

--
Stephane Moriaux et son (moins) vieux Mac
Stephane Moriaux and his (less) old Mac already out of date
It depends on how much you're going to develop your application, how
much it is going to be based on javascript and how much you worry
about speed issues.
If you want to make a clean object oriented application, than you'll
better start with DOM instead of constructing strings for innerHTML.
That way it will be more extensible and readable. However, innerHTML
is said to be faster than DOM - haven't tested it, but heard about it
several times. I myself use innerHTML as little as possible, but as I
said - it depends on your needs.

Jun 24 '07 #3

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

Similar topics

5
35149
by: cedawe | last post by:
I have two select boxes. When the user picks a value in the first one it completely re-populates the second one. It works fine, but only generates a standard OPTIONS list and I now want to group the options using OPTGROUPs. <select name="Selector1" size="1" onchange="reload2(this.options.selectedIndex, document.Form1.Selector2)"> <option ..... </select>
3
1908
by: foldface | last post by:
Hi This works but is a bit long-winded. Is there a better way? ta F <style> ..Header { background-color: gray;
4
8641
by: Michael Schuerig | last post by:
I'm trying to change the options of a select element by setting its innerHTML. Here's a demo case: <html> <head> <script language="javascript" type="text/javascript"> function addOpts() { var s = document.getElementById("s"); s.innerHTML = '<option>Opt1</option><option>Opt2</option>'; }
3
1515
by: Ayrton | last post by:
I need to have tooltips in a select list (or combo ), are there some examples ? -- Questa è una firma automatica di MesNews. Sito: http://www.mesnews.net
1
5025
by: Jan Doggen | last post by:
Hello all, I have a SELECT like this (the 'alert()s are temporary): <FORM method="POST" action="/scripts/runisa.dll?OVB2.132964:PGSPLITVACAFMELDEN:1095144287.9159" id="hulpform" name="hulpform"> <select name="varVervuld" id="varVervuld" onChange="alert('Onchange');Vervuld(this.options);"> <option value="0" selected="selected">&nbsp;</option> <option value=JA>Ja</option>
10
2261
by: mjpdatadev | last post by:
I am relatively new to XMLRequest, DOM and Ajax but I really like the functionality. I have the DIV and SPAN changes working well but I thought that I would experiment with changing the actual innerHTML of each control rather than changing the whole control inside of a DIV. What I tried was this: Create a <SELECTso... <SELECT id=MyComboBox> <OPTION>opt1</OPTION>
1
326
by: artev | last post by:
for make on-fly some box text and select, (select that will be use for to make on-fly at click others text ) and box text, where the values can to be used in others area of the code. is better to use Dom or innerhtml?
8
1095
by: andersond | last post by:
I have a form with several questions whose answers are chosen from select object. Some work and some don't. Here's an example This works: var y = document.getElementById('coverageDesired'); var z = y.options.value; if(z=="Property ONLY"){ document.getElementById('cellOutput05').innerHTML="Property coverage only"; } else if(z=="Liability ONLY"){ document.getElementById('cellOutput05').innerHTML="Liability coverage only";
0
9588
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10589
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10085
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7625
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3828
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.