473,748 Members | 2,223 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript and Update Panels

27 New Member
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 1437
Frinavale
9,735 Recognized Expert Moderator Expert
Is the JavaScript an embedded resource?
Nov 5 '08 #2
Gotejjeken
27 New Member
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
1454
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 like folder tabs at the top that are client side buttons. For each button I have a panel with different server side controls on it. When a button is hit I want to make the appropriate panel visible and the rest of the panels invisible (or maybe I...
1
1192
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, and I used input form for that... Now in asp.net 2.0 I can't use input forms because I could not get the information that I need from thay using the framework (in this case using
1
5715
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 record its also updated but after that if I try to navigate it its giving error "Row cannot be located for updating. Some values may have been change since it was last read". My code is as follows - Option Explicit Dim cnn As Connection Dim...
0
1048
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 progress gets called. thanks, gomzi.
1
9184
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 Trigger to listen when GridView A posts back from a Select button. This works fine. I can get the Postback from GridView B and I am able to update formatting of GridView B in it's PreRender Event.
3
3806
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 several things like adding an onload javascript event to one of the controls in the update panel, and I've tried adding a lteral control to the update panels ContentTemplateContainer.Controls collection where the literal controls contents where...
5
3445
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 execute a particular javascript function (client-side). THis is supposed to work. I've done it hundreds of times otherwise, but never in an update panel (until now). It doesn't work. I put an alert in the top of my javascript function, and it never...
1
2023
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 on my site... <script type='text/javascript'> var sessionTimer; function StartSessionTimer() {
1
1390
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 those buttons get clicked all three tables are updated. ( Buttons 1 2 and 3 are outside the panels ). How can I get ONLY the relevent panel to update ??
2
2742
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 associatedupdatepanel to second one which has next button. so when i run the project there is a updateporgreess image but it is not doing anything it just kept on rolling witghout any result i did bind the button to updatepanel1...but that was of...
0
8822
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9359
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9236
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8235
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6792
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6072
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4592
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.