wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Hidden large text field? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Hidden large text field?" Watch "Hidden large text field?" New topic
Author

Hidden large text field?

Rob Lynn
Greenhorn

Joined: Jun 27, 2005
Posts: 28
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Jun 27, 2005
Posts: 28
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Jun 27, 2005
Posts: 28
Yes, I can select the node and get the text/attributes I need. My biggest problem so far is the numbering.
 
Consider Paul's rocket mass heater.
 
subject: Hidden large text field?