I have three text boxes on my web page to enter simple text messages of three types. The messages entered are displayed to user in 3 different display boxes(i.e. text boxes) on same page.
User can freely enter message into first two text boxes but to enter a message into 3rd text box, she needs to add a reference in the message to any message that is already displayed in any one of the first two display boxes. So that it could help to see a message of type 3 is linked/reply to which message of type 1 or 2.
I need help in how could I make a reference structure here.What could be a reference & how it could be used. There is nothing especial about messages, they are only pieces of simple text.
As an idea; I have all the messages saved into database & all have a key. I am thinking like e.g. contents of a message(type 3) could be '@msgXXX: this message is referring to msgXXX':
it means 开发者_运维知识库that this message is referring to some msgXXX(it is key). It is just an idea I put here as an example to help understand the things.
The reference itself is pretty simple; you just want a type of string that the user wouldn't enter on his own. Your example is fine, as most people don't use the word construct "@field1" in normal writing.
精彩评论