Announcement

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

#1 2008-11-17 10:28:01

Ozone
New member
Registered: 2008-11-17
Posts: 1

FF3: Can't get posted data with javaScript:document.Form1.submit()

Hello

I can't get posted data from xinha's "TEXTAREA" if i used the submit méthode : <A HREF='javaScript:document.Form1.submit()' onClick="document.Form1.submit();">

For eg:

<!-- Start Formulary //-->
<form name="Form1" action="?do=AdminEditIt " method=post>
<!-- START InputHiddenZone //-->
<input type="hidden" name="doIt" value="true" >
<input type="hidden" name="Id" value="Test" >

<!-- START InputTextAreaZone //-->
  <script type="text/javascript">

    _editor_url  = "Lib/xinha/"  // (de préférence absolue) URL (incluant le slash de fin) où Xinha est installé
    _editor_lang = "fr";      // Et la langue que nous voulons utiliser dans l'éditeur.
</script>
  <script type="text/javascript" src="Lib/xinha/XinhaCore.js"></script>
  <script type="text/javascript" src="Core/View/HtmlEditor/xinha/XinhaConfig.js"></script>
<br>

<TEXTAREA rows="20" cols="60" name="_Text" id="myTextArea">
Hello
</TEXTAREA>
<!-- END   InputTextAreaZone //-->

<!-- START AnimatedButton //-->
<script LANGUAGE="JavaScript">
<!--
function change(Name,Image,No) {
     if (Browser == "n3" || Browser == "ie4") document [Name].src = eval(Image + No + ".src");
}
//-->
</SCRIPT>

<script LANGUAGE="JAVASCRIPT">
<!-- cloak
 Name = navigator.appName;
 Version = parseInt(navigator.appVersion);
 if (Name == "Netscape" && Version >= 3)
         Browser = "n3";
 else
         Browser = "n2";
 if (navigator.appName.substring(0,9) == "Microsoft" && Version >= 4)
        Browser = "ie4";

 if (Browser == "n3" || Browser == "ie4") {
     DoIt0 = new Image();
     DoIt0.src  = "Themes/Default/Images/buttons/b0_OK.gif";
     DoIt1 = new Image();
     DoIt1.src  = "Themes/Default/Images/buttons/b1_OK.gif";
    }
    //-->
    </SCRIPT>
    <A HREF='javaScript:document.Form1.submit()' onMouseover="change('DoIt','DoIt',1)" onMouseout="change('DoIt','DoIt',0)" onClick="document.Form1.submit();"><img src='Themes/Default/Images/buttons/b0_OK.gif' border=0 NAME="DoIt"></A>
      
<!-- END AnimatedButton //-->

</form>
<!-- End Formulary //-->

</form>

on my PHP code using "print_r($_REQUEST)" i have something like :
   Array ( [do] => AdminEditIt [doIt] => true [Id] => Test )
the [_Text] is missing...

I'm using xinha 0.95 package
I have this problem on firfox 3.0.4 but not on IE 6.0

here is my Core/View/HtmlEditor/xinha/XinhaConfig.js file :

/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */
xinha_editors=null;
xinha_init=null;
xinha_config=null;
xinha_plugins=null;
xinha_init=xinha_init?xinha_init:function(){
xinha_editors=xinha_editors?xinha_editors:["myTextArea"];
xinha_plugins=xinha_plugins?xinha_plugins:["CharacterMap","ContextMenu","ListType","Stylist","Linker","SuperClean","TableOperations",'ImageManager','ExtendedFileManager'];
if(!Xinha.loadPlugins(xinha_plugins,xinha_init)){
return;
}

xinha_config=xinha_config?xinha_config():new Xinha.Config();
xinha_config.pageStyleSheets=[_editor_url+"examples/full_example.css"];
xinha_editors=Xinha.makeEditors(xinha_editors,xinha_config,xinha_plugins);
Xinha.startEditors(xinha_editors);
};
Xinha._addEvent(window,"load",xinha_init);

Last edited by Ozone (2008-11-17 10:50:30)

Offline

#2 2008-11-17 12:42:42

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: FF3: Can't get posted data with javaScript:document.Form1.submit()

Sorry, I tried hard, but I could not reproduce your problem. However I would advise you to massively clean up your code.

Offline

Board footer

Powered by FluxBB