- Forums - Reply - Statistics - Sign Up - Search -

The Wyzz WYSIWYG Editor / Coding Discussion / WYZZ TextArea not passing value to textarea for POST
Author Message
SSS
Member
# Posted: 9 Oct 2009 16:34 - Edited by: SSS


Hi Everyone, I'm sure this is a simple fix and I'll slap myself for not thinking about it sooner, but I've been troubleshooting this issue for days and I am just hitting dead ends!!

Below is an exert of code from my test page for simplification that describes taking the input from the WYZZ Textarea and POSTing it to "nextpage.php" for processing.
If nothing exists in the Textarea then it will just send a pop-up stating the empty field's name and content.

Problem: Even though data is entered into the WYZZ Textarea the content is not passed to the original textarea so it can be processed to the POST.

HELP: Does anybody know what I need to do so I can process this information?

------------------------------------
Exert Part 1
------------------------------------
<form method="POST" name="MyForm" align="center" action="nextpage.php">

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="799">
<tr>
<td>

<textarea name="poststyling_" id="poststylingID_" wrap="physical" cols="51" rows="6" tabindex="6"></textarea>
<script language="javascript1.2">
make_wyzz('poststylingID_');
</script>

</td>
</tr>
<tr>
<td>
<input type="button" onClick="Javascript:post_check()" name="postme" value="Post Me" tabindex="500"></td>
</td>
</tr>

</table>

</form>
------------------------------------
Exert Part 2
------------------------------------
<script LANGUAGE="JavaScript"><!--

function post_check()
{
var submitMe = 1;

if ( !document.MyForm.poststyling_.value ) {
alert ("poststyling_");
alert (document.MyForm.poststyling_.value);
submitMe = 0;
}

if ( submitMe == 1 ) {
document.MyForm.submit();
}
}

// --></script>
------------------------------------

RGaba
Member
# Posted: 13 Oct 2009 13:37


The wyzz editor is not actually a text area, it hides your original textarea (poststyling_) and then creates an iFrame with a different id (the id is something like poststyling_wyzz). But, since it's an iFrame and not a textarea, you might need to look at the innerhtml.

var wyzzIframe = document.getElementById('poststyling_wyzz').conten tWindow.document.body.innerHTML;

alert(wyzzIframe);


If the id of the wyzz iFrame is not "poststyling_wyzz" then you'll need to change that in the example above. Hope that helps!

ashwin
Member
# Posted: 19 Mar 2010 03:52


Hi friends
I m having problem with my editor
its not returning the formatted text on POST
it just returns the text in simple format as in textarea
my code is similar to above code
please someone help me out
my code is as given below
.
.
.
<form name="editFrm" action="edit_update.php?id=<?php echo $_GET['id'];?>" method="POST">
<table>
<tr>
<td><label for="ttl">Title:</label></td>
<td><textarea name="ttl" id="ttl" rows="2" cols="45"><?php echo $title ;?></textarea></td>
</tr>
<tr>
<td><label for="msgpost">Content:</label></td>
<td><textarea name="msgpost_wyzz" id="msgpost_wyzz" cols="45" rows="10"><?php echo $content ;?></textarea></td> </td>
<script language="javascript1.2">
make_wyzz('msgpost_wyzz');
</script>
</tr>
<tr>
<td colspan="2"><input type="button" value="submit" name="submitBtn" onclick="Javascript:post_check()"></td>
</tr>
</table>
</form>



My javascript function is...

function post_check()
{

var wyzzIframe = document.getElementById('msgpost_wyzz').content
window.document.body.innerHTML;

alert(wyzzIframe);
document.write(wyzzIframe);

}

lovina
Member
# Posted: 30 Mar 2010 10:23 - Edited by: lovina


formatted text area and spell check not going properly in mozilla firefox

RGaba
Member
# Posted: 13 Apr 2010 00:21 - Edited by: RGaba


<textarea name="msgpost_wyzz" id="msgpost_wyzz" cols="45" rows="10"><?php echo $content ;?></textarea></td> </td>
<script language="javascript1.2">
make_wyzz('msgpost_wyzz');
</script>



The wyzz editor automatically adds "wysiwyg" to the beginning of your text area's id. So, in this example, if you're trying to alert the value of the text area, then you're going to have to alert wysiwygmsgpost_wyzz

lovina
Member
# Posted: 13 Apr 2010 09:36


Hi friends
I m having problem with my editor
its not returning the formatted text on POST
it just returns the text in simple format as in textarea
my code is similar to above code
please someone help me out

lovina
Member
# Posted: 13 Apr 2010 09:37


Hi friends
I m having problem with my editor
its not returning the formatted text on POST on server side in firefox
it just returns the text in simple format as in textarea
my code is similar to above code
please someone help me out.

Jamaal
Member
# Posted: 18 Jul 2010 02:47


I'm having this problem right now. Thing is, it used to work as I had it, but since the switch to a new host, it no longer passes the input within the field.

Your answer

Bold Style  Italic Style  Underlined Style  Image Link  URL Link  Disable BB codes *What's that?

 » Name  » Password 
 Only registered users can post here. Enter your login/password correctly before posting a message, or register first.
 

Powered by miniBB forum software © 2001-2010