PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 2024 → Get the value of a webdev variable and pass it to an HTML variable
Get the value of a webdev variable and pass it to an HTML variable
Débuté par Tobiaz, 03 fév. 2023 23:52 - 1 réponse
Membre enregistré
5 messages
Posté le 03 février 2023 - 23:52
Please help
In a button of the page I have this html code, I can call from the web page. all good up to here.
I want to replace the html phone number, from a webdev variable

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Boton responsive llamar</title>>
<link rel="stylesheet" href="estilos.css">
</head>
<body>
<header>
<div Class="topbar">
<a href="tel:+584146124240"
Class="btnllamar" onclik="return
(navigator.userAgent.match(/Android │
iphone │ movile /i)) != Null;"
>+584146124240</a>
</div>
</header>
</body>
</html>
Posté le 04 février 2023 - 19:31
//Declare your Variable on your page
tel is string = "+11234567890"

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Responsive Call Button</title>
<link rel="stylesheet" href="estilos.css">
</head>
<body>
<header>
<div Class="topbar">
<a href="tel:" + tel <---------------------------Here goes your variable.
Class="btnllamar" onclick="return
(navigator.userAgent.match(/Android │
iphone │ mobile /i)) != Null;"
>Call Now</a>
</div>
</header>
</body>
</html>

See if that works for you

Regards,

Carlos