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

  • Home
  • SEARCH
  • 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 8663241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:56:14+00:00 2026-06-12T16:56:14+00:00

I have a problem when I use select on change – my variables are

  • 0

I have a problem when I use select on change – my variables are lost… In header is:

function reassignPrescreen(prescreen, closer) {
var prescreen = $('input[name=prescreen]');
var closer = $('input[name=closer]');
var data = 'prescreenid=' + prescreen.val() + '&closer=' + closer.val();
alert(data);
$.ajax({
    type: "GET",
    url: "reassign-prescreen.php",
    data: data,
    success: function (html) {
        alert(html);
    }
});
}

And I have multiple forms in body:

<form action="reassign-prescreen.php" class="psreassign">
<input type="hidden" name="prescreen" value="1">
<SELECT class="chzn-select medium-select select" name="closer" onchange='reassignPrescreen()' data-placeholder="Choose a Closer">
    <OPTION VALUE=""></OPTION>
    <OPTION VALUE="59785">Ron </OPTION>
    <OPTION VALUE="59786">Paul </OPTION>
    <OPTION VALUE="74236">Jack </OPTION>
</SELECT>
</form>
<form action="reassign-prescreen.php" class="psreassign">
<input type="hidden" name="prescreen" value="2">
<SELECT class="chzn-select medium-select select" name="closer" onchange='reassignPrescreen()' data-placeholder="Choose a Closer">
    <OPTION VALUE=""></OPTION>
    <OPTION VALUE="59785">Ron </OPTION>
    <OPTION VALUE="59786">Paul </OPTION>
    <OPTION VALUE="74236">Jack </OPTION>
</SELECT>
</form>

....ETC...

Now I always get prescreen as 1 and closer as UNDEFINED value ??

  • 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-06-12T16:56:15+00:00Added an answer on June 12, 2026 at 4:56 pm

    Modified code. closer is a select box not input. jsfiddle

    function reassignPrescreen(self){
    
        var form = $(self).parents("form:first");
        var prescreen = $('input[name=prescreen]', form );
        var closer = $('select[name=closer]', form);
        var data = 'prescreenid=' + prescreen.val() + '&closer=' + closer.val();
        alert(data);
        $.ajax({
            type: "GET",
            url: "reassign-prescreen.php",
            data: data,
            success: function (html) {
                alert(html);
            }
        });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use emacs 24 (OSX) and have a problem with shift-selection. If I select
I have a problem with expanding JTree nodes. I start when use selects a
i have problem use link_to_remote link_to_remote document example say link_to_remote Delete this post, :update
I'm new in codeigniter I have problem I use my OS X Lion, and
I have problem with setting proper charset on my jsf pages. I use MySql
In a couple of scripts that I use I have problem that is intermittent.
recently I started to use XNA with MonoMac. I have problem with classes. I
I have a problem when try to use hashtable with large data. I have
I have a problem right now with CodeIgniter : I use the REST Controller
As the title says, I have a problem with binding to a change in

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.