Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6087357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:51:42+00:00 2026-05-23T11:51:42+00:00

I have a drop down list <?php echo CHtml::dropDownList(‘adj’, $adj, $adjudicators, array(‘id’=>’adjudicator’)); ?> which

  • 0

I have a drop down list

<?php echo CHtml::dropDownList('adj', $adj, $adjudicators, array('id'=>'adjudicator')); ?>

which holds a number of choices.

I want to get the current value of that drop down and use is as a parameter in my link.

array('name'=>'Assign', 'type'=>'raw', 'value'=>'CHtml::ajaxLink(\'Assign\',array(\'pwdApplication/assignApp\'), array(\'type\'=>\'POST\', \'data\'=> array(\'id\'=>$data->id, \'flag\'=>1, \'adj\'=>\'{getAdj()}\',), \'success\'=>"function(result) {$(this).html(\'Assigned\'); }",))'),

Here is the javascript function

<script>
function getAdj() {
return $('#adjudicator').val();
}
</script>

The link is a column in a CGridView. I’m not able to get the proper value.

Thanks for the help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:51:42+00:00Added an answer on May 23, 2026 at 11:51 am

    The link is created in PHP (before your content reaches the browser). The “current value of the dropdown” is something that only has meaning after your content reaches the browser (and the user can select something from the menu). Therefore, the problem as stated cannot be solved at all with PHP.

    You need to make the link execute some JavaScript, which would see what the currently selected item is on the spot, create a URL with this information, and navigate to this URL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a drop down list which is populated dynamically from database table i.e
I have a drop-down list with known values. What I'm trying to do is
I have a drop down list where users can select a theme for the
I have a drop down list that has options that need to be passed
I have a drop down list that triggers an updatepanel when the index is
I have a drop-down list hardcoded in an MVC View User Control page and
Suppose I have a drop-down list like: <select id='list'> <option value='1'>Option A</option> <option value='2'>Option
If I have a drop down list as follows <div class=editor-label> <%= Html.DropDownListFor(model =>
I'm using classic asp, I have a drop down list that the user selects
I have about 10 drop down list controls that get populated. Instead of copying/pasting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.