Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2009-03-22 21:51:51

0xdeadc0de
New member
Registered: 2009-03-22
Posts: 5

Xinha field not being sent with form?

I'm using xinha in a database form page, in the post file I do foreach($_POST as $key=>$value) to go over all the post information,
but for some reason once a xinha editor loads on a text area that text area won't send with the rest of the form - and savesubmit doesn't work (Just freezes at (Saving...)).

Can someone show me where I screwed up?
Each textarea has a unique id and name, the page looks like:

Notes: Same effect with/without div and with only savesubmit plugin
I had it working before with something very similar neutral

The text area does work without the xinha editor on it

Xinha: SVN At revision 1175. (fresh update just now)
Browser:  Firefox 3.0.7 for Ubuntu
Server: apache2 -v

Server version: Apache/2.2.9 (Ubuntu)
Server built:   Sep 19 2008 13:43:21

Firefox also spits out a few errors
with svn xinha:
5x:
Error: Permission denied to get property XULElement.accessibleType
Source File: http://localhost/xinha/XinhaCore.js
Line: 3322
5x:
Error: Permission denied to get property XULElement.accessibleType
Source File: http://localhost/xinha/XinhaCore.js
Line: 2829
1x:
Warning: Error in parsing value for property 'font'.  Declaration dropped.
Source File: http://localhost/xinha/skins/silva/skin.css
Line: 141
Warning: Error in parsing value for property 'filter'.  Declaration dropped.
Source File: http://localhost/xinha/Xinha.css
Line: 55

With the release xinha:
one of these:
Error: Permission denied to get property XULElement.accessibleType
Source File: http://localhost/xinha/XinhaCore.js
Line: 1173
Warning: Error in parsing value for property 'font'.  Declaration dropped.
Source File: http://localhost/xinha/skins/silva/skin.css
Line: 141

five of:
Error: Permission denied to get property XULElement.accessibleType
Source File: http://localhost/xinha/XinhaCore.js
Line: 1173



<html><head>

<script language="javascript" type="text/javascript" src="/php-business/WebPage/javascripts/datetimepicker.js">

//Date Time Picker script- by TengYong Ng of http://www.rainforestnet.com
//Script featured on JavaScript Kit (http://www.javascriptkit.com)
//For this script, visit http://www.javascriptkit.com

</script>
<!-- Load up the actual editor core -->
<script type='text/javascript'>
    _editor_url  = '/xinha/'  // (preferably absolute) URL (including trailing slash) where Xinha is installed
    _editor_lang = 'en';      // And the language we need to use in the editor.
    _editor_skin = 'silva';   // If you want use skin, add the name here
</script>
<script type='text/javascript' src='/xinha/XinhaCore.js'></script>
<script type='text/javascript'>
    var xinha_editors =
    [
        'basic info:text0-2:directions'
    ];
            
    var xinha_plugins =
    [
        'Linker',
        'SaveSubmit',
        'InsertPicture',
        'InsertWords',
        'Forms',
        'FormOperations',
        'FullPage',
        'ExtendedFileManager',
        'ClientsideSpellcheck',
        'BackgroundImage',
        'Abbreviation',
        'CharCounter',
        'ImageManager',
        'SuperClean',
        'Stylist',
        'Template',
        'Equation',
        'EditTag',
        'DoubleClick',
        'DefinitionList',

        'UnFormat',
        'PreserveScripts',
        'InsertPicture',
        'InsertSmiley',
        'InsertWords',
        'InsertPagebreak',
        'InsertMarquee',
        'InsertAnchor',
        'HorizontalRule',
        'Filter',
        'FindReplace',
        'CharCounter',

    ];
    function xinha_init()
    {
        if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
        var xinha_config = new Xinha.Config();
        xinha_config.width = 250;
        xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
        Xinha.startEditors(xinha_editors);
    }
    Xinha.addOnloadHandler(xinha_init);
</script>
    
<style> <!--
    body           {margin-top: 0; margin-left: 0; margin-right: 0 }
    span.heading   {font-family: arial,helvetica,sans-serif;
                    font-size:   60%; color: gray; }
    span.heading a {text-decoration: none; }
    table.navbar   {border-bottom: 2px black solid; }
--> </style>

</head><body>

<table border='1' style="empty-cells: show;table-layout: fixed;">
<tr>
<form action='editbasic infopost.php' method='POST' enctype='multipart/form-data'>
<input type='hidden' name='referrer' value='editbasic infoform.php?customerid=1'>
</tr><tr>
<td width=250>directions</td>
<td width=400><input type='hidden' name='databasefield' value='directions'>
<input type='hidden' name='MAX_FILE_SIZE' value='2000000'>
<input name='userfile' type='file' id='userfile'>
<input name='upload' type='submit' class='box' id='upload' value=' Upload '>
<div><textarea style='height:100%;width: 100%; height: 100%; top:100px; bottom:100px;' id='basic info:text0-2:directions' name='basic info:text0-2:directions' >Yippie!!!wtf nowww it works.test.<filelink /></textarea></div></td> <!-- This is the textarea malfunctioning -->
<td width=250>signup date</td>
<td width=400><input type='text' value='22-march-2009 00:00:00' style='height:100%;width: 100%; height: 100%; top:100px; bottom:100px;' name='basic info:date:signup date' id='0-3' onblur=''>
<a href='javascript:NewCal("0-3","ddmmmyyyy",true,24)'>
<img src='http://localhost/images/cal.gif' width='16' height='16' border='0' alt='Pick a date'>
</a>
</input></td>
</tr><tr>
<td width=250>first name</td>
<td width=400><div><textarea style='height:100%;width: 100%; height: 100%; top:100px; bottom:100px;' id='basic info:first name' name='basic info:first name' >hrmwtf</textarea></div></td>
</tr></table></form>
</body></html>

Last edited by 0xdeadc0de (2009-03-22 22:20:22)

Offline

#2 2009-03-22 22:37:28

0xdeadc0de
New member
Registered: 2009-03-22
Posts: 5

Re: Xinha field not being sent with form?

It seems to work if I put the form outside the table but I don't want to make a seperate table for each row if I'm displaying multiple forms on a single page sad

Offline

#3 2009-03-23 20:14:22

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Xinha field not being sent with form?

Your HTML is invalid as you discovered

<tr><form action='editbasic infopost.php' method='POST' enctype='multipart/form-data'>

"<form>" is not a valid child of "<tr>" in any specification of HTML.  Write valid HTML!

Move your form outside the table.

Neither is the input allowed in that <tr>, and the <tr> has no cells in it at all.


James Sleeman

Offline

Board footer

Powered by FluxBB