You need to learn more JSL basics. The script you have uses the Dialog() function which is deprecated and difficult to use except for very simple dialogs. Also the display names are not unique (ambiguous). Below is the output of your current script as shown in the Log window. It would take a lot of scripting to get the results.
List( 9 elements ) assigned.
//:*/
dlg1
/*:
{name1 = "george", Spacer, name2 = "james", name1 = "harry", Spacer, name2 = "bloe",
Assign( add ), Assign( del ), Button( 1 )}
There are mutiple methods to meet your request. One is to create a display with the maximum number of entries and make them invisible until the Add button is pushed. I attached a script, but unless you spend time learning more JSL, you will not be able to maintain it (that is it will break). This script uses expressions for the Add, Delete and Ok buttons. It uses dynamic naming of the display boxes versus Set functions.