I have built a fairly simple AJAX/JS/PHP site.
It has 3 dynamic list boxes that in the end create a <table> in an IFRAME.
The last field/column in the table has a partno that I would like to have as an href so the user just clicks on this and a new html page will pop up in the IFRAME.
I was expecting I could use an href to point to a js script function that would launch the actual HTML address.
PHP code
$chLink = "<a href=";
$chLink .= "fnLoadPart('"; // function hides the url
$chLink .= $rowCol[Part_No];
$chLink .= "')>";
$chLink .= $rowCol[Part_No]; // User see the Part No
$chLink .= "</a>";
JS code
function fnLoadPart(strPartNo)
{
var strHtml;
strHtml = "HTPP://someaddress.com?" + strPartNo;
??? but how do I launch strHtml from the JS script ???
}
It has 3 dynamic list boxes that in the end create a <table> in an IFRAME.
The last field/column in the table has a partno that I would like to have as an href so the user just clicks on this and a new html page will pop up in the IFRAME.
I was expecting I could use an href to point to a js script function that would launch the actual HTML address.
PHP code
$chLink = "<a href=";
$chLink .= "fnLoadPart('"; // function hides the url
$chLink .= $rowCol[Part_No];
$chLink .= "')>";
$chLink .= $rowCol[Part_No]; // User see the Part No
$chLink .= "</a>";
JS code
function fnLoadPart(strPartNo)
{
var strHtml;
strHtml = "HTPP://someaddress.com?" + strPartNo;
??? but how do I launch strHtml from the JS script ???
}