Click here to Skip to main content
15,029,990 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionHow does the compare function work with numerical sort? Pin
Ryan Blake 202126-Aug-21 15:51
MemberRyan Blake 202126-Aug-21 15:51 
AnswerRe: How does the compare function work with numerical sort? Pin
Peter_in_278026-Aug-21 18:22
professionalPeter_in_278026-Aug-21 18:22 
GeneralRe: How does the compare function work with numerical sort? Pin
Ryan Blake 202128-Aug-21 13:45
MemberRyan Blake 202128-Aug-21 13:45 
QuestionBrowser Side Recovery Pin
milo-xml3-Aug-21 9:06
professionalmilo-xml3-Aug-21 9:06 
AnswerRe: Browser Side Recovery Pin
Richard Deeming3-Aug-21 23:48
mveRichard Deeming3-Aug-21 23:48 
GeneralRe: Browser Side Recovery Pin
milo-xml4-Aug-21 3:20
professionalmilo-xml4-Aug-21 3:20 
Questioni have been learning javascript for a long time now but still dont know what to build Pin
samuel unachukwu23-Jul-21 22:47
Membersamuel unachukwu23-Jul-21 22:47 
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 
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 
Assuming your server-side code outputs the stored value from the database in the textbox, then you simply need to test on page load whether the textbox is empty, and display it if it has a value.
JavaScript
$(function(){
    const displayShortCosts = function(){
        $(".consultsup").show();
        $("#btconsultsup").hide();
    });
    
    if ($("#amendconSupportContractCosts").val()) {
        displayShortCosts();
    }
    else {
        $("#btconsultsup").click(displayShortCosts);
    }
});




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


modified 5-Jul-21 9:39am.

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.