how to validate {username:'rahul',password:'123'}

Discussion in 'Javascript' started by Rahul Mehta, Jul 31, 2010.

  1. Rahul Mehta

    Rahul Mehta Guest

    {username:'rahul',password:'123'}

    on alert it gives object ,
    how can i validate this type of object ...

    please help ASAP

    thanks

    rahul
    Rahul Mehta, Jul 31, 2010
    #1
    1. Advertising

  2. On 31/07/10 08:18, Rahul Mehta wrote:
    > {username:'rahul',password:'123'}
    >
    > on alert it gives object ,
    > how can i validate this type of object ...


    so you are doing what?

    <script type='text/javascript'>
    ob = eval({username:'rahul',password:'123'});
    alert (ob.username + "\n" + ob.password);
    </script>

    Works for me!

    Rgds

    Denis McMahon
    Denis McMahon, Jul 31, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eddy Soeparmin

    Phone Format (770) 123-1234

    Eddy Soeparmin, Jul 28, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    3,178
    Swanand Mokashi
    Jul 28, 2003
  2. Jeremy Sanders

    Python 123 introduction

    Jeremy Sanders, Oct 30, 2006, in forum: Python
    Replies:
    7
    Views:
    263
    Bruno Desthuilliers
    Oct 31, 2006
  3. Ronald S. Cook

    Can I pass a parameter without using ?value=123

    Ronald S. Cook, May 1, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    424
    Page Brooks
    May 2, 2007
  4. AAaron123
    Replies:
    2
    Views:
    2,102
    AAaron123
    Jan 16, 2009
  5. AAaron123
    Replies:
    1
    Views:
    1,319
    Oriane
    Jan 16, 2009
Loading...

Share This Page