CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 WYSIWYG Editor Integration in CodeCharge for ASP

Print topic Send  topic

Author Message
fcy
Posted: 09/20/2002, 9:07 PM

Yes, I also have trouble..the article is in PHP and I'm unsuccessful at converting....I can get it to the point of retreiving the data and editing but cannot get it to insert or update. ANY HELP WOULD BE APPRECIATED.

#############################################################################33
Here is my attempt at the asp in Custom Action...his original PHP from the Article is Below I used table Documents instead of wysywyg.

'-------------------------------
' Load all form fields into variables
'-------------------------------
fldContent = get_param("Content")
'-------------------------------
' Validate fields
'-------------------------------
if sAction = "insert" or sAction = "update" then
If len(swysiErr) > 0 then
exit sub
end if
end if
'-------------------------------
'-------------------------------
' Create SQL statement
'-------------------------------
select case sAction

case "insert"
sSQL = "insert into Documents (" &_
"Content)" &_
" values (" &_
tosql(fldContent, "Text") &_
")"

case "update"
sSQL = "update Documents set " & _
"[Content]=" & tosql(fldContent, "Text")& _
sSQL = sSQL & " where " & sWhere

case "delete"
sSQL = "delete from wysiwyg where " & sWhere

end select
'-------------------------------

#########################################################################

PHP


//-------------------------------
// Load all form fields into variables
//-------------------------------
$fldcontent = get_param("content");

//-------------------------------
// Validate fields
//-------------------------------
if($sAction == "insert" || $sAction == "update")
{
if(strlen($swysiwygErr)) return;
}
//-------------------------------


//-------------------------------
// Create SQL statement
//-------------------------------
switch(strtolower($sAction))
{
case "insert":
$sSQL = "insert into wysiwyg (" .
"content)" .
" values (" .
tosql($fldcontent, "Text") .
")";
break;
case "update":

$sSQL = "update wysiwyg set " .
"content=" . tosql($fldcontent, "Text");
$sSQL .= " where " . $sWhere;
break;
case "delete":
$sSQL = "delete from wysiwyg where " . $sWhere;
break;
}
//-------------------------------

Carey
Posted: 09/21/2002, 3:01 PM

It's a lot easier than that if you use CCS. You pretty much do what the WYSIWYG website instructions say to do. You still put a textarea into CCS and follow CCS. If you want to see one that works, let me know.
fcy
Posted: 09/22/2002, 11:40 AM

I'm just "crossing over" into CCS from CC. I've enjoyed using CC. I learned lots of ASP but am finding examples scarce and the new format of the code is still a puzzle for me. I would appreciate very much looking at an example.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.