A
AwefulService
Hi,
I'm having some trouble with this issue, need some help.
WHAT I want
------------------
call another javascript to so something about the data within a
particular iframe upon a button click and stay on the same page.
What is working
-----------------------
Here's the basic code:
<script>
function init() {
frames.firstFrame.document.designMode = "On";
Editor = document.getElementById('text').contentWindow.document;
document.forms['frm'].onsubmit = function()
{
var data = document.getElementById('text');
data.value = Editor#currentrow#.body.innerHTML;
}
</script>
<html>
<body onload="init()">
<form id="frm">
<iframe id="text"></iframe>
<input type="hidden" name="data" id="data">
<input type="submit" value="Save" onclick="anotherJSfunction()">
</form>
</body>
</html>
What is NOT working
-----------------------
Here's the basic code:
<script>
function init() {
frames.firstFrame.document.designMode = "On";
Editor = document.getElementById('text').contentWindow.document;
document.forms['frm1'].onsubmit = function()
{
var data = document.getElementById('text');
data.value = Editor#currentrow#.body.innerHTML;
}
</script>
<html>
<body onload="init()">
<form id="frm">
<iframe id="text"></iframe>
<input type="hidden" name="data" id="data">
<input type="button" value="Save" onclick="anotherJSfunction()">
</form>
</body>
</html>
My rant:
So, what stumbled me is how to bind/tie the hidden field and its
without the SUBMIT type, how to overcome it?
Many thanks.
I'm having some trouble with this issue, need some help.
WHAT I want
------------------
call another javascript to so something about the data within a
particular iframe upon a button click and stay on the same page.
What is working
-----------------------
Here's the basic code:
<script>
function init() {
frames.firstFrame.document.designMode = "On";
Editor = document.getElementById('text').contentWindow.document;
document.forms['frm'].onsubmit = function()
{
var data = document.getElementById('text');
data.value = Editor#currentrow#.body.innerHTML;
}
</script>
<html>
<body onload="init()">
<form id="frm">
<iframe id="text"></iframe>
<input type="hidden" name="data" id="data">
<input type="submit" value="Save" onclick="anotherJSfunction()">
</form>
</body>
</html>
What is NOT working
-----------------------
Here's the basic code:
<script>
function init() {
frames.firstFrame.document.designMode = "On";
Editor = document.getElementById('text').contentWindow.document;
document.forms['frm1'].onsubmit = function()
{
var data = document.getElementById('text');
data.value = Editor#currentrow#.body.innerHTML;
}
</script>
<html>
<body onload="init()">
<form id="frm">
<iframe id="text"></iframe>
<input type="hidden" name="data" id="data">
<input type="button" value="Save" onclick="anotherJSfunction()">
</form>
</body>
</html>
My rant:
So, what stumbled me is how to bind/tie the hidden field and its
without the SUBMIT type, how to overcome it?
Many thanks.