Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Prototype - replace submit button with text in a table.

Posted on 2008-09-30
2
Medium Priority
?
1,252 Views
Last Modified: 2013-11-11
I have a table of results. One row has a submit button. Ive written code to execute a JSON call and I can easily change disable the button and change the text:

function lockButton(buttonClicked) {  // Lock button so it cannot be pressed again.
      $(buttonClicked).disable();
      $(buttonClicked).value='Processing...'; }

But, ideally Id like to replace the button with text. The button is in a cell:
$$('table#resultTable td#action_1)

Unfortunately I cannot work out the correct syntax to replace the button with text. How do I correct my problem?

Thank you for any time and help.
0
Comment
Question by:Stoke
2 Comments
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 200 total points
ID: 22603654
you can try out this

you can put one lable there with display style none..

and on this funtion

function lockButton(buttonClicked) {  // Lock button so it cannot be pressed again.
      $(buttonClicked).style.diaplay = 'none';
      $(lablenew).style.diaplay='block';

}
0
 

Author Closing Comment

by:Stoke
ID: 31501488
Brilliant! Now why didn't I think of that? That's great ---- thank you.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question