Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

240
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda