Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

242
Visualizações
How do you save a function to call on it later to be executed when a certain promise is fullfilled example beneath

Found solution: I managed to create a function that i then call, i did.

export function Checkoutsystem_Close() {
$w("#Address2").hide("fade");
$w("#Line4").hide("fade");
$w("#PostalCode").hide("fade");
$w("#Line5").hide("fade");
$w("#Name").hide("fade");
}

export function StopLineTop_viewportEnter(event) 
{Checkoutsystem_Close()}
export function StopLineBottom_viewportEnter(event) 
{Checkoutsystem_Close()}
export function CloseButtonHitbox_click(event) 
{Checkoutsystem_Close()}     
export function Glass_click(event) {Checkoutsystem_Close()}

Started coding yesterday and all i know how to use is hide and show functions but so far ive managed to build a very pretty checkout system. On my basic knowledge. But its so many elements to show and hide so I would like to learn how to save a function so the code becomes very short effective simple and light.


Id like to save this whole part of code beneath to be saved, so I can just call on it later so something like;


export function StopLineBottom_viewportEnter(event) { "function close checkout" }


The code I would like to save and recall later:

export function StopLineBottom_viewportEnter(event) {    

$w("#Glass").hide("");    
$w("#CheckoutBox1").hide("");   
$w("#Galasky").hide("");
$w("#PreviewBox").hide("");
$w("#GalaskyStarlight").hide("");
$w("#ProductPreview").hide("");
$w("#Price").hide("");
$w("#Address1").hide("");
$w("#Line1").hide("");
$w("#Country").hide("");
$w("#Line2").hide("");
$w("#City").hide("");
$w("#Line3").hide("");
$w("#Address2").hide("");
$w("#Line4").hide("");
$w("#PostalCode").hide("");
$w("#Line5").hide("");
$w("#Name").hide("");
$w("#Line6").hide("");
$w("#Number").hide("")
$w("#Line7").hide("");
$w("#CheckoutButton").hide("");
$w("#CheckoutBox2").hide("");
$w("#PaymentProviders").hide("");
$w("#CloseButtonIcon").hide("");
$w("#CloseButtonHitbox").hide("");
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda