-
March 16th, 2013, 05:52 AM
#1
How can I submit data into an iFrame?
I am trying to automatically submit data into my iFrame. In the iFrame will be multiple text boxes and a submit button. I want to enter data into those text boxes and submit it.
This code is not working for me...
<html>
<head>Sim Game</head>
<body>
<script type="text/javascript">
function subForm() {
document.myform.submit();
}
{
myform.Arrive.value="Hello";
myform.Leave.value="Goodbye";
subForm();
}
</script>
<form method="post" name="myform" target="myFrame">
<iframe height="600" width="600" frameborder="0"
src="MyWebPage.com" name="myFrame">
</body>
</html>
-
March 17th, 2013, 05:53 AM
#2
Re: How can I submit data into an iFrame?
this javascript, not Java
-
April 2nd, 2013, 03:53 AM
#3
Re: How can I submit data into an iFrame?
Does this show the content to everybody, or only to you on the one session?
-
April 2nd, 2013, 03:56 AM
#4
Re: How can I submit data into an iFrame?
If you are generating the iframe on the fly on IE8, there is one special gotcha for this particular browser. You need to specify the name attribute inside your document.createElement method call:
var iframe;
try {
iframe = document.createElement('');
} catch (ex) {
iframe = document.createElement('iframe');
iframe.name = 'the-iframe-name';
}
otherwise, form upload will simply replace the current page.
-
April 2nd, 2013, 05:16 AM
#5
Re: How can I submit data into an iFrame?
This is still Javascript, not Java. Please use the appropriate forum (scripting).
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
|