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 8758379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:31:58+00:00 2026-06-13T14:31:58+00:00

I have some jQuery that I’m using to open a pop-up window where a

  • 0

I have some jQuery that I’m using to open a pop-up window where a new consignor can be added to the database. The original window has a dropdownlist of all of the current consignors. When you add the new consignor in the pop-up window, that window closes and the original window then reloads the dropdownlist’s data and selects the one just created.

All of that works perfectly. My issue is that when you fill out the rest of the form and submit it, it passes an empty string instead of the value of the selected item. Is this because it’s an ASP.Net script? I don’t know a lot about ASP.Net, but I’ve never had this issue with PHP. Can someone explain how I would go about refreshing the dropdownlist without refreshing the entire page and still get the list to pass it’s value upon form submission?

My javascript code on the page that opens the pop-up and reloads the list is below:

function openConsignorAdd() {
    var url;
    url = "/admin/consignor/csAdd.aspx";
    window.open(url, "WizardWindow", "width=400,height=500,resizable=yes,scrollbars=yes");
}

function loadNewAdded(fn, cs_txt_id) {
    //    var pagePath = window.location.pathname;
    var pagePath = "/admin/getNewList.asp";
    var paramList = "data=";

    //Call the page method
    $.ajax({
        type: "POST",
        url: pagePath + "?type=" + fn + "&cs_txt_id=" + cs_txt_id,
        data: paramList,
        success: function (data) {
            //create jquery object from the response html
            var $response = $(data);
            //query the jq object for the values
            var results = $response.filter('select#results').html();

            if (fn == "consignor") {
                $("select#<%=itemConsigner.ClientID%>").html(results);
            } else if (fn == "cdr") {
                $("select#<%=itemCDR.ClientID%>").html(results);
            }
        },
        error: function () {
            alert("Failed To Refresh!\n\nYou must manually refresh the page.");
        }
    });
}

My javascript code on the pop-up page to refresh the list is:

function refreshOpener(cs_txt_id) {
    window.opener.loadNewAdded("consignor", cs_txt_id);
}

Those both work. And to get the value of my dropdownlist, I simply use:

if (itemConsigner.SelectedValue.ToString() != string.Empty)
{
    itemCsTxtId = itemConsigner.SelectedValue.ToString();
}

with my dropdownlist being:

<asp:DropDownList ID="itemConsigner" runat="server" TabIndex="1"></asp:DropDownList>

If you need more info, just let me know. Any help is appreciated.

  • 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-13T14:32:00+00:00Added an answer on June 13, 2026 at 2:32 pm

    It seems that the issue is that since I am making the change after the page loads, the server does not see my new addition as one of the original options so ignores it completely. This is good so that people cannot just edit your forms I guess. So what I did was instead of getting the value of itemConsigner.SelectedValue, I grab the value for Request.Form["itemConsigner"] with the long ID. That way it doesn’t validate that my submitted option was an original option.

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

Sidebar

Related Questions

I have some jQuery code that is having difficulty running because I'm using it
I have some DIVs that I am using JQuery to hide and show using
I have some content that I am loading using jquery ajax. The content has
I have a script on jquery that load some site in iframe using: $(#demo_frame).attr('src',
I have some jQuery that creates a slideshow using BX slider for an unknown
I have some jQuery that loads a new stylesheet like so... $('head').append('<link rel=stylesheet type=text/css
I have some jquery that inputs text into a database and then clears the
I have some jquery code that is doing an ajax lookup and returning comma
I have some jQuery code that highlights a link when clicked, and changes the
I have some jQuery code that intercepts links clicked on a page: $(document).ready(function() {

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.