Showing posts with label bug. Show all posts
Showing posts with label bug. Show all posts

Wednesday, March 28, 2012

Atlas web service proxy undefined - bug or mistake?

Ok, here's the deal: I have javascript method that is called on the window's load event:

window.onload = function () { getDataForTable();};

Pretty striaghtforward, right? Well, when the getDataForTable method executes it calls an Atlas proxy method:

WebServices.Callbacks.CalendarFunctions.CheckDate(dateField.value, getDataForTable_Callback);
But when the script execute on load, I get an error stating that 'WebServices' is not defined. When I check the HTML output the Atlas javascript reference is there: "text/xml-script">"http://schemas.microsoft.com/xml-script/2005"> <references> <add src="http://pics.10026.com/?src=/Anthem/Callback/CalendarFunctions.asmx/js"/> "text/xml-script">"http://schemas.microsoft.com/xml-script/2005"> <references> <add src="http://pics.10026.com/?src=/Anthem/Callback/CalendarFunctions.asmx/js"/>
<script type="text/xml-script"><page xmlns:script="http://schemas.microsoft.com/xml-script/2005"> <references> <add src="/Anthem/Callback/CalendarFunctions.asmx/js" /> </references> <components /></page></script>
And when I hit the URL above the javascript there looks correct:
Type.registerNamespace('WebServices.Callbacks'); WebServices.Callbacks.CalendarFunctions=new function() {this.path = "http://localhost:64408/Project/Callback/CalendarFunctions.asmx"; this.appPath = "http://localhost:64408/Anthem/"; var cm=Sys.Net.ServiceMethod.createProxyMethod; cm(this,"CheckDate","date"); }

So... here is the question: why is this undefined? I think this is a bug because when I debug the script the ".asmx/js" script is not loaded in the script explorer window like other referenced scripts. So, any work arounds? How else do I get this call to execute during the window.onload event?

Thanks in advance for the help.

The best thing to do I think is to install something like fiddler, and verify that the request going out is in the form you expect, and that you are indeed getting the javascript that you get when you use the script include. Hopefully you'll see something obvious...

Actually I think this might be a timing issue, you are probably calling your onLoad before atlas has a chance to load its scripts, so you can verify that is the case in fiddler. Anyways you probably want to register your getDataForTable on pageLoad or using atlas's ApplicationOnLoad.

Hope that helps,
-Hao


You are right, I added the getDataForTable method after I posted this and it worked - it was just a timing issue. Thanks for the help though!

Monday, March 26, 2012

Atlas User Control bug Error rendering control

Hello

Help me with this two:

1. I'm using the latest Atlas July version and I'm getting error 'Error rendering control' in design when I want to use Atlas UpdatePanel in user control. After starting the application the control work fine.

2. If UpdatePanel is passing value from Calendar control to the TextBox control and TextBox property is read only – the value could not be read and vanish after postback.

Thanks for answer and keep up the good work and try with less bugs.

Hi Filip, for #2

As a workaround, you can trap event "Calendar_SelectionChanged" and save the value somewhere else. Also in this method, you can call

popCalendarPanel.Commit(txtDate, currentCal.SelectedDate);

which is how you can do something custom with the pop up result itself.


Thanks

I will try thisand post it back the results.

ATLAS Updatepanel bug ?? character underline

I have a problem with de "_" character in the January Pre -Release

For example if i have a update panel with id ="updatepanel_calendar"

The panel not be found in postback cause then panel id change to update&calendar

I have the same problem if i have de update_panel into a user control with underline charater

for example: uscr_ticket

meybe its me the problem, but i dont know

anyway im very happy working with atlas

thanks...

Pd: sorry my bad english ...jeje

;)

Hi,

yes, it is a known problem; you should avoid to put an underscore in the UpdatePanel's id. This will be fixed in the next release.