Yii Framework Forum: I would like my ajax link to take a jquery variable that I am passing - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

I would like my ajax link to take a jquery variable that I am passing Rate Topic: -----

#1 User is offline   bleu 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 199
  • Joined: 23-July 11

  Posted 16 October 2011 - 06:05 AM

I would like my ajax link to take a jquery variable that I am passing

echo CHtml::ajaxLink(
	'Send',          // the link body (it will NOT be HTML-encoded.)
	array('Details/ex', 'id'=>$id), 
	array(
		'update'=>'#form2',




	),array('id'=>'someid', 'class'=>'someanotherclass')
);



I want in 'id'=>$id . $id to have my jquery variable



My Jquery function

$(function() {$( ".xpr" )
			//.button()
			.click(function() {
				$( "#form2" ).dialog( "open" );


                                   pos = this.id;                                 

			});



All of the above is done without reloading the page

How can I achieve this?
0

#2 User is offline   bleu 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 199
  • Joined: 23-July 11

Posted 17 October 2011 - 03:32 AM

Any Help?
0

#3 User is offline   kokomo 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 289
  • Joined: 23-July 10

Posted 17 October 2011 - 06:23 AM

What you want (javascript var to php var) is only possible with some workarounds cause PHP is on the server and javascript is on the client.

Read some of the google - javascript var to php search results and you should find a solution.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users