Click here to Skip to main content
15,073,344 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: i have been learning javascript for a long time now but still dont know what to build Pin
SeeSharp226-Jul-21 8:51
MemberSeeSharp226-Jul-21 8:51 
AnswerRe: i have been learning javascript for a long time now but still dont know what to build Pin
Bohdan Stupak30-Jul-21 4:10
professionalBohdan Stupak30-Jul-21 4:10 
AnswerRe: i have been learning javascript for a long time now but still dont know what to build Pin
Mate Peric5-Aug-21 14:35
MemberMate Peric5-Aug-21 14:35 
Questionwhat to study after javascript? Pin
E-FANIE Rh19-Jul-21 9:16
MemberE-FANIE Rh19-Jul-21 9:16 
AnswerRe: what to study after javascript? Pin
SeeSharp219-Jul-21 9:44
MemberSeeSharp219-Jul-21 9:44 
GeneralRe: what to study after javascript? Pin
Miguel Santico21-Jul-21 17:50
professionalMiguel Santico21-Jul-21 17:50 
GeneralMessage Closed Pin
26-Jul-21 0:16
MemberJacob Ethan 202126-Jul-21 0:16 
AnswerRe: what to study after javascript? Pin
Bohdan Stupak30-Jul-21 4:04
professionalBohdan Stupak30-Jul-21 4:04 
QuestionHow can I minimize the entire browser? Pin
Member 1528061310-Jul-21 21:32
MemberMember 1528061310-Jul-21 21:32 
AnswerRe: How can I minimize the entire browser? Pin
Richard Deeming11-Jul-21 22:10
mveRichard Deeming11-Jul-21 22:10 
GeneralRe: How can I minimize the entire browser? Pin
Peter_in_278011-Jul-21 22:19
professionalPeter_in_278011-Jul-21 22:19 
QuestionRe: How can I minimize the entire browser? Pin
SeeSharp219-Jul-21 9:46
MemberSeeSharp219-Jul-21 9:46 
AnswerMessage Closed Pin
30-Aug-21 22:16
MemberSyed2655730-Aug-21 22:16 
QuestionWant to achieve web page timing become focus execution Pin
Member 1528061310-Jul-21 13:09
MemberMember 1528061310-Jul-21 13:09 
Rant[REPOST] Want to achieve web page timing become focus execution Pin
Richard Deeming11-Jul-21 22:08
mveRichard Deeming11-Jul-21 22:08 
QuestionWant to achieve web page timing become focus execution Pin
Member 152806137-Jul-21 15:20
MemberMember 152806137-Jul-21 15:20 
QuestionHow do I get my input box to persist after clicking Amend? (SOLVED) Pin
samflex3-Jul-21 6:15
Membersamflex3-Jul-21 6:15 
Greetings experts,

I have a two part question but first what I am trying to accomplish and what I have tried so far.

Currently, we have a button on our web page with an Amend. value.

When you click the Amend button, a textbox is displayed which allows users to enter whatever text they wish to enter.

If user changes his/her mind after clicking Amend, users can click Cancel to hide the textbox again.

This works well.

The original intent is to allow users to enter data as an amendment to existing data and submit to the database.

Here is the working code:

//JS
            $("#btconsultsup").click(function () {
              if ($(this).val().toLowerCase() == "amend") {
                  $.each($('.consultsup'), function(i, item){
                  $(this).show();
                });
                $(this).val("Cancel");
            } else {
                  $.each($('.consultsup'), function(i, item){
                  $(this).hide();
                });
                $(this).val("Amend");
            }
          });
          


//HTML
     <input id="btconsultsup" type="button" value="Amend" name="btconsultsup" />
    <div class="consultsup" style="display: none"><input class="shortCosts"  id="amendconSupportContractCosts" name="amendconSupportContractCosts" value=""/></div>


However, management has decided that once data is entered into this textbox, (A), once you click Amend button to display the textbox, then Cancel button should be hidden because they want the textbox to display permanently on the page even after the page is closed and reopened; and (B), data should displayed permanently on that textbox.

So, how do I hide the Cancel button so it will no longer be available to users to click on it to hide the textbox once it is already displayed?

Two, how do I ensure that once the Amend button is clicked and textbox is displayed, that it remains displayed even after the page is closed and reopened.

I had suggested to them that the best solution is to just add the textbox to the page without the need for Amend button but they refused.

Any suggestion is greatly appreaciated.

modified 5-Jul-21 9:49am.

AnswerRe: How do I get my input box to persist after clicking Amend? Pin
Richard Deeming4-Jul-21 21:41
mveRichard Deeming4-Jul-21 21:41 
GeneralRe: How do I get my input box to persist after clicking Amend? Pin
samflex5-Jul-21 2:41
Membersamflex5-Jul-21 2:41 
GeneralRe: How do I get my input box to persist after clicking Amend? Pin
Richard Deeming5-Jul-21 2:47
mveRichard Deeming5-Jul-21 2:47 
GeneralRe: How do I get my input box to persist after clicking Amend? Pin
samflex5-Jul-21 3:24
Membersamflex5-Jul-21 3:24 
GeneralRe: How do I get my input box to persist after clicking Amend? Pin
Richard Deeming5-Jul-21 3:39
mveRichard Deeming5-Jul-21 3:39 
GeneralRe: How do I get my input box to persist after clicking Amend? Pin
samflex5-Jul-21 3:49
Membersamflex5-Jul-21 3:49 
Questionjs problem Pin
tkshitiz30-Jun-21 22:13
Membertkshitiz30-Jun-21 22:13 
AnswerRe: js problem Pin
Richard MacCutchan30-Jun-21 22:15
mveRichard MacCutchan30-Jun-21 22:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.