how to get value from javascript on page load event
-
Hi all, On asp.net page load i am calling a javascript function on window.onload function. In this function i am assigning some values to hidden field and when i am trying to read this value from page behind it return "".I am trying to access the hidden fiedl value on page load. string value= hiddentxt.value; but value returns "". Will anybody help me to solve the problem? Thanks
People Laugh on me Because i am Different but i Laugh on them Because they all are same.
-
Hi all, On asp.net page load i am calling a javascript function on window.onload function. In this function i am assigning some values to hidden field and when i am trying to read this value from page behind it return "".I am trying to access the hidden fiedl value on page load. string value= hiddentxt.value; but value returns "". Will anybody help me to solve the problem? Thanks
People Laugh on me Because i am Different but i Laugh on them Because they all are same.
Are you checking the value on postback, or on the first load of the page ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Are you checking the value on postback, or on the first load of the page ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
on the first page load.
People Laugh on me Because i am Different but i Laugh on them Because they all are same.
-
on the first page load.
People Laugh on me Because i am Different but i Laugh on them Because they all are same.
You post here a lot to not know anything about how ASP.NET works. You should buy a good book and read it. When your page is rendered, it's because it's been delivered the HTML to render it., Which means that ASP.NET has already run the full page lifecycle, and generated the HTML. I don't see how else it could work, or why you'd think it would work differently. What you want to do is impossible. You want the onload event to fill a property, before your code has generated the page.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
You post here a lot to not know anything about how ASP.NET works. You should buy a good book and read it. When your page is rendered, it's because it's been delivered the HTML to render it., Which means that ASP.NET has already run the full page lifecycle, and generated the HTML. I don't see how else it could work, or why you'd think it would work differently. What you want to do is impossible. You want the onload event to fill a property, before your code has generated the page.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Yes, that's right. So, there's no way you can read it in your page load, for the first cycle, because, as you said, it gets read into the hidden field AFTER the page has run on the client side.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Yes, that's right. So, there's no way you can read it in your page load, for the first cycle, because, as you said, it gets read into the hidden field AFTER the page has run on the client side.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Is it a popup?what u r trying to achieve?whats ur requirement?i mean r u trying to pass values from another page?tell me your requirement so that we can try to find out a solution...
Arun Jacob http://codepronet.blogspot.com/
-
Yes, that's right. So, there's no way you can read it in your page load, for the first cycle, because, as you said, it gets read into the hidden field AFTER the page has run on the client side.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Ok thanks
People Laugh on me Because i am Different but i Laugh on them Because they all are same.