Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Log in system: Hide or get html from JS?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #179329
    webliz
    Participant

    I have made a log in system witch redercting with javascript($.submit and $.ajax). All html codes are defined in the source code. The problem is the html elements for logged in are always avaible, but not the sensitive content of course.

    I use json to to get values for log in. Is it right to grab the html code from json, when you have successfully logged in? The problem with this is override the html code in javascript that is not so nice code. What should I do? Sorry for bad english

    #179374
    __
    Participant

    Is it right to grab the html code from json, when you have successfully logged in?

    Is javascript deciding if the user is logged in? or does it have to ask the server, and the server decides?

    All html codes are defined in the source code. The problem is the html elements for logged in are always avaible, but not the sensitive content of course.

    I might be misunderstanding you, but this sounds like your “sensitive” content is always on the webpage, but hidden until revealed with javascript. If this is the case, then it doesn’t matter how you handle login/authentication, because the content is already available.

    If you need more help with this, you’d probably need to show us the code in question.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.