Click here to Skip to main content
15,921,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I almost done with the coding, but it showing error on line 17 i.e Fatal error: Call to undefined function PostForm() in C:\.............. on line 17.... plz any one help me out......

------------------------------------------------------------------------------


//RTF
include("class_rtf.php");




if (isset($_POST['Publish'])) {
// $selected_radio = $_POST['group1'];

//generate RTF
// if ($selected_radio == 'rRTF') {
// echo "RTF Selected";

return PostForm();

$rtf = new rtf("rtf_config.php");
$rtf->setPaperSize(5);
$rtf->setPaperOrientation(1);
$rtf->setDefaultFontFace(0);
$rtf->setDefaultFontSize(24);
$rtf->setAuthor("noginn");
$rtf->setOperator("me@noginn.com");
$rtf->setTitle("RTF Document");
$rtf->addColour("#000000");
$rtf->addText($_POST['text']);
$rtf->getDocument();
// }

}



function clearall()
{
echo "OK";
"txtTitle.txt=''";
}

?>

<script language="javascript1.2">

function Init() {
wysiwyg.document.designMode = 'On';
}

function PostForm() {
// var rtf = wysiwyg.document.body.innerHTML;
var rtf = document.publish.text.value;
return true;
}

</script>




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<!-- pdf -->
<style type='text/css'>
fieldset{padding:12px}
body{font-size:small}
</style>
</head>

<body onLoad="Init()">
<form name="publish" method="post" target="_blank" action="">


Content Publish



Title :
<input type="text" name="title" id="txtTitle">
Author :
<input type="text" name="author" id="txtAuthor">
E-mail id :
<input type="text" name="url" id="txtEmail">
Copy the text for Publish :
<!-- <script language="JavaScript" type="text/javascript" src="html_rtf\wysiwyg_beta\wysiwyg.js"> -->
<textarea id="taContent" name="content" style="height: 170px; width: 500px;"></textarea>
<!-- <script language="javascript1.2">
generate_wysiwyg('taContent');
</script> -->







Select the output format
<input type="radio" name="group1" value="rRTF">RTF

<!-- <input type="radio" name="group1" value="rPDF">PDF

<input type="radio" name="group1" value="rEPUB">EPUB

-->








<input type="submit" name="Publish" value="Publish">





</body>

</html>
Posted
Updated 20-Jan-12 23:21pm
v2

1 solution

The error message is from PHP - there is no PHP function called "PostForm", but there is a Javascript function with that name. PHP cannot call Javascript functions.
 
Share this answer
 
Comments
trinad1023 23-Jan-12 0:59am    
so plz guide me sir, how i can solve the above problem....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900