Douglas Crockford wrote:[color=blue][color=green]
>> 1. I have seen unicode being mentioned in my javascript pocket book -
>> is this the same as ascii codes? I think not though I'm not sure and I
>> can't find any examples...[/color]
>
>
> ASCII is a subset of Unicode. Buy a better book.
>[color=green]
>> 2. How do I read/set a string to an unprintable code? For example,
>> how can I set the variable a to equal the equivalent of ascii code 7
>> or 8 or whatever...
>>
>> Why? I am working on an application which allows the user to enter in
>> multiple names - I want to store these multiple names in a hidden text
>> box using a none-printable character as a field seperate for each
>> input text field value. I know 100% that my keyboard entries will be
>> ascii/qwerty.
>>
>> Can someone steer me in the right direction?[/color]
>
>
> Yeah. Don't do it. No security is obtained from such ridiculous methods.
> The list of names must be kept on the server, never in the client.
>
>
http://www.crockford.com/javascript/survey.html[/color]
Ah! I've just realised that you have have also mis-understood my second
question... I do not want to have the names written as part of the
javascript... this I would agree, would be silly...
I have a form - it has INPUT tags asking for firstname and lastname.
I also have a hidden input box.
When the user enters a firstname and lastname, I have an onClick
function which takes the input from the firstname/lastname box, and
writes it to the hidden input box. I want this so as the client can
enter several names all at once without having to post the form each
time. Once they have finished inputing the names, the user clicks on a
submit button which then passes the hidden input box to my php based server.
In order for my php script to read the input, I want the hidden text box
to have a fixed format - thus, for example, firstname is always followed
by ascii character 8 followed by lastname. I can then easily unpack
this long string on the server side.
Thus - can you tell me how I can set a variable called fs equal to ascii
character 8? Or even unicode character 8? (It doesn't have to be 8 - but
something not readily available from qwerty keyboard input)
Thanks
Randell D.