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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:41:35+00:00 2026-06-11T03:41:35+00:00

I have a web page that has a Folder Picker pop up. It allows

  • 0

I have a web page that has a Folder Picker pop up. It allows the user the select a folder on the website, and then track changes to its contents.

I need to pass the value from the pop-up, which is returned to me in JavaScript, and pass that to a server side method.

AJAX is not available for this, as I’m working with SharePoint.

I get the data I need from a callback in JavaScript, but if I try to set $(control).text(), this doesn’t work.

Can I set the value of a label (rendered as a span) somehow and pass that back onClick?

Current working Code:

$('.tile').on("click", ".LibraryPickerInitiator", function () {
    var hiddenField = $(this).siblings('[type=hidden]');
    var callback = $.proxy(function (s) { this.val(s); }, hiddenField);
    LaunchPickerTreeDialog('CbqPickerSelectListTitle', 'CbqPickerSelectListText', 'websLists', '', '/', '', '', '', '/_layouts/images/smt_icon.gif', '', callback, '', '');
});

Markup:

<div id="WebSettings" class="WebSettings" runat="server">
    <div class="LibraryPickerInitiator">Pick a Library</div>
    <asp:HiddenField ID="HiddenField1" runat="server" />
    <asp:Label ID="TreePickerLabel" CssClass="PickerPlaceHolder" runat="server" Text="No List Selected"></asp:Label>
    <asp:Button ID="SubmitList" runat="server" Text="Get List Data" onclick="SubmitList_Click" />
</div>

Event:

protected void SubmitList_Click(object sender, EventArgs e)
{
    string pickerData = HiddenField1.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-11T03:41:37+00:00Added an answer on June 11, 2026 at 3:41 am

    I see no reason you cannot, I would use $.proxy when creating the callback to ensure a proper scope:

    var callback = $.proxy(function (s) {
        this.html(s); 
    }, sisterLabel);
    

    If you add a hidden input to the markup you could change you client code something like this:

    var sibs = $(this).siblings();
    
    var callback = $.proxy(function (s) {
        this.label.html(s); // set label text
        this.hidden.val(s); // set hidden field val
    }, { label: sibs.filter('span'), hidden: sibs.filter(':input:hidden') });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a sub folder that has an aspx page and a web.config file
I have web forms page that has 2 controls. A gridview and an associated
I have created a web page that has two bars across the top of
I have a simple jQuery code that runs on a web page that has
I have a web application that has a page that loads the content from
I have a ASP.NET web page that contains many textboxes. Each textbox has a
new on rails and using windows for now,, i have web page that user
I have a folder on a hosted web server that has an index.html file
I have a website that has 2 files as follows: page.aspx page.aspx.cs It used
I have a web application that has a configuration folder that houses multiple XML

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.