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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:40:57+00:00 2026-06-06T07:40:57+00:00

I’m trying to use __doPostBack to pass some data from client to server side.

  • 0

I’m trying to use __doPostBack to pass some data from client to server side. I’m not very expierenced with JS, but when debugging in Firebug something wierd is happening. I’ll show my code first.

<script type="text/javascript">
function BeginDownload() {
        var temp = $("#waterwheel-carousel-horizon").CurrentSelectedImg().toString()
        __doPostBack("ImgDownload", temp);
}
</script>

Here’s the relevant jquery I’m attempting to call.

// Relevant Waterwheel jquery code.
$.fn.CurrentSelectedImg = function () {
        return data.currentCenterItem.data().index; };
$.fn.waterwheelCarousel = function (options) {

        // override the default options with user defined options
        options = $.extend({}, $.fn.waterwheelCarousel.defaults, options || {});

        return $(this).each(function () {

            /* These are univeral values that are used throughout the plugin. Do not modify them
            * unless you know what you're doing. Most of them feed off the options
            * so most customization can be achieved by modifying the options values */
            var data = {
                itemsContainer: $(this).find(".carousel-images"),
                totalItems: $(this).find(".carousel-images img").length,
                containerWidth: $(this).width(),
                containerHeight: $(this).height(),
                currentCenterItem: null,
                items: [],
                itemDistances: [],
                waveDistances: [],
                itemWidths: [],
                itemHeights: [],
                itemOpacities: [],
                carouselRotationsLeft: 0,
                currentlyMoving: false,
                itemsAnimating: 0,
                currentSpeed: options.speed,
                intervalTimer: null
            };

            // Setup the carousel
            beforeLoaded();
            // Preload the images. Once they are preloaded, the passed in function
            // will be called and the carousel will be setup
            preload(function () {
                setupDistanceArrays();
                setupCarousel();
                setupStarterRotation();
            });

And the code behind the scenes. It’s not being reached at the moment.

// This code is currently not reached, but I put it here for completion.
#region EventTarget
private string EventTarget
{
    get{
        return Request.Form["__EVENTTARGET"].ToString().ToUpper();
    }            
}
#endregion EventTarget

#region HandlePostBack
void HandlePostBack()
{
    switch (EventTarget)
    {
        case "ImgDownload":
            DownloadImage(EventArgs);
            break;
    }
}
#endregion HandlePostBack

private void DownloadImage(string index)
{
    string test = index;
}

Ultimately what happens is that I click the linkbutton and firebug jumps to the first line of code, but before it even finishes that function it suddenly jumps to __doPostBack function’s code before I even pass in the variables. Why is this happening?

I should also mention I’m doing this in DNN if that makes a difference. I think the problem might be the way I formed that jquery function or how I’m calling it.

  • 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-06T07:41:01+00:00Added an answer on June 6, 2026 at 7:41 am

    Found the problem. I just had to move where my jquery was placed in the code. I think it just wasn’t inside some bracket so it couldn’t see data. Lack of intellisense and disorganized code strikes again! Now to write that download function.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want to construct a data frame in an Rcpp function, but when I
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I have some data like this: 1 2 3 4 5 9 2 6
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

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.