C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » JavaScript »

RegisterStartupScript


Posted Date: 04 Jul 2008      Posted By: abirami      Member Level: Gold     Points: 1   Responses: 1



Im working in Visual studio .Net 2005.Im using this following code to call a script automatically in my page load event, where the page is loading when a pop up window is closed(ie:that pop up window is child window for this particular page). the script is :

this.Page.RegisterStartupScript("PollScript", "<script language='JavaScript'>PollClick('" + strPollansid + "','" + divPoll.ClientID + "');</script>");

but when the page is loading after clicking the close button in popup window.
the script is not calling. Instead if i refresh the page/debug the page again its calling by that time.
can any one give me a solution for this...?





Responses

Author: venkatesan    04 Jul 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 3

hai

i think u had written on page load only so whenever the page has been post back the script has been called

if u want the script to be ope n on button click write the script on button click event..

Regards,
M.Venkatesan.
Dot Net Code Snippets



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Vertical Scroll Bar
Previous : how to call a proxy class method from jscript
Return to Discussion Forum
Post New Message
Category: JavaScript

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use