tomtimms Posted May 12, 2011 Share Posted May 12, 2011 I am trying to replace a [href] attributes with php code in a jquery return. Here is what I have so far. $('#account_setting').attr('href', '<?PHP url_for('Account/Settings/site_id/'+data) ?>'; I am not sure what I have wrong, as it gives me "missing )" error code. Quote Link to comment Share on other sites More sharing options...
gristoi Posted May 12, 2011 Share Posted May 12, 2011 $('#account_setting').attr('href', '<?PHP url_for('Account/Settings/site_id/'+data)) ?>'; Quote Link to comment Share on other sites More sharing options...
Maq Posted May 12, 2011 Share Posted May 12, 2011 You also probably have to escape the single quotes inside your url_for function parameter. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.