Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to read all text of different input type from textarea?  RSS feed

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I am designing a web application which has blog writing features like user can insert image,text,files at any place.

I have designed its UI problem I am facing is getting those value in server side and store them in same sequenance as they entered in textarea.

suppose In case information is in this order
video
text
image
text
text

so then I need to store that data in same order for further processing to create JSON

and same for others

How can I solve this?

 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

It sounds like you want to grab all of the inputs in a single Form submit - but there is no obvious way to carry the order of entry.

Seems to me you need to make each entry of an input item a separate request/response cycle.

This would have the advantage of letting you check each entry separately for validity.

Also, each time you regenerate the entry form you can show all the items that have been accepted so far - good user feedback.

Bill

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but I want to generate a JSON from blog source data How can I do that?

blog can anchor and any html tag between text.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would say the first step is developing code to accept and validate the various input types separately.

Next test code to generate JSON for each type in a separate page.

Only try to combine when you have mastered the separate types.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!