| View previous topic :: View next topic |
| Author |
Message |
13r1i14
Joined: 07 Nov 2006 Posts: 2
|
Posted: Tue Nov 07, 2006 9:15 am Post subject: a simple iframe manipulation |
|
|
hi,
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: |
function ChangePage(page_src)
{
frames['f1'].location.href = page_src
} |
here is how i call it:
| Code: |
| <img src="images/img.gif" style="cursor: hand" onclick="ChangePage('test.php')"> |
i will appreciate the help. thanks |
|
| Back to top |
|
 |
|
|
mwa103 100+ Club
Joined: 07 Mar 2005 Posts: 206
|
Posted: Tue Nov 07, 2006 9:09 pm Post subject: Re: a simple iframe manipulation |
|
|
| Can you open test.php separately without using the JavaScript and iframe or does it give you the same error? |
|
| Back to top |
|
 |
13r1i14
Joined: 07 Nov 2006 Posts: 2
|
Posted: Wed Nov 08, 2006 6:44 am Post subject: Re: a simple iframe manipulation |
|
|
| mwa103 wrote: |
| Can you open test.php separately without using the JavaScript and iframe or does it give you the same error? |
yes it works fine. |
|
| Back to top |
|
 |
|