Hi,
I use the following code to create a couple of input fields at run-time. It works fine in Firefox but it doesn't do anything in Internet Explorer and no errors are given. The DOM created elements are appended to a div called appendTo. -
var className = "";
-
-
if( window.ActiveXObject )
-
className = "className";
-
else
-
className = "class";
-
-
var row = document.createElement( "tr" );
-
-
var column = document.createElement( "td" );
-
column.setAttribute( "height", "25" );
-
column.setAttribute( "valign", "middle" );
-
column.setAttribute( "width", "430" );
-
column.setAttribute( className, "body_text_11_bold" );
-
-
var text = document.createTextNode( "Break out page link index" );
-
column.appendChild( text );
-
row.appendChild( column );
-
document.getElementById( 'appendTo' ).appendChild( row );
-
-
row = document.createElement( "tr" );
-
-
column = document.createElement( "td" );
-
column.setAttribute( "height", "25" );
-
column.setAttribute( "valign", "middle" );
-
column.setAttribute( "width", "430" );
-
-
var input = document.createElement( "input" );
-
input.setAttribute( "id", "breakOutIndex" );
-
input.setAttribute( "name", "breakOutIndex" );
-
input.setAttribute( className, "formDrop" );
-
input.setAttribute( "type", "text" );
-
-
column.appendChild( input );
-
row.appendChild( column );
-
document.getElementById( 'appendTo' ).appendChild( row );
-
-
row = document.createElement( "tr" );
-
-
column = document.createElement( "td" );
-
column.setAttribute( "height", "25" );
-
column.setAttribute( "valign", "middle" );
-
column.setAttribute( "width", "430" );
-
column.setAttribute( className, "body_text_11_bold" );
-
-
text = document.createTextNode( "Break out page menu text" );
-
-
column.appendChild( text );
-
row.appendChild( column );
-
document.getElementById( 'appendTo' ).appendChild( row );
-
-
row = document.createElement( "tr" );
-
-
column = document.createElement( "td" );
-
column.setAttribute( "height", "25" );
-
column.setAttribute( "valign", "middle" );
-
column.setAttribute( "width", "430" );
-
-
input = document.createElement( "input" );
-
input.setAttribute( "id", "breakOutMenu" );
-
input.setAttribute( "name", "breakOutMenu" );
-
input.setAttribute( className, "formDrop" );
-
input.setAttribute( "type", "text" );
-
-
column.appendChild( input );
-
row.appendChild( column );
-
document.getElementById( 'appendTo' ).appendChild( row );
-
Thanks,
Sean
1 3684 acoder 16,027
Recognized Expert Moderator MVP
Do you have a tbody tag? IE requires the tr elements to be appended to the tbody.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Gowhera Hussain |
last post by:
Use This for Learning Only ....
Do Not Try To Act Smart
HACKING WITH JAVASCRIPT
Dr_aMado Sun, 11 Apr 2004 16:40:13 UTC
This tutorial is an overview of how javascript can be used to bypass
simple/advanced html forms and how it can be used to override cookie/session
|
by: Sue |
last post by:
After finishing up my first quarter JavaScript on 12/12/03, I decided
to improve character checking on my project. In my project I only had
to do very basic validation. Therefore, I only had one function to
verify the name fields, age, email and gender.
My question is: if I create a function for each field like the code
below, what would be the best way to organize the functions and call
them? Would I need one main function and place...
|
by: dmiller23462 |
last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript
but my end result is I need two text boxes to stay hidden until a
particular option is selected....I've cobbled together the JavaScript
in this code from a couple different sites but I'm not 100% sure what
each line is doing...This is the ASP code that I'm using for the
page....Take a look at the JavaScript code and please let me know what
each line is doing....I have been...
|
by: John Boy |
last post by:
Hi,
Can anyone help. This is really doing my nut in. 3 years ASP exp. and
now doing .DOT which is a step in the wrong direction.
Basically I am left with the code of a guy who has left. When I click a
button on a pop-up window the javascript for that button click does a
'button.form.submit'. On the Server side there is a Button click event
for this button, but for some reason it no longer fires. It worked fine
before and everything...
|
by: Good Man |
last post by:
Hi
This is sort of a weird question, perhaps a bit off-topic...
I am on the 'edit' screen of a web form, and I have a bunch of variables
coming from a database that need to be placed into the form. In the
past, I have been using PHP to pre-populate each field, something like
<input type="text" id="firstName" value="<?= $first_name ?>" />
| |
by: kenny8787 |
last post by:
Hi, can anyone help here?
I have the following code generated from a database, I want to have javascript calculate the
costs of the selected items using radio buttons, subtotal the costs and grandtotal the costs
ready for the selected items to be inserted back to the database. I did something like this
before with Checkboxes, but Radio button have to be named the same to maintain their
groupings.
|
by: Asterbing |
last post by:
Already posted in comp.lang.javascript but not found any solution :-(
--
Hi all,
Don't know where to ask my question because the way to go is included in
the possible answer itself by nature... You'll understand better below :
Well, I have an HTML page containing a form in which an options group
provides two ways to submit content of a file :
|
by: anniefs |
last post by:
hi
help me i m so much stuck int he code and i have no time ....
i used ASP VBscipt and javascript functions with MS database
javascript function add records in MS DB by using ASP vbscript recordset varible
when user click the save button then some values save in the database so i write javascript function to add the records...
here is the code
|
by: zac540 |
last post by:
Hey everyone!
First of all I'd like to say that I did my best to look for any other relevant posts. The best I found was this interesting thread.. http://bytes.com/forum/thread594982.html
If it answered my question I am just to stupid to realize it I would like to apologize in advance. This is my very first attempt at using Javascript so any help at all is greatly appreciated. I read the W3Schools Tutorial on Javascript so that and some...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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...
| |
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
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();...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |