• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hidden large text field?

 
Rob Lynn
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying new things and am not sure what is doable. I want to allow the user to edit an outline in an html page and use javascript to make the changes. Then I want to grab the outline (which right now is implemented using embedded lists) and send the whole thing to the back end to parse and put into the database. 1. Can I do this by having a hidden field in the form which I can then pass to the database or is there a size limit on these fields? Or can I just assign a large amount of text to a request parameter/is there a size limit there? 2. My numbering system really should be 1, 1.1, 1.1.1, 1.1.2, etc. - is there a way to implement this (either with or without lists?)

Thanks!
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can set a textarea's style to hidden and keep track of the changes in that. I am assuming the user or program is entering the 1, 1.1, 1.1.1, 1.1.2 etc. We could easily take the innerHTML of a div and strip all of the html formatting to get this information. It really depends how you have it set up.

Eric
 
Rob Lynn
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the quick response! Actually, the numbers are generated automatically. Right now I'm making do with just the final digit because when I select an item, I only want to select the text and not the number. However, I may have to change the way I'm doing things to display the entire number string.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are not grabbing all of the nodes, then you can just use a plain old hidden field. Makes life easier. I am actually implementing something similiar at work right now. Inmy case I am taking a third party .NET tree component and manipulating the nodes that the user selects. I place the selected text into a textbox and submit it to another page.

Have you been able to select the node and obtain the text?

Eric
 
Rob Lynn
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I can select the node and get the text/attributes I need. My biggest problem so far is the numbering.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic