Hello:
The dialog created by InputString[] is from before the days that Dynamic[] was implemented in Mathematica. It probably does not play particularly well with the new kids.
However, there should be a way to do what you want using InputField[] instead. Many of the dialogs within Mathematica are just Mathematica notebooks implemented in this way. Examples include the dialogs from File->'Install...' and Edit->'Preferences...'. The following is a bit crude but it is essentially an approximation of what InputString[] would look like if implemented using InputField[], with the yellowing showing that you can still access the notebook after the value has been entered:
Block[{anumber},
DynamicModule[{holder = "", running = True},
notebook =
CreateDocument[
ExpressionCell[
EventHandler[
InputField[Dynamic[holder],
String], {"ReturnKeyDown" :> (running = False)}]],
WindowSize -> {400, 100}];
SelectionMove[notebook, Before, Notebook];
SelectionMove[notebook, Next, Cell];
SelectionMove[notebook, After, CellContents];
SelectionMove[notebook, Previous, Character];
SelectionMove[notebook, Previous, Character];
While[And[running, "" === holder], Pause[.1]];
anumber = holder;
SetOptions[notebook, Background -> Yellow];
Pause[1];
NotebookClose[notebook];
];
anumber^2
]
Also, there is the possibility of using
InputField[Dynamic[holder], Number]
instead of
InputField[Dynamic[holder], String]
which would guarantee that you were making the square of a number instead of a string.
I am sure that this does not answer all of your questions, but hopefully it will allow you to create a novel new set of them.