473,396 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Javascript and Update Panels

I've been using the Dojo Toolkit to implement Drag and Drop in my page, and all works fine until an asynchronous postback occurs, then the Javascript stops functioning. In my .NET page I have this in my Page_Load:

Expand|Select|Wrap|Line Numbers
  1.  ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "dojo", "<script type='text/javascript' src='/Pages/dojosource/dojo/dojo.js' djConfig='parseOnLoad: true'></script>", false);
  2.  
  3. ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "dojo_required", "dojo.require('dojo.dnd.Source'); dojo.require('dojo.parser');", true);
  4.  
This loads the script dynamically fine, but an asynch postback still causes my Javascript not to function. Is there any way to load these files dynamically and have them function after such a postback?
Nov 5 '08 #1
2 1420
Frinavale
9,735 Expert Mod 8TB
Is the JavaScript an embedded resource?
Nov 5 '08 #2
The Javascript is just sitting in a folder called dojosource. I then want to reference that folder and compile the dojo.js class, and then the two other required classes. As mentioned this works fine on a normal postback but gets messed up if an UpdatePanel is used.
Nov 5 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Tina | last post by:
I don't write much javascript so I was hoping to get some direction here on how best to approach a problem. I want to do a tab folder approach where maybe I have some image buttons that look...
1
by: Bruno Alexandre | last post by:
Hi guys... I'm always help the comunity, but this time it is me that need help :-( in the old Classic ASP I usted to have javascript to for example populate a 2nd dropdown from a 1st one,...
1
by: komatouch09 | last post by:
Hi I am new to visual basic. I write program to navigate & update data from table. My database is in Informix & use ODBC connection. When I nevigate the data it works properly. When I Update the...
0
by: gomzi | last post by:
hi, I have two update panels in my page, i would like the update progress to be shown only for one the panels. Right now, when either of the update panel gets updated with new data, the update...
1
by: gabe | last post by:
How do you call a client side javascript callback method after an update panel has posted back to the server? I have two update panels (A + B) with a gridview in each panel. GridView B has a...
3
by: Jeremy | last post by:
I've got a button in an update panel. In the click event of the button (server side code), I perform some logic and under certain criteria I want to display an alert to the user. I've tried...
5
by: HockeyFan | last post by:
We have an update panel that has a gridview with checkboxes and other items in each row. We went to the RowCreated event in the codebehind, to set an attribute on a checkbox in each row, to...
1
by: Joey | last post by:
Hey guys, here's what I have... To help manage browser windows with session state on the server, I have some javascript code in one of my master pages that gets planted into most (content) pages...
1
by: Microsoft Newsserver | last post by:
HI Im developing a solution in vs2005 with ajex extensions. Essentially I have three custom controls which render tables a representation as shown below. The problem is that when any of...
2
by: splendid9 | last post by:
how to associate 1 update progress to 2 update panels on a page. .i have a update panel which has a usercontrol inside that and the other update panel has a nextbutton and the update progress...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.