Hi,
Here's my form - it's still work in progress, but I got stuck with the Remove Item option. http://www.steinrogan.com/SecureSite..._category.html
Here's my dilemma:
As long as I don't remove the very first Item, everything works as expected, i.e. I can add Dependant Items. But if I remove the first Item and add a Another Item, then the "Add a Dependant Item" button will not work.
Any ideas?
Thank you!
Csanád
8 1060
Heya, Csanád.
Works great in Safari!
Instead of trying to dynamically create all those nodes, try cloning a template: -
<div id="dolly" style="display:none;">
-
.
-
.
-
.
-
</div>
-
-
function createNode($i)
-
{
-
var $newNode = document.getElementById('dolly').cloneNode(true);
-
$newNode.id = 'Element_' + $i;
-
$newNode.style.display = '';
-
-
document.forms[0].appendChild($newNode);
-
}
-
You can clone and remove to your heart's content, and as long as your 'dolly' (get it?) is originally coded outside the main form, it will not be submitted with the form.
Hello again :)
Here's my form:
http://www.steinrogan.com/SecureSite_v2_beta/new_category.html
Please do the following:
1. Add about 9 more New Items by clicking on the Add Another Item.
2. Go back to Item[1] and start removing the Item[1]. (Renumbering the following Items in the list is being done automatically, so for example, if you remove Item[2] from a list that has 4 Items, Item[3] and Item[4] will become Item[2] and Item[3], respectively.) Keep removing Item[1] and observe how the space between Category Name and Item[1] gets bigger.
3. Try to find and answer and please let me know. :)
Thank you!
Csanád
Heya Pbmods,
For some reason cloning does not work for me. God knows I tried! After 3-4 hours of pain, I gave up and went with creating the nodes dynamically.
Everything works except for one thing. I posted a new thread in case you're interested. Subject: "Funky Remove - Take 2."
Thanks for your help!
Csanád
Found it! :)
There was an extra <br> sibling hangin' there after removing its previous sibling, i.e. the Item that was being removed.
Cheers!
Csanád
Heya, Csanád.
Glad to hear you got it working! Good luck with your project, and if you ever need anything, post back anytime :)
Heya, Csanád.
Were you able to fix the remove problem then?
Heya Pbmods,
Yes. I fixed it. Thanks for asking though!
Cheers,
Csanád
Heya, Csanád.
Glad to hear you got it working! Good luck with your project, and if you ever need anything, post back anytime :)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Jonas Galvez |
last post by:
Hi, I need a function to parse badly encoded 'Subject' headers from
e-mails, such as the following:
=?ISO-8859-1?Q?Murilo_Corr=EAa?=
=?ISO-8859-1?Q?Marcos_Mendon=E7a?=
I tried using the...
|
by: gene.ellis |
last post by:
Put simply, I have a text box, and people commonly cut + paste
information into this text box from Microsoft word. The problem is that
word has all types of funky characters (smart quotes,...
|
by: Arne Claus |
last post by:
Hi
If've just read, that remove() on a list does not actually remove the
elements, but places them at the end of the list (according to TC++STL
by Josuttis). It also says, that remove returns a...
|
by: Tracy |
last post by:
Just recently have I noticed that when we run our production application it
is adding some funky directory to the address, (fwuhjo45ohmpj35552vwim55),
which doesn't exist but it still works. This...
|
by: comp.lang.php |
last post by:
I have a textarea where people can cut & paste their resume.
Unfortunately they often cut & paste their Word resume into the
textarea, funky characters and all.
This causes the display to be...
|
by: Niyazi |
last post by:
Hi all,
I have a dataTable that contains nearly 38400 rows.
In the dataTable consist of 3 column.
column 1 Name: MUHNO
column 2 Name: HESNO
Column 3 Name: BALANCE
Let me give you some...
|
by: Russell Warren |
last post by:
I've got a case where I'm seeing text files that are either all null
characters, or are trailed with nulls due to interrupted file access
resulting from an electrical power interruption on the...
|
by: dmh_test1 |
last post by:
I have a view created in an adp which calls a UDF, also written in the
adp, which simply contatenates some varchar fields based on some
business logic and returns a varchar(50). The view looks...
|
by: Csanád |
last post by:
Hello again :)
Here's my form:
http://www.steinrogan.com/SecureSite_v2_beta/new_category.html
Please do the following:
1. Add about 9 more New Items by clicking on the Add Another Item.
|
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: 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: 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...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
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: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
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: 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...
| |