i have a page with an iframe in it, and i have a java script that change the src of the iframe.
It all works perfectly fine when i set the source to an HTML page, but if i set it to a PHP page, instead of changing the iframe source, a prompt window appears asking if i want to open or save the page. if i chose open, it opens as text (code).
here is the simple code:
the function that changes the frame:
- Code: Select all
function ChangePage(page_src)
{
frames['f1'].location.href = page_src
}
here is how i call it:
- Code: Select all
<img src="images/img.gif" style="cursor: hand" onclick="ChangePage('test.php')">
i will appreciate the help. thanks


