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

118
Vistas
Adaptive Card Javascript SDK Renders empty Div

I'm attempting to render an Adaptive Card via the Javascript SDK. I have attempted multiple versions of the SDK and used various samples from the Samples library on the Adaptive Cards official site.

In all cases, my code renders a:

<div class="ac-container ac-adaptiveCard" tabindex="0" style="display: flex; flex-direction: column; justify-content: flex-start; box-sizing: border-box; flex: 0 0 auto; padding: 15px; margin: 0px;"></div>

I am using the boilerplate example code from the documentation.

        var adaptiveCard = new AdaptiveCards.AdaptiveCard();

        adaptiveCard.hostConfig = new AdaptiveCards.HostConfig({
            fontFamily: "Segoe UI, Helvetica Neue, sans-serif"
          
        });


        
        adaptiveCard.onExecuteAction = function (action) { alert("Ow!"); }

        

        
            // Parse the card payload
            adaptiveCard.parse(card);

            // Render the card to an HTML element:
            var renderedCard = adaptiveCard.render();
       

        console.log("Adaptive Card Rendered: " + renderedCard.outerHTML);

        var target = FifthMethod.Forms.Controls.AdaptiveCard._getInstance(objInfo.CurrentControlId);

        target.appendChild(renderedCard);
about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I figured out that in my code I was receiving the adaptive card definition as a string. I had to use JSON.parse() to convert the string into a Javascript object. Once I did that, the issue resolved.

about 4 years ago · Santiago Trujillo Denunciar
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