CodeIgniter Forums
Jquery and PHP help.. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Jquery and PHP help.. (/showthread.php?tid=19756)



Jquery and PHP help.. - El Forum - 06-17-2009

[eluser]1mr3yn[/eluser]
Code:
foreach( $partners as $p_field) {

      print "<span class=\"partners\"><a href="">$p_field->name</a></span>";
  }

// script

$('document').ready(function(){
     $(".partners").click(function(e) {
            e.preventDefault();
            $('.detail_dialog').dialog('open');
      });
});

How can i submit the value of the class 'partners' on the php form within the same page.
So that the form can recognize what menu I had click,.??


Jquery and PHP help.. - El Forum - 06-18-2009

[eluser]OES[/eluser]
An easy way would be to add ID's to your links.

Code:
foreach( $partners as $p_field) {

      print "<span class=\"partners\" id=\"$p_field_name\"><a href="">$p_field->name</a></span>";
  }

// script

$('document').ready(function(){
     $(".partners").click(function(e) {
       e.preventDefault();
       var clicked = this.id;            
       $('.detail_dialog').dialog('open');
     });
});

Then in this example clicked will hold the ID of the clicked link.

Hope this helps.


Jquery and PHP help.. - El Forum - 06-21-2009

[eluser]marjune[/eluser]
dudez


Jquery and PHP help.. - El Forum - 06-21-2009

[eluser]Thorpe Obazee[/eluser]
[quote author="marjune" date="1245661601"]dudez[/quote]

Wow you have the same website as r3yn.


Jquery and PHP help.. - El Forum - 06-21-2009

[eluser]1mr3yn[/eluser]
Quote:Wow you have the same website as r3yn
.

He's just a friend of mine. And my groupmate when we develop that proposed study., which us the website... just ignore it.