Sorry, I can't look at their source code. Maybe you should contact the author of the library. From the documentation, it seems like they're doing a lot at load time, and when we update the page, this script does not re-run. So the updated grid did not get the
initialization phase that happened on the first request. So maybe all you need to do is re-trigger that initialization phase somehow.
Bertrand
----
This posting is provided "AS IS" with no warranties, and confers no rights.
Still, Atlas and javascript problems... here's how to recreate. As you can see, I added a simple javascript function that is not being called from anywhere on my page. When I comment out the javascript function, the code mysteriously works.
What gives? Any suggestions?
VS 2005 version 8.0.50727.42
.NET Framework version 2.0.50727
Atlas
A simple javascript function in the head of the html document
<script language="javascript">
function sayHelloAlex(){
for(i = 0; i < 5; i++){
alert('Hello Alex');
}
}
</script>
<script type="text/javascript">
/* <!CDATA[[ */
function sayHello() {
for(var i=0; i < 5; i++) {
alert("heya i should have used the firefox javascript console =)");
}
}
/* ]]> */
</script>
I also have similar problems. I have javascripts inside the master page and obviously it conflicts with Atlas.
But as Atlas is too powerful I have finally test every pieces of javascripts and throw away those that have conflicts!
For example, I need to throw away the following code which is used to check/uncheck all checkboxes in the Gridview. My opinion is that there are often conflicts for new techs and I am already very satisfied with what I can get for now as lots of people are
already putting efforts for this and it's totally free.
//SelectAllCheckboxes: function to select all the checkboxes in the GridView
function SelectAllCheckboxes(spanChk){
// Added as ASPX uses SPAN for checkbox
var oItem = spanChk.children;
var theBox= (spanChk.type=="checkbox") ?
spanChk : spanChk.children.item[0];
xState=theBox.checked;
elm=theBox.form.elements;
for(i=0;iif(elm[i].type=="checkbox" &&
elm[i].id!=theBox.id)
{
if(elm[i].checked!=xState)
elm[i].click();
}
}
the javascript problem is related with the fact that currently the head section content (ie, everything that's placed inside the <head> element) is packaged on the xml response that is sent from the server during a partial postback (that is, if the head
has the runat="server" attribute applied to it). unfortunatelly, this content isn't escaped by using a cdata section. so what happens is that wehn you put invalid xml, the xml error will be silently handled by the client side and you won't get any update (though
i think that now you 'll get an error message that says unknown error).
if you look at your script block, you'll see a for cicle where you're using a < operator. this is a forbidden xml char and you must escape it so that you don't get an error. another option is removing the script from the head element or putting it in an
external file.
--
Regards,
Luis Abreu
email: labreu_at_gmail.com
EN blog:http://msmvps.com/blogs/luisabreu
bleroy
All-Star
15617 Points
2302 Posts
Re: Atlas causing javascript conflicts?
Jan 27, 2006 06:28 PM|LINK
----
This posting is provided "AS IS" with no warranties, and confers no rights.
JohnRock
Member
5 Points
1 Post
Re: Atlas causing javascript conflicts?
Apr 28, 2006 11:57 AM|LINK
VS 2005 version 8.0.50727.42
.NET Framework version 2.0.50727
Atlas
A simple javascript function in the head of the html document
<script language="javascript"> function sayHelloAlex(){ for(i = 0; i < 5; i++){ alert('Hello Alex'); } } </script>----------------------------------------------------------------------------------------
Code-behind:
Protected Sub btnAddComment_Click(ByVal sender As Object, ByVal e As System.EventArgs) Label1.Text = "You just clicked the button" End Subvivus
Member
50 Points
10 Posts
Re: Atlas causing javascript conflicts?
May 12, 2006 03:34 PM|LINK
<script type="text/javascript"> /* <!CDATA[[ */ function sayHello() { for(var i=0; i < 5; i++) { alert("heya i should have used the firefox javascript console =)"); } } /* ]]> */ </script>singcall
Member
10 Points
2 Posts
Re: Atlas causing javascript conflicts?
Jun 20, 2006 03:56 AM|LINK
I also have similar problems. I have javascripts inside the master page and obviously it conflicts with Atlas.
But as Atlas is too powerful I have finally test every pieces of javascripts and throw away those that have conflicts!
For example, I need to throw away the following code which is used to check/uncheck all checkboxes in the Gridview. My opinion is that there are often conflicts for new techs and I am already very satisfied with what I can get for now as lots of people are already putting efforts for this and it's totally free.
//SelectAllCheckboxes: function to select all the checkboxes in the GridView function SelectAllCheckboxes(spanChk){ // Added as ASPX uses SPAN for checkbox var oItem = spanChk.children; var theBox= (spanChk.type=="checkbox") ? spanChk : spanChk.children.item[0]; xState=theBox.checked; elm=theBox.form.elements; for(i=0;iif(elm[i].type=="checkbox" && elm[i].id!=theBox.id) { if(elm[i].checked!=xState) elm[i].click(); } }yendi
Member
23 Points
7 Posts
Re: Atlas causing javascript conflicts?
Jul 22, 2006 04:16 AM|LINK
without ANY luck.
Is there any way to accomplish running a javascript script inside an Update Panel?
Help is really appreciated. I really need this to work!
THANKS!
Luis Abreu
All-Star
25674 Points
5369 Posts
MVP
Re: Atlas causing javascript conflicts?
Jul 23, 2006 09:54 PM|LINK
hello guys,.
the javascript problem is related with the fact that currently the head section content (ie, everything that's placed inside the <head> element) is packaged on the xml response that is sent from the server during a partial postback (that is, if the head has the runat="server" attribute applied to it). unfortunatelly, this content isn't escaped by using a cdata section. so what happens is that wehn you put invalid xml, the xml error will be silently handled by the client side and you won't get any update (though i think that now you 'll get an error message that says unknown error).
if you look at your script block, you'll see a for cicle where you're using a < operator. this is a forbidden xml char and you must escape it so that you don't get an error. another option is removing the script from the head element or putting it in an external file.
Regards,
Luis Abreu
email: labreu_at_gmail.com
EN blog:http://msmvps.com/blogs/luisabreu