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

443
Visualizações
Characterizing of an HTML page using a javascript JSON (instead of ajax request)

Here is the context :

I am writing a Python code that converts an HTML page to a PDF file using the instructions in this link. I work now on the POST request that will have as an input an HTML file, and have some parameters precised in the latter link.

The link states that the HTML input file has to be defined by some parameters, grouped in this example:


image

in this example, I don't get what's the meaning of this part : "json": "[\"a\": \"b\"]" ? and how can I adapt it to my case.

So I am struggling with how to precise the parameter highlighted in yellow in the image above.

Here is the question :

The litterature states concerning this field (cpf:inputs > params > cpf:inline > json) states the following:

json(string, optional)

JavaScript variables to be placed in global scope to reference while rendering the HTML.
This mechanism is intended to be used to supply data that might otherwise be retrieved using ajax requests.
The actual mechanics of accessing this content varies depending if rendering from a zip file or from a url.
When rendering from a zip file, the source collateral must include a script element such as:

<script src='./json.js' type='text/javascript'></script>

When rendering from a URL, the content of this json object is injected into the browser VM before the page is rendered.

default: {}

It will help if someone can just read and explain to me the meaning of this quoted text above. thanks!

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

If you don't want to do an Ajax request every time you use your script, you can visit the ajax page, copy the entire content with Ctrl+A, and then paste it into an empty javascript file you can save as module.js for example. When you come to the point where you'd usually do the request, you can replace it by . Good luck!

PS: Your question is very well formulated, I would have upvoted it, but I haven't got enough reputation now...

over 4 years ago · Santiago Trujillo Relatório
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