xenoslash's Profile User Rating: -----

Reputation: 3 Apprentice
Active Members
Active Posts:
89 (0.05 per day)
19-August 09
Profile Views:
Last Active:
User is offline Sep 21 2012 09:26 PM

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:

Latest Visitors


Posts I've Made

  1. In Topic: Should disabling form elements be done server side or client side?

    Posted 16 Aug 2012

    Thanks for the quick reply!
    Hmm.. so there is no avoiding the repetitions huh. I wish there is a way for server side code to access the previously created dom elements like jquery does.

    And.. about your first comment, I now have another question :P
    When dealing with security stuff, is it common to do checks in two steps?
    1. in UI, disable some elements to tell user that they're not supposed to be changing stuff.
    2. in server side code, don't trust the information passed on to you from server side code, and always reauthenticate. (I said 're' because the first authentication is done when the UI is first served to the user.)
  2. In Topic: Accessing the same java object upon button click

    Posted 19 Jul 2012

    Oh wow. I feel so spoilt now haha. Thanks for the thorough explanation.

    So from what I gather, there seems to be 2 solutions:
    1. Serialize Monster java object using something like JSON, and do everything in javascript.
    2. Use ajax to pass along information needed to reconstruct the new Monster, then .php (or .jsp in my case) will construct a new Monster object, and call .levelup() on it.

    Sigh.. maybe I should have used a more relevant example.
    So in a monster-less land, I have this java object which talks to a database. Let's call it client

    2 methods:
    1. Client(String dbName) --constructor
    2. void submitnewcontent(string new stuff)

    in the .jsp file, I have a Client object instantiated.
    <% Client c = new Client("mydb"); %>
    now everytime the button is clicked, I want to call c.submitnewcontent("hiii");

    In this case, the only solution I could think of is to make an ajax call to handleNewContent.jsp, and pass along "mydb" and "hiii"

    then handleNewContent.jsp would have to reconstruct Client again, before calling submitNewContent("hii");
    This doesn't seem like a good solution since reconstructing Client might be expensive (connecting to db, and what not).
    And from your explanation (which was clear), it's not possible for me to make a call on submitNewContent on the same Client instantiation ('c') for every button click.

    So.. have people always been reconstructing java object when they want to mutate/do stuff with it upon button clicks?
  3. In Topic: Accessing POST variables in Javascript

    Posted 18 Jul 2012

    No no, I appreciate the fact that you were trying to help :). Just try to provide a more relevant answer next time.
    But anyways, I decided to merge everything into one page. I guess I can afford to cram the information into one page, and use an expand/collapse trick to make all the information look organized. Thanks a lot for providing several alternatives, Atli!
  4. In Topic: Accessing POST variables in Javascript

    Posted 11 Jul 2012

    Ah that's another interesting approach, but I don't think I'm going to use cookies.
    After discussing it with my friend, a more generic statement of my problem is,
    "the same one JSON object is needed in the two different html pages
    and both pages need to use javascript to create dynamic content based on that JSON (the book)"
    I think another solution is to pass the parameters needed to generate that JSON through GET. Then do a second generate of the book in bookdisplayerfunctions.js.
    Still not a good solution, and this made me pretty sure that this is a problem with my design.
  5. In Topic: Accessing POST variables in Javascript

    Posted 10 Jul 2012

    Yeah, that's what I gathered from googling around too :(.
    bookdisplayer.html has the functionality to go to next page, or go to the previous page (of the book object) upon button clicks. I have a javascript file to handle those button clicks, but I need the json string in the POST variable (the book object).
    How did other people/big websites get around this problem? Or maybe the problem is that there should never be a need for a client-side language to access a POST variable?

    And thanks for the clear explanation :)

My Information

Member Title:
D.I.C Head
20 years old
December 23, 1993
Logic puzzles, rubik's cube, tetris, badminton, and pgo.. uh. pgomarring?
Full Name:
triste voile
Years Programming:
Programming Languages:
Java, C++, C#

Contact Information

Website URL:
Website URL  http://xenoslash.webng.com


xenoslash hasn't added any friends yet.


xenoslash has no profile comments yet. Why not say hello?