|
-
September 3rd, 2011, 02:05 PM
#1
How to submit iframe in current page
Hello , i have index.php and somewhere inside it i have an iframe of index2.php , index2.php has this code
Code:
<a href="javascript:{}" target="_parent" onclick="document.getElementById('form1').submit(); return false;">Submit</a>
but when i click it , the page loads inside the iframe , so im still at index.php but i have iframe with different content.... how can i manage "load" the page at index.php window ?
-
September 4th, 2011, 11:12 PM
#2
Re: How to submit iframe in current page
Couple issues.
1. Your href attribute is invalid JavaScript. That should be throwing errors in some browsers.
2. Since it's submitting a form, changing the target in the actual anchor tag will do nothing.
Code:
<a href="#" onclick="document.getElementById('form1').submit(); return false;">Submit</a>
<form target="_parent" ... >
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|