|
the editor doesn't seem to pass its content through POST
Last post 10-20-2006, 7:47 AM by tomSymbius. 10 replies.
-
08-31-2006, 11:34 AM |
-
tomSymbius
-
-
-
Joined on 08-31-2006
-
-
Posts 10
-
-
|
the editor doesn't seem to pass its content through POST
Welcome, i have a problem concernig POST data passing from the CuteEditor under the Firefox browser (MSIE works fine).
To be more specific: when i use the CuteEditor to add some topic, fill in the form (title, date, contents - cuteeditor) and send it to a script that should save the data to mssql database, the contents from the editor doesn't seem to be passing to that script.
When i read the data to edit them, data is taken from the database correctly, everything seem to be working fine.
I was testing if i get any data passed from the page with the form (and the editor) to the 'database insert script' throught the POST data. First time i hit the ADD button, print the data from the POST fields (script now only prints the data to the screen), the contets typed in the Editor field doesn't show up, the variable is empty; then when i hit BACK in the browser window, and click ADD again, this time the data show up as it should.
Please give me any advice or point to anything relevant.
|
|
-
08-31-2006, 12:40 PM |
-
09-01-2006, 3:38 AM |
-
tomSymbius
-
-
-
Joined on 08-31-2006
-
-
Posts 10
-
-
|
Re: the editor doesn't seem to pass its content through POST
Hello Adam,
This is in ADMIN folder of the website (the structru may be of some help: wlp/admin/CuteEditor_Files; wlp/admin/inc; wlp/admin/all_admin_asp_files)
//------------------------------------ progs_add.adp THE FILE WITH THE FORM AND THE EDITOR
<!-- #INCLUDE FILE="inc/admin.asp" --> <!-- #include file = "CuteEditor_Files/include_CuteEditor.asp" --> <% if session( "accessStatus" ) <> "granted" then response.redirect "index.asp" end if
dim rs, query, rsCreator, rsModifier, sModifier, sModified, sContent', progID ' progID = request( "pid" )
call openDB() %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>programme - add</title> <link rel="stylesheet" type="text/css" href="css/styles.css" /> <link rel="stylesheet" type="text/css" href="css/leftnav.css" /> <script type="text/javascript" src="inc/additional.js"></script> <meta http-equiv="Content-Type" content="text/html" /> </head> <body> <form action="#" method="post" name="fm_admin" id="fm_admin"> <div id="wrapper">
<div id="header"> <a href="home.asp"><img src="../images/WLP_logo.gif" width="148" height="138" class="logo1" /></a> </div> <div id="wrapper2"> <div id="content"> <h1 class="set1">Add programme</h1> <div class="inner"> <table width="450" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="images/spacer.gif" width="10" height="1"></td> <td><img src="images/spacer.gif" width="70" height="1"></td> <td><img src="images/spacer.gif" width="5" height="1"></td> <td><img src="images/spacer.gif" width="140" height="1"></td> <td><img src="images/spacer.gif" width="5" height="1"></td> <td><img src="images/spacer.gif" width="70" height="1"></td> <td><img src="images/spacer.gif" width="5" height="1"></td> <td><img src="images/spacer.gif" width="135" height="1"></td> <td><img src="images/spacer.gif" width="10" height="1"></td> </tr> <% 'take the active user firstname and surname as a creator of the programme query = "SELECT * FROM wlp_users WHERE userID=" & session( "activeUserID" ) set rsCreator = conn.execute( query ) %> <tr> <td> </td> <td align="right"><strong>Title</strong></td> <td> </td><td colspan="5"><input name="title" type="text" id="title" value="" size="70" title="title of the programme" alt="title of the programme" onblur="if( this.value == '' ) alert('Please give a title for the programme.');"></td> <td> </td></tr> <tr> <td colspan="9"><img src="images/spacer.gif" width="10" height="8"></td> </tr> <tr> <td> </td> <td align="right"><strong>Creator</strong></td> <td> </td><td><%=rsCreator( "firstname" )%> <%=rsCreator( "surname" )%></td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td align="right"><strong>Created</strong></td> <td> </td><td><%=date%></td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="9"><img src="images/spacer.gif" width="10" height="8"></td> </tr> <tr> <td> </td> <td align="right" valign="top"><strong>Meta tags </strong></td> <td> </td> <td colspan="5"><textarea name="metatags" cols="49" rows="4" id="metatags" title="place here the keywords from the content of the page, separate each one with a ',' sign"></textarea></td> <td> </td> </tr> <tr> <td colspan="9"><img src="images/spacer.gif" width="10" height="8"></td> </tr> <tr> <td> </td> <td align="right" valign="top"><strong>Description</strong></td> <td> </td> <td colspan="5"><textarea name="description" cols="49" rows="4" id="description" title="a short description of the page contents"></textarea></td> <td> </td> </tr> <tr> <td colspan="9"><img src="images/spacer.gif" width="10" height="8"></td> </tr> <tr> <td> </td> <td align="right"><strong>Date</strong></td> <td> </td> <td colspan="5"><input name="progDate" type="text" id="progDate" value="" size="25" title="type the date in format DD/MM/YYYY" alt="type the date in format DD/MM/YYYY" onblur="isDate( this.value );"></td> <td> </td> </tr> <tr> <td colspan="9"><img src="images/spacer.gif" width="10" height="8"></td> </tr> <tr> <td> </td> <td align="right"><strong>Active</strong></td> <td> </td> <td colspan="5"><input name="active" type="checkbox" class="radio" id="active" value="active" checked title="tick this if the event should be active" alt="tick this if the event should be active"></td> <td> </td> </tr> <tr> <td colspan="9"><img src="images/spacer.gif" width="10" height="8"></td> </tr> </table> <table width="450" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="images/spacer.gif" width="5" height="1"></td> <td><img src="images/spacer.gif" width="440" height="8"></td> <td><img src="images/spacer.gif" width="5" height="1"></td> </tr> <tr> <td><img src="images/spacer.gif" width="5" height="8"></td> <td> <%
dim editor set editor = New CuteEditor editor.ID = "rte1" editor.Text = sContent editor.FilesPath = "CuteEditor_Files" editor.ImageGalleryPath = "/db_images/" editor.MaxImageSize = 512 editor.ThemeType="Office2003" editor.AutoConfigure = "wlp" editor.EditorWysiwygModeCss = "edit.css" editor.Width = 440 editor.Height = 200 editor.Draw()
%> </td> <td><img src="images/spacer.gif" width="5" height="8"></td> </tr> <tr> <td colspan="3"><img src="images/spacer.gif" width="10" height="8"></td> </tr> </table> <table width="450" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="images/spacer.gif" width="10" height="1"></td> <td><img src="images/spacer.gif" width="70" height="1"></td> <td><img src="images/spacer.gif" width="5" height="1"></td> <td><img src="images/spacer.gif" width="140" height="1"></td> <td><img src="images/spacer.gif" width="5" height="1"></td> <td><img src="images/spacer.gif" width="70" height="1"></td> <td><img src="images/spacer.gif" width="5" height="1"></td> <td><img src="images/spacer.gif" width="135" height="1"></td> <td><img src="images/spacer.gif" width="10" height="1"></td> </tr> <tr> <td> </td> <td colspan="7" align="center" valign="top"> <input name="progID" type="hidden" id="progID" value="<%=progID%>"> <input type="button" name="Button" value="Cancel" onClick="location.href='progs.asp'; return false;"> <input type="button" name="Button" value="Add" onClick="if( document.fm_admin.title.value == '' ) alert( 'Please give this event a title' ); else { document.fm_admin.action='progs_add_create.asp'; submit(); return false; }"></td> <td> </td> </tr> <% rsCreator.close set rsCreator = nothing %> </table> </div> </div>
<div id="nav"> <% 'build left navigation menu call displayNavigation( "progs" ) %> </div> </div>
<div id="extras"> <% 'inline help for the user call displayInlineHelp( "progsA" ) %> </div> </div>
<div id="footer"> <div class="copy"></div> </div> </div> </form>
</body> </html> <% call closeDB() %>
//------------------------------------------- progs_add_create.adp THE FILE THAT ADDS THE DATA: now only displays the POST data for debug...
<!-- #INCLUDE FILE="inc/admin.asp" --> <% if session( "accessStatus" ) <> "granted" then response.redirect "index.asp" end if
response.write( "TITLE: " & request( "title" ) ) response.write( "<br>DATE: " & request( "progDate" ) ) response.write( "<br>METATAGS: " & request( "metatags" ) ) response.write( "<br>DESC: " & request( "description" ) ) response.write( "<br>RTE1: " & request( "rte1" ) ) response.write( "<br>ACTIVE: " & request( "active" ) )
%>
I have tested that on two machines, i am running Win2k, the other machine runs XP. The situation is the same on both: MS IE displays all the data from the POST, the FIREFOX needs to go back and click ADD second time to display the data.
Not sure what more info can i give you.
Regards
|
|
-
09-12-2006, 8:17 AM |
-
robw83
-
-
-
Joined on 09-12-2006
-
-
Posts 1
-
-
|
Re: the editor doesn't seem to pass its content through POST
I am having exactly the same problem.
Works fine under IE, but not under Firefox.
Am using the latest version of Firefox.
First time you submit the form and submit the data, an old version of the content (the version that was loaded into the editor when the page was loaded) is displayed.
Press back, and submit again, and the new text you added is there
Help!?!?!
|
|
-
09-14-2006, 11:12 AM |
-
09-21-2006, 6:34 PM |
-
Kevin Rogers
-
-
-
Joined on 08-22-2006
-
-
Posts 14
-
-
|
Re: the editor doesn't seem to pass its content through POST
I am having the same problem. I also posted this under a different topic. Any help would be appreciated.
|
|
-
09-27-2006, 9:31 AM |
-
comdev
-
-
-
Joined on 07-12-2006
-
-
Posts 2
-
-
|
Re: the editor doesn't seem to pass its content through POST
Hi all
I have the same problem with CuteEditor in my application. It works with MSIE but not with Firefox. The cutesoft demo works fine in both editors.
The CuteEditor is used in ASP as follows: Set editor = New CuteEditor editor.ID = "xtextbox" editor.Text = "" editor.FilesPath = "../../../include/external/CuteEditor_Files" editor.MediaGalleryPath = "../../images" editor.FlashGalleryPath = "../../images" editor.TemplateGalleryPath = "../../images" editor.FilesGalleryPath = "../../images" editor.ImageGalleryPath = "../../images" editor.Draw()
Here is the request logged withe the HTTP Debugger (fiddler) for both browser.
IE:
POST /Watch5/UpApplications/UpTables/tabletest/__UpDataPump.asp?rq_strIdStack=-1&rq_lAppId=255&rq_lTargetId=2953&rq_lSenderId=2951&rq_lMode=4&rq_lLevelCount=-1&rq_strTarget=00&rq_bDelete=0&rq_bBack=0&rq_lClosePopUp=0&rq_lReloadOpener=0&rq_bIsPopup=0 HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Referer: http://ent03/Watch5/UpApplications/UpTables/tabletest/editform.asp?rq_strIdStack=-1&rq_lAppId=255 Accept-Language: de-ch,de;q=0.7,en-us;q=0.3 Content-Type: multipart/form-data; boundary=---------------------------7d69f174e0624 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 1.1.4322) Host: ent03 Content-Length: 1244 Proxy-Connection: Keep-Alive Pragma: no-cache Cookie: UserName=administrator; SelectedLCID=1031; UpGantt%5F254=ZoomFaktor=50; CookieCheckup=Intrapact; ASPSESSIONIDCCDACTDT=CNCFNAJAFFDJLBPAMFEIMKFB X-ProcessAndThread: iexplore.exe [1940; 3888]
-----------------------------7d69f174e0624 Content-Disposition: form-data; name="fr_strMailSendTo"
-----------------------------7d69f174e0624 Content-Disposition: form-data; name="lid"
-1 -----------------------------7d69f174e0624 Content-Disposition: form-data; name="dtedit"
27.09.2006 16:19:52 -----------------------------7d69f174e0624 Content-Disposition: form-data; name="dtcreation"
27.09.2006 16:19:52 -----------------------------7d69f174e0624 Content-Disposition: form-data; name="luserid"
1 -----------------------------7d69f174e0624 Content-Disposition: form-data; name="lcreatorid"
1 -----------------------------7d69f174e0624 Content-Disposition: form-data; name="lownerid"
-1 -----------------------------7d69f174e0624 Content-Disposition: form-data; name="leditid"
-1 -----------------------------7d69f174e0624 Content-Disposition: form-data; name="lviewid"
-1 -----------------------------7d69f174e0624 Content-Disposition: form-data; name="xname"
Test MSIE -----------------------------7d69f174e0624 Content-Disposition: form-data; name="xtextbox"
<span style="FONT-FAMILY: Arial">This is a Text in the CuteEditor.</span>
-----------------------------7d69f174e0624--
Firefox (you can see, the part for hte field xtextbox is empty): OST /Watch5/UpApplications/UpTables/tabletest/__UpDataPump.asp?rq_strIdStack=-1&rq_lAppId=255&rq_lTargetId=2953&rq_lSenderId=2951&rq_lMode=4&rq_lLevelCount=-1&rq_strTarget=00&rq_bDelete=0&rq_bBack=0&rq_lClosePopUp=0&rq_lReloadOpener=0&rq_bIsPopup=0 HTTP/1.1 Host: ent03 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Proxy-Connection: keep-alive Referer: http://ent03/Watch5/UpApplications/UpTables/tabletest/editform.asp?rq_strIdStack=-1&rq_lAppId=255 Cookie: CookieCheckup=Intrapact; UserName=administrator; ASPSESSIONIDCCDACTDT=BNCFNAJAFMPDGAMOHEIAMKBE Content-Type: multipart/form-data; boundary=---------------------------23281168279961 Content-Length: 1184
-----------------------------23281168279961 Content-Disposition: form-data; name="fr_strMailSendTo"
-----------------------------23281168279961 Content-Disposition: form-data; name="lid"
-1 -----------------------------23281168279961 Content-Disposition: form-data; name="dtedit"
27.09.2006 16:24:29 -----------------------------23281168279961 Content-Disposition: form-data; name="dtcreation"
27.09.2006 16:24:29 -----------------------------23281168279961 Content-Disposition: form-data; name="luserid"
1 -----------------------------23281168279961 Content-Disposition: form-data; name="lcreatorid"
1 -----------------------------23281168279961 Content-Disposition: form-data; name="lownerid"
-1 -----------------------------23281168279961 Content-Disposition: form-data; name="leditid"
-1 -----------------------------23281168279961 Content-Disposition: form-data; name="lviewid"
-1 -----------------------------23281168279961 Content-Disposition: form-data; name="xname"
Test Firefox -----------------------------23281168279961 Content-Disposition: form-data; name="xtextbox"
-----------------------------23281168279961--
I hope the log helps.
Best regards
Daniel
|
|
-
09-28-2006, 1:32 AM |
-
comdev
-
-
-
Joined on 07-12-2006
-
-
Posts 2
-
-
|
Re: the editor doesn't seem to pass its content through POST
Hi all
Here is the ASP-file I use with CuteEditor. The CuteEditor save button is disabled and a page submit button is used.
<%@ Language=VBScript %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <!--#include file = "../../../_UpInclude/external/CuteEditor_Files/include_CuteEditor.asp" --> </head>
<body>
<form name="__UpForm" id="__UpForm" enctype="multipart/form-data" method=POST> <script language="JavaScript"> function SubmitForm() { window.document.__UpForm.action = "__UpDataPump.asp?rq_strIdStack=-1&rq_lAppId=255&rq_lTargetId=2953&rq_lSenderId=2951&rq_lMode=4&rq_lLevelCount=-1&rq_strTarget=00&rq_bDelete=0&rq_bBack=0&rq_lClosePopUp=0&rq_lReloadOpener=0&rq_bIsPopup=0"; document.forms[0].submit();
return; } </script> <input type=hidden value="" name="fr_strMailSendTo" ID="Hidden1"> <table width="98%" align="left" cellpadding=0 cellspacing=0 border=0 ID="Table1"> <tr> <td> </td> <td valign="top"> <table width="100%" border=0 cellspacing=2 cellpadding=2 ID="Table2"> <tr> <td width="10%"><img src="../../../images/10pxtrans.gif" width=150 height=1 border=0></td> <td width="50%"><img src="../../../images/10pxtrans.gif" width=10 height=1 border=0></td> <td width="40%"><img src="../../../images/10pxtrans.gif" width=10 height=1 border=0></td> </tr>
<input value="-1" type="hidden" id="lid" name="lid"> <input value="<%= Now() %>" type="hidden" id="dtedit" name="dtedit">
<tr> <td class="h1" colspan="3"> CuteEditor Test <hr> <br> </td> </tr> <tr> <th valign="top"> Name </th>
<td nowrap valign="top"> <input name="xname" value="" /> </td>
<td class="OnlineHelp"> </td> </tr>
<tr> <th valign="top"> Textbox </th>
<td colspan="2" valign="top"> <% Set editor = New CuteEditor editor.ID = "xtextbox" editor.Text = "" editor.FilesPath = "../../../_UpInclude/external/CuteEditor_Files" editor.MediaGalleryPath = "../../images" editor.FlashGalleryPath = "../../images" editor.TemplateGalleryPath = "../../images" editor.FilesGalleryPath = "../../images" editor.ImageGalleryPath = "../../images" editor.Draw() %> </td> </tr>
<tr> <td> </td> <td colspan="2" nowrap align="center"> <input onClick="SubmitForm();" value="Save" type="button" id="Save" name="Save"> </td> </tr> </table> </td> </tr> </table> </form>
</script>
</body> </html>
|
|
-
10-12-2006, 12:50 PM |
-
rcroeder
-
-
-
Joined on 06-21-2004
-
Fremont, CA
-
Posts 149
-
-
|
Re: the editor doesn't seem to pass its content through POST
maybe i am missing something in your code, but you are using
editor.Text = sContent
where are you getting sContent from? You dim it, but I cannot see that you get it (no pun intended)
also i have found if the CuteEditor_Files/include_CuteEditor.asp is not the first include, i tend to have problems.
RC
|
|
-
10-20-2006, 5:12 AM |
-
tomSymbius
-
-
-
Joined on 08-31-2006
-
-
Posts 10
-
-
|
Re: the editor doesn't seem to pass its content through POST
Hi RC, good point, i must admit that the sContent was not in use here, as this form only ADDs data to the db.
Even when i cleared the code of it, result were the same. I even tried to POST the form to itself (i mean - self-page), and use editor.Text = Request.Form("my_cute_editor_id") and it does not pass anything! When i set the editor.Text to, lets say: "..." it appears in the form, and is passed to the next-step-what-ever-it-is.
I can not use the cute include as the first line, because admin set config for session and others.
Guys, it is not only problem with my form, as you can see, there are other people with the same problem. I am just thinking , how is it possible, that the POST data from the editor field is not passed the first time form is submitted and is submitted when you go back a page and submit it again...? I can go-back-and-submit 5... even 10 times... and still receive the previous-submit POST data instead of the current.
I can not build admin CMS tools for a client, who would have to submit once, go back and submit second time to get it right, can i?
This all firefox issue is silly...
I never had any problems that frustrating... actually i never had problems with POST or GET.
|
|
-
10-20-2006, 7:47 AM |
-
tomSymbius
-
-
-
Joined on 08-31-2006
-
-
Posts 10
-
-
|
Re: the editor doesn't seem to pass its content through POST
Hi all...
i have just found what was making all the trouble.
I was using a button and some javascript as a mechanism to call submit on the form.
I have replaced this bit of code: <input type="button"
name="Button" value="Add" onClick="if( document.fm_admin.title.value ==
'' ) alert( 'Please give this programme a title' ); else {
document.fm_admin.action='progs_add_create.asp'; submit(); return true;
}">
with this... <input type="submit" name="Button" value="Add" onClick="if( document.fm_admin.title.value == '' ) { alert( 'Please give this programme a title' ); return false; } else { document.fm_admin.action='progs_add_create.asp'; return true; }">
I was getting nowhere really, comparing the default.asp example with my web page and looking at it... Everything seem to be fine, form has a name, method, id, action... form fields have unique names,ids...
Then i have noticed the submit-calling-code and changed it, works for me!
Regards
|
|
|
|
|