www.webdeveloper.com
Results 1 to 3 of 3

Thread: A simple logic problem...help pls..urgent

  1. #1
    Join Date
    Jan 2004
    Posts
    22

    A simple logic problem...help pls..urgent

    I want to write a simple logic to check whether someone has logged in or not...the screenname will return empty or undefined..if the person is not signed on before....so, now...I have to request for sign on()...now i get the screenname....if i get the screenname, i want my code to go to GetList() function. How do i do that? i know my code is little messy....please help...please let me know, if u need more details.

    function Test()
    {
    if((screenname=="undefined")||(screenname==""))
    {
    window.external.Container.SignOn();
    window.alert(g_oAAMObject.currentState);
    screenname=g_oAAMObject.screenName;
    if(g_oAAMObject.currentState=="signed_on")
    {
    //window.alert(g_oAAMObject.currentState);
    screenname = window.external.Container.GetBrowserSN();
    GetList();
    }
    }else
    {
    screenname = window.external.Container.GetBrowserSN();;
    GetList();
    }
    }

    function GetList()
    {
    Some big function coding....
    }

  2. #2
    Join Date
    Dec 2002
    Location
    Taiwan
    Posts
    1,297
    I think you should really be doing this server-side with ASP.Net or PHP or something... JavaScript should pretty much only be used to simplify things for the user, like validating form fields before form submission, hiding unneeded form fields, et cetera. If your page relies on JavaScript to be displayed properly that usually isn't a good thing.
    The Web Standards Project Build accessible standard compliant websites, please!
    Browse Happy Don't forget to support the browsers with standard compliance

  3. #3
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    It is a good habbit to double the javascript validate code with a server-side similar validate filter. User may have disable his javascript or he may try to overpass the javascript codes for malicious purposes.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles