Hi is there a way to change the iframe name within this code
<?php
//path to directory to scan
$directory = "../resumes/";
//get all text files with a .txt extension.
$txt = glob($directory . "*.txt");
//print each file name
foreach($txt as $txt)
{
$e = $txt;
echo "<iframe name='messageTxt' src='" . $e . "' style='display:block'></iframe><input type='button' value='Import' onClick='init()' />";
}
?>
The things is that i want for each txt in the directory to be listed in the iframe but i need to include one of them (the one that is selected with the onClick button in the specified iframe in javascript
var extText = window.frames.messageTxt.document.body.lastChild.lastChild.data;
Is that possible? my explanation ok?
Thanks