CI and Jquery Loop wont work...

so how can i pass this " $('#myinput').val($(this).text()); " into a PHP variable??

[eluser]Thorpe Obazee[/eluser]
oh... I misunderstood what you meant.
[quote author="r3yn" date="1245329902"]I mean I need to pass this variable '$p_field->name' to the value of <input type="text"> fields within the same page.,

So that when I click a menu(from a loop)., a dialog box can determined what menu I had clicked, and pass to a php variable so that active records can be done.,.[/quote]
You could use Ajax.

but how???

[eluser]Thorpe Obazee[/eluser]
[quote author="r3yn" date="1245331239"]but how???[/quote]You could try reading up on Javascript or jQuery, Mootools, etc.

Edit: Using jQuery
    var text = $('#yourinput').val($(this).text());
        type: "POST",
        url: <?php echo base_url().'here/there/';?>,
        data: "variable=" + text,
        success: function(msg){
            alert( "Data Saved: " + msg );

how to use ajax with codeigniter?

[eluser]Thorpe Obazee[/eluser]
[quote author="r3yn" date="1245334749"]how to use ajax with codeigniter?[/quote]

CI is PHP. If you know how to use PHP w/ Ajax then it's just the same. Here's a link to Derek Allard's tutorial using Prototype.

cam you give me a concise overview about this.??

[eluser]Thorpe Obazee[/eluser]
[quote author="r3yn" date="1245335401"]cam you give me a concise overview about this.??[/quote]

I suggest you read up on PHP and Ajax.

Thanks.., I already have the idea...

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.