Giter Site home page Giter Site logo

Comments (11)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
What do you mean 'regular form post'? use lwrte not with textarea?

Original comment by plandem on 5 Mar 2009 at 9:42

from lwrte.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
I've tried to post and works perfect.


Original comment by [email protected] on 8 Mar 2009 at 8:21

from lwrte.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
@jordic: I've searched for the textarea with FireBug and I couldn't find the 
original textarea and I can't request the textarea data from the form post.

@plandern: 'regular form post' means to click the submit button in a HTML-Form.

Original comment by [email protected] on 8 Mar 2009 at 8:50

from lwrte.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
Sure, "original" textarea swapped with iframe at design mode. When user submit 
forms,
then added a hidden field with content of iframe. What's wrong with that? Works 
fine
for me.

Original comment by plandem on 9 Mar 2009 at 3:02

from lwrte.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
I do not agree. I have the same problem with my site. I also think it would be 
bether
if you are editing in de design mode that there is a hidden input field for the 
post.

Now it doesn't work because i use a ajax script.

Original comment by [email protected] on 16 Mar 2009 at 6:17

from lwrte.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
Hi @All

>> When user submit forms, then added 
>> a hidden field with content of iframe. 

FireBug says there's no hidden field in the DOM ;-)

Yesterday, I've looked at the JS Code: When user submits the form, the hidden 
field 
should be added (Line 171: "disable_design_mode(false)" should called on form 
submit). 

But that doesn't work for me. The submit starts before the hidden field is 
placed in 
the DOM. I use jQuery 1.3.2. It doesn't work in IE7, neither in FireFox

Original comment by [email protected] on 27 Mar 2009 at 9:44

from lwrte.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
[deleted comment]

from lwrte.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
Dear plandern,

I also got the same problem. My page loaded thru ajax. Then after I click 
submit, 
the textarea did not submitted to the $_POST variable. the snippets is like 
this...

this page called via ajax call...

script part ...

$(document).ready(function() {

// using validation plugin to validate the form on keyup and submit
var validator = $("#theForm").validate({
    rules: {...},
    messages: {...},
    errorPlacement: function(error, element) {
    },
    submitHandler: function(form) {
        $(form).ajaxSubmit({
            url:        "processform.php",
            type:       "post",
            dataType:   "html",
            success:    function (data) {
            }
        });
    },
    success: function(label) {
    } 
});

var arr = $('.fld_message').rte({
    width: 450,
    height: 200,
    controls_rte: rte_toolbar,
    controls_html: html_toolbar
});

});


html part...

<form id="theForm" name="theForm" autocomplete="off">
<table>
 <tr><td>//some other form element</td></tr>
 <tr>
  <td class="label">
   <label id="lbl_message" for="fld_message">MESSAGE</label>
  </td>
  <td class="field">
   <textarea id="fld_message" name="fld_message" class="fld_message">Some 
text</textarea>*
  </td>
  <td class="status"></td>
 </tr>
 <tr>
  <td class="label"><label class="lbl_submit" for="btn_submit">Submit</label></td>
  <td class="field">
   <input id="btn_submit" name="btn_submit" type="submit" value="Send Email" />
  </td>
 </tr>
</table>
</form>

where did I do wrong? processform.php cannot read $_POST['fld_message'] , the 
script 
works fine when I remove the rte thing. Please help

thanks.

Original comment by [email protected] on 31 Mar 2009 at 1:58

from lwrte.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
Hi, there is form .submit(function(){}) in jquery.rte.js. You make change the 
code
inside and add:

var options= {...}
$(this).ajaxSubmit(options);
return false; 

more info about ajaxSubmit you can find on
http://www.malsup.com/jquery/form/#code-samples

Original comment by [email protected] on 10 Apr 2009 at 10:29

from lwrte.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
HI guys I had the same problem

I was using hte following to submit my form

    $("#savebutton").click(function() {
        var el = $("#page_form");
        el.submit();
    });

a simple change to this worked for me 
    $("#savebutton").click(function() {
        var el = $("#page_form");
        $(".rte").submit();
        el.submit();
    });

the change effectivly tells the .rte elements that they are to consider that a 
submit event is running 

Original comment by [email protected] on 1 Sep 2010 at 2:40

from lwrte.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 16, 2024
Hello,

I also had an issue with the form-post. The lwrte is basing on jQuery - so 
jQuery will only catch it's own internal submit-event! This can lead into 
problems if you have pages with mixed-javascript environment (either another 
framework or external scripts that use the usual submit-way of javascript).

I found the following solution, that will re-route the classic-javascript 
submit onto jQuery-Submit. It may not be the ideal solution - but it works fine.

---[ SNIP ]---
  $(document).ready(function() {
    // INIT RTE, grab each RTE using class "wysiwyg"
    $('.wysiwyg').each(function() {        

      // SUBMIT HANDLER
      var $parentForm = $(this).parents("form");
      if(!nativeSubmit) {
        var nativeSubmit = document.forms[ $parentForm.attr('name') ].submit;
      }

      // MAKE JS-SUBMIT ROUTE THROUGH jQUERY-SUBMIT!
      if($parentForm && document.forms[ $parentForm.attr('name') ]) {
        document.forms[ $parentForm.attr('name') ].submit = function() {
          document.forms[ $parentForm.attr('name') ].submit = nativeSubmit;
          $parentForm.trigger("submit");
        }
      }      

      // RTE
      $(this).rte({
        css: ['default.css'],
        controls_rte: rte_toolbar
      });
    });
  });
  )
}
---[ SNAP ]---

Best regards
Gabriel

Original comment by [email protected] on 14 Jul 2011 at 8:00

from lwrte.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.