I'm writing a tool that mimics a command line console... it uses JavaScript on the client side along with a bit of AJAX.
The cursor sits inside an input (type="text") element waiting for commands to be typed. This box has a prompt inside it:
Code: Select all
<input type="text" name="foo" value="prompt> " onkeyup="checkCommand()" />I'm very aware that there are better ways to place the prompt there (use a div or span) but this just means that the styling and spacing will be consitent with the rest of the app... I'll change it if there really isn't a way to do this.
Anyone got any bright ideas?