Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2006

Tip: Looking for answers? Try searching our database.

asp.net script failed to execute

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alex D. - 13 Feb 2006 14:10 GMT
Hi guys. this post is related to one from last week but now I have some more
info. I am using a treeview in my app, for some reason the treeview is not
working ok in firefox-mozilla, but is working good in IE. Problem is that
the following javascript code that is inserted at the ende of my page
automatically by asp.net is not being executed or at least I beleave so
because the debugger told me that the variable "TreeView1_Data" was void or
null and obviously that is has no properties. The code:

<script type="text/javascript">
   524 <!--
   525 var pageUrl='/myapp/mypage.aspx;
   526 WebForm_InitCallback();var TreeView1_Data = new Object();
   527 TreeView1_Data.images = TreeView1_ImageArray;
   528 TreeView1_Data.collapseToolTip = "Collapse {0}";
   529 TreeView1_Data.expandToolTip = "Expand {0}";
   530 TreeView1_Data.expandState =
theForm.elements['TreeView1_ExpandState'];
   531 TreeView1_Data.selectedNodeID =
theForm.elements['TreeView1_SelectedNode'];
   532 TreeView1_Data.hoverClass = 'aspnet_s8';
   533 TreeView1_Data.hoverHyperLinkClass = 'aspnet_s7';
   534 for (var i=0;i<19;i++) {
   535 var preLoad = new Image();
   536 if (TreeView1_ImageArray[i].length > 0)
   537 preLoad.src = TreeView1_ImageArray[i];
   538 }
   539 TreeView1_Data.lastIndex = 0;
   540 TreeView1_Data.populateLog =
theForm.elements['TreeView1_PopulateLog'];
   541 TreeView1_Data.treeViewID = 'TreeView1';
   542 TreeView1_Data.name = 'TreeView1_Data';
   543
   544 var WebForm_ScrollPositionSubmit = theForm.submit;
   545 theForm.submit = WebForm_SaveScrollPositionSubmit;
   546
   547 var WebForm_ScrollPositionOnSubmit = theForm.onsubmit;
   548 theForm.onsubmit = WebForm_SaveScrollPositionOnSubmit;
   549
   550 var WebForm_ScrollPositionLoad = window.onload;
   551 window.onload = WebForm_RestoreScrollPosition;
   552 // -->
   553 </script>

Any ideas about why this code is never executed?
Thanks,
Alex.
Christopher Reed - 14 Feb 2006 12:52 GMT
Are the quotes correct on line 525?
Signature

Christopher A. Reed
"The oxen are slow, but the earth is patient."

> Hi guys. this post is related to one from last week but now I have some
> more info. I am using a treeview in my app, for some reason the treeview
[quoted text clipped - 42 lines]
> Thanks,
> Alex.
Alex D. - 14 Feb 2006 21:14 GMT
my mistake while copying-pasting...the quotes are rendered OK

> Are the quotes correct on line 525?
>> Hi guys. this post is related to one from last week but now I have some
[quoted text clipped - 43 lines]
>> Thanks,
>> Alex.
Christopher Reed - 16 Feb 2006 13:15 GMT
Okay, look at view source from the page.  You'll probably see that the
client IDs in the source of your page differs from what you use in your
Javascript.  If you're building this in your application, use the ClientID
property from each object used in your Javascript.

Hope this helps!
Signature

Christopher A. Reed
"The oxen are slow, but the earth is patient."

> my mistake while copying-pasting...the quotes are rendered OK
>
[quoted text clipped - 46 lines]
>>> Thanks,
>>> Alex.
Alex D. - 16 Feb 2006 17:46 GMT
I am sorry when you say ClientID are you talking about some element ID in my
html that differs from the ID used in the javascript? if so...how do you
know that without seen my html..and what element in specific has a wrong ID?
thanks a lot.

> Okay, look at view source from the page.  You'll probably see that the
> client IDs in the source of your page differs from what you use in your
[quoted text clipped - 52 lines]
>>>> Thanks,
>>>> Alex.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.