81
kaotik
Re: WYSIWYG editors and get the content
  • 2009/11/19 12:48

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


Quote:

Maybe I can be so impertinent and ask you for a solution to auto-collect all form data with jquery.

That's actually quite easy with a very handy jquery function called serialize:
<script language="javascript">
$(
document).ready(function() { //Finish loading the entire page before processing any javascript
    
$("#subBut").click(function(event) {
        var 
formContent = $("#form1").serialize(); //get all form fields and properly format them for use with $_GET
        
$("#box").load('myserv.php',formContent);
    });
});
</
script>


<
form name="form1" id="form1" method="post" action="">
<
label>Name
  
<input type="text" name="textfield" id="textfield">
  </
label>
  <
input type="button" name="subBut" id="subBut" value="Submit">
</
form>
<
br />

<
div id="box">Ajax call</div>

Now if your form is being generated dynamically, we need to change the click function to $.live:
<script language="javascript">
$(
document).ready(function() { //Finish loading the entire page before processing any javascript
               
$("#subBut").live("click", function() {    
        var 
formContent = $("#form1").serialize(); //get all form fields and properly format them for use with $_GET
        
$("#box").load('myserv.php',formContent);
    });
});
</
script>


<
form name="form1" id="form1" method="post" action="">
<
label>Name
  
<input type="text" name="textfield" id="textfield">
  </
label>
  <
input type="button" name="subBut" id="subBut" value="Submit">
</
form>
<
br />

<
div id="box">Ajax call</div>


let me know if this helps



82
kaotik
Re: WYSIWYG editors and get the content
  • 2009/11/19 11:12

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


All wysiwyg fields are basicly textareas with more options. You could try this with jquery:
switch(n// var n is the editor
{
case 
1:
var 
tst=$("#textarea").val(); //In this case the ID of the wysiwyg textarea is 'textarea'
  
this.addFileParam(file.id'description'tst); //first editor
  
break;
case 
2:
var 
tst=$("#textarea2").val(); //In this case the ID of the wysiwyg textarea is 'textarea'
  
this.addFileParam(file.id'description'tst); //second editor
  
break;
default:
  
//code to be executed if n is different from case 1 and 2
}

In this case I'm doing the switch through javascript, but you could also do it in php.
You can also accomplish this without jquery... you will just need more code



83
kaotik
Ruby on rails anyone?
  • 2009/11/17 14:53

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


Has anyone tried coding with ruby on rails? Do you see an increase in productivity over standard php?

Just curious to see what others have experienced



84
kaotik
Re: disclamer with lift
  • 2009/11/14 13:33

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


Do you mean something like a "slide" effect?
There are several ways of acomplishing this, here's 1:
This uses Jquery:
-Divide your text into a small intro and a larger main body.
-Place each one inside a separate div
-At the bottom of div 1 (with intro text) place a text link that says "read more".
-The bottom div (with main body text) will be hidden, when someone clicks on "read more", the the text will be shown using a "slide" effect.
Here's some of the jquery functions you need:
$.click
$.hide
$.show



85
kaotik
Re: Tutorials: short & per function or long with many functions?
  • 2009/11/13 17:02

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


Thanks for response. I'll continue writing tutorials in the same model.



86
kaotik
Re: Instant-Zero closes its doors
  • 2009/11/13 16:43

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


nice article mamba.
You also make a very good point about supporting module/theme developers. I know from experience just how time consuming it can be to code a module or design a killer theme. Saying thank you shows our appreciation, but, like you said, it doesn't pay the rent, so, if you can, send a small donation.



87
kaotik
Re: Instant-Zero closes its doors
  • 2009/11/13 16:16

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


are all free modules from herve already in XOOPS module repository?



88
kaotik
Tutorials: short & per function or long with many functions?
  • 2009/11/13 11:22

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


A question for all XOOPS users:
Do you prefer short tutorials that exemplify only one jquery function or a longer tutorial that shows several functions working together?

Frankblack: I haven't forgotten your requests :) I'm working them into my new tutorial about JSON.



89
kaotik
Re: PHP-Debugging without XOOPS
  • 2009/11/3 13:14

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


version 1.3 doesn't seem to work with XOOPS 2.4.1
It gives a fatal error.



90
kaotik
ckeditor further integration with xoops
  • 2009/10/29 13:32

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


For ckeditor to upload images to your XOOPS instalation change these in file ckfinder/config.php:
$baseUrl '/ckfinder/userfiles/';
// change to:
$baseUrl XOOPS_URL.'/userfiles/';

$baseDir resolveUrl($baseUrl);
//change to:
$baseDir XOOPS_ROOT_PATH.'/userfiles/';

This will now save all files to a folder called userfiles. You can change this to your own needs (uploads, etc)




TopTop
« 1 ... 6 7 8 (9) 10 11 12 ... 59 »



Login

Who's Online

222 user(s) are online (120 user(s) are browsing Support Forums)


Members: 0


Guests: 222


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits