I would like the <form action to be set according to the link values I set in text bars (input) with name chart4, chart5 and chart6.
The idea is to put links in the text bars and when I press the button, this link opens in iframes.
I tried to do it as follows:
</body>
<input type="text" id="chart1" name="chart1"><br>
<input type="text" id="chart2" name="chart2"><br>
<input type="text" id="chart3" name="chart3"><br>
<input type="text" id="chart4" name="chart4"><br>
<input type="text" id="chart5" name="chart5"><br>
<input type="text" id="chart6" name="chart6"><br>
<p></p>
<form method="post" action= chart4.value target="iframe1">
<input type="submit" value="I Frame 1" />
<form method="post" action= chart5.value target="iframe2">
<input type="submit" value="I Frame 2" />
<form method="post" action= chart6.value target="iframe3">
<input type="submit" value="I Frame 3" />
</form>
<iframe name="iframe1" width="350" height="282"></iframe>
<iframe name="iframe2" width="350" height="282"></iframe>
<iframe name="iframe3" width="350" height="282"></iframe>
<p></p>
But in the test nothing happens, how to proceed?
Complete script if necessary.
<html>
<head>
<script language="JavaScript"><!--
function refreshIt() {
if (!document.images) return;
document.images['Gráfico1'].src = chart1.value;
document.images['Gráfico2'].src = chart2.value;
document.images['Gráfico3'].src = chart3.value;
setTimeout(refreshIt,500); // refresh every 0.5 secs
}
//--></script>
</head>
<body onLoad=" setTimeout(refreshIt,500)">
</body>
<input type="text" id="chart1" name="chart1"><br>
<input type="text" id="chart2" name="chart2"><br>
<input type="text" id="chart3" name="chart3"><br>
<input type="text" id="chart4" name="chart4"><br>
<input type="text" id="chart5" name="chart5"><br>
<input type="text" id="chart6" name="chart6"><br>
<p></p>
<form method="post" action= chart4.value target="iframe1">
<input type="submit" value="I Frame 1" />
<form method="post" action= chart5.value target="iframe2">
<input type="submit" value="I Frame 2" />
<form method="post" action= chart6.value target="iframe3">
<input type="submit" value="I Frame 3" />
</form>
<iframe name="iframe1" width="350" height="282"></iframe>
<iframe name="iframe2" width="350" height="282"></iframe>
<iframe name="iframe3" width="350" height="282"></iframe>
<p></p>
<img src="https://logospng.org/download/betfair/logo-betfair-fundo-laranja-1024.png" name="Gráfico1">
<img src="https://logospng.org/download/betfair/logo-betfair-fundo-laranja-1024.png" name="Gráfico2">
<img src="https://logospng.org/download/betfair/logo-betfair-fundo-laranja-1024.png" name="Gráfico3">
</html>