4 Replies - 2786 Views - Last Post: 10 January 2011 - 12:58 AM

#1 sumeshrktvm  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 04-January 11

changing text box to input and ouput in a web page

Posted 04 January 2011 - 11:26 PM

I am new in web programming. I created a web page having textbox and an update button. My need is to display data in the text box when page is loaded. After that when I click on the textbox it will become an input textbox and can enter data. when data entered completely, click on the update button, after that newly entered data must be displayed on the text box.
i.e same text box will be used for input and output data.

I created my web page using html. I knew that, by using ajax i can implement the above functionality. but i didn't get any idea to write the code.

can any one tell me how to write the code ?

This post has been edited by sumeshrktvm: 04 January 2011 - 11:26 PM


Is This A Good Question/Topic? 0
  • +

Replies To: changing text box to input and ouput in a web page

#2 forest51690  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 58
  • View blog
  • Posts: 340
  • Joined: 20-March 09

Re: changing text box to input and ouput in a web page

Posted 06 January 2011 - 06:14 PM

I'm confused about what you're trying to do. All textboxes are input textboxes unless explicitly disabled from user input.

So when the page loads, you want the value of the textarea to be displayed. In the textarea?, because it already is.

Any change to the textarea will remain in the textarea if you push the update button.

It seems that what you're describing is the natural function of a textarea. Is there something else? Do you want the changed value of the textarea to persist between page reloads?

This post has been edited by forest51690: 06 January 2011 - 06:15 PM

Was This Post Helpful? 0
  • +
  • -

#3 fromTheSprawl  Icon User is offline

  • Monomania
  • member icon

Reputation: 513
  • View blog
  • Posts: 2,063
  • Joined: 28-December 10

Re: changing text box to input and ouput in a web page

Posted 07 January 2011 - 12:44 AM

I think he gets the data from a database, but it's not clear how he can choose what data to show when the page loads.

Please thread starter could you elaborate more on your problem?
Was This Post Helpful? 0
  • +
  • -

#4 Guest_sumeshrktvm*


Reputation:

Re: changing text box to input and ouput in a web page

Posted 10 January 2011 - 12:55 AM

View Postforest51690, on 06 January 2011 - 05:14 PM, said:

I'm confused about what you're trying to do. All textboxes are input textboxes unless explicitly disabled from user input.

So when the page loads, you want the value of the textarea to be displayed. In the textarea?, because it already is.

Any change to the textarea will remain in the textarea if you push the update button.

It seems that what you're describing is the natural function of a textarea. Is there something else? Do you want the changed value of the textarea to persist between page reloads?




My need is,
Consider there is a text box named "textbox1". when data is entered into textbox1 and click the submit button, the data is send to the server and saves there in an EPROM chip. On submitting the form, the page reloads. On reloading, the data that is previously saved in the server mus be read and display it into textbox1.

Upto now I can submit the entered data to the server and can read it back and displayed it in table. I write AJAX code to request the data from the server and to display it in the table.It works fine, when the page reloads after submitting the form or after submit button is clicked.

But I didn't get any idea to display the data from server to textbox when page reloads.
Was This Post Helpful? 0

#5 sumeshrktvm  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 04-January 11

Re: changing text box to input and ouput in a web page

Posted 10 January 2011 - 12:58 AM

View PostfromTheSprawl, on 06 January 2011 - 11:44 PM, said:

I think he gets the data from a database, but it's not clear how he can choose what data to show when the page loads.

Please thread starter could you elaborate more on your problem?



My need is,
Consider there is a text box named "textbox1". when data is entered into textbox1 and click the submit button, the data is send to the server and saves there in an EPROM chip. On submitting the form, the page reloads. On reloading, the data that is previously saved in the server must be read and display it into textbox1.

Upto now I can submit the entered data to the server and can read it back and displayed it in table. I write AJAX code to request the data from the server and to display it in the table.It works fine, when the page reloads after submitting the form or after submit button is clicked.

But I didn't get any idea about how to display the data from server to textbox when page reloads.

This post has been edited by sumeshrktvm: 10 January 2011 - 12:59 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1