Skip to content Skip to sidebar Skip to footer

Unable To Read The Selected Drop Down List Value On Page Load After Pressing Browser Back Button

Unable to read the selected drop down list value on page load after pressing browser back button.But this happen only during the first function call. I'll explain in details: When

Solution 1:

your code in page load

 this.Page.ClientScript.RegisterStartupScript(this.GetType(), "onload", "_Initialize_Chart();", true);

is not executed on page load, for it to excecute you need to use url hash function. for it simply use this

where you click on product/image on page there call onclick javascript function i.e.

function getHashOnBack(valueget) 
{
   location.hash = "#backTo=" + $(window).scrollTop();$(document).height();
}

Now, put

$(document).ready(function () 
{
var ab = window.location.hash.substring(1).split("=");
if (ab[0] == "backTo") 
{
 // this would be called automatically when back putton pressed and hav #back=1234   etc. // value in url

 $(window).scrollTop(parseInt(ab[1]));
}
}

Post a Comment for "Unable To Read The Selected Drop Down List Value On Page Load After Pressing Browser Back Button"