Welcome Guest Search | Active Topics | Sign In | Register

...to allow anonymous access to eo_web.ashx Options
pt100
Posted: Friday, March 20, 2009 4:32:26 PM
Rank: Newbie
Groups: Member

Joined: 3/20/2009
Posts: 9
Meanwhile I did put following in my client script:
(below, ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar is the actual runtime ID of the ProgressBar. TimerProgressBar is the value I initialized in the startup script for convenience to represent the control)

o1 = TimerProgressBar;
o2 = eo_GetObject("TimerProgressBar");
o3 = eo_GetObject(TimerProgressBar.id);
o4 = ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar;
o5 = eo_GetObject("ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar");
debugger;

After executing this, 01 and o4 are the same object (the one I mentioned as having only general purpose members). o1, o2, o3 and o5 are null.

Both of the following produce the same exception: setvalue does not exist in the object.

ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar.setValue(50);

TimerProgressBar.setValue(50);

eo_support
Posted: Friday, March 20, 2009 4:40:09 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Please read our previous reply. It should have already answered your question.

Thanks
pt100
Posted: Friday, March 20, 2009 5:06:22 PM
Rank: Newbie
Groups: Member

Joined: 3/20/2009
Posts: 9
Sorry, I did not mention that the clientside code I sent is just a snippet. I am actually calling setValue from within a clientside timer event. I just tested that even if I call setValue first time 5 seconds after the page has been fully loaded and rendered, the problem remains. Everything should be initialized, settled and stable at that time, so I think this is not an issue about calling setValue too soon.

The method I presented for obtaining the runtime client side instance of the ProgressBar works well with Microsoft's aspx contrls, as well as with DevExpress controls. I devised it to avoid embedding the literal ID's of controls within the user control into my main code. Otherwise, the generality of the user control would be lost.

However, just to make sure, I also already tried
o5 = eo_GetObject("ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar");
however, that returns null.
eo_GetObject("ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar").setvalue(50);
also fails.
("ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar" is the actual runtime ID of the ProgressBar.
eo_support
Posted: Friday, March 20, 2009 5:19:16 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You do not always need to use the full Id to call eo_GetObject. You would simply use eo_GetObject("TimerProgressBar"). If you do have multiple instance with the same ID but inside different naming container, you will need to use the full name. However generally you do it in the form of:

eo_GetObject("<%=TimerProgressBar.ClientID%>");

If the problem continues, please compare your code with this sample:

http://demo.essentialobjects.com/Default.aspx?path=ProgressBar\_i0

You have the full source code of the sample on your local machine. The sample calls the same method and it works fine.

Once you get the sample working, I would recommend you to create a separate blank page with just the ProgressBar in it and then test the code. Once you get that working, comparing the working page and your non-working code should help you locate what triggered the problem. If all the code appears to be correct, I would guess you have some other code in your page that replaced our client side ProgressBar object, or some malformed HTML that prevents the ProgressBar to be correctly initialized. In that case the easiest way for you is to comment your page contents block by block and you will find out the offending part.

Thanks!
pt100
Posted: Friday, March 20, 2009 6:41:04 PM
Rank: Newbie
Groups: Member

Joined: 3/20/2009
Posts: 9
I had already tried the following:
eo_GetObject("TimerProgressBar");
eo_GetObject("ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar");
eo_GetObject("<%=TimerProgressBar.ClientID%>");
However, they all return null. So obviously the object id does not represent an EO control.

It seems that in my test app, TimerProgressBar is a DIV. A DIV of course does not have a setValue method, which would explain the behaviour I am observing. I instantiated this TimerProgressBar simply from the VS2008 toolbox and just renamed it and applied the Vista style.

Looking at the dynamically generated aspx, I find:


<!-- Begin EO.Web ProgressBar TimerProgressBar. -->

--- (I removed a lot of culture-specific initialization from here which did not look relevant to the current problem) ---

div style="position:absolute; top:-1000px;"><input type="hidden" name="eo_version" value="6.0.63.2" /></div>
<div style="position:absolute; top:-1000px;"><input type="hidden" name="_eo_js_modules" value="/WebApp/eo_web.ashx?id=de2a9911-9127-4739-bd43-9fcb2638f7d7|fmt|/WebApp/eo_web.ashx?id=906ed629-b00f-46e3-a0eb-dc62ffabad06|c|/WebApp/eo_web.ashx?id=0d8d4806-471b-43cb-8b8b-118ea28f9e54|u|/WebApp/eo_web.ashx?id=0d55c135-0a18-4204-8f3a-9e9a3a6419d7|pb" /></div>
<div id="ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar" style="height:25px;width:350px;height:25px;width:350px;">
<table id="ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar_table" style="background-image:url(/WebApp/eo_web.ashx?id=f9124255-d02b-49a5-8bc9-0a93f50cb2be);background-repeat:repeat-x;font-size:1px;" border="0" cellspacing="0" cellpadding="0"><tr height="100%"><td vAlign="top"><img src="/WebApp/eo_web.ashx?id=10181336-4a35-4bf8-819b-f0764bc44582" /></td><td width="100%" height="100%" vAlign="top" style="position:relative;"><div id="ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar_pos" style="position:absolute;left:0px;top:0px;right:0px;bottom:0px;"><div id="ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar_ind" style="position:absolute;z-index:2;height:100%;width:30%;overflow:hidden;background-image:url(/WebApp/eo_web.ashx?id=412c8be3-5fe8-4e49-805c-7c3822893803);background-repeat:repeat-x;"><img style="position:absolute;clip:rect(0px 1px 1px 0px);" id="ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar_firstImage" src="/WebApp/eo_web.ashx?id=412c8be3-5fe8-4e49-805c-7c3822893803" onload="javascript:eo_ObjLoaded('ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar_firstImage');"/></div><table id="ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar_perl" style="width:100%;height:100%;position:absolute;left:0px;top:0px;z-index:3;clip:rect(0px 30% 100% 0px);;" border="0" cellspacing="0" cellpadding="0"><tr><td height="100%" vAlign="middle" align="center" style="font-size:9px;;color:#ffffff"><span id="ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar_pertl">30%</span></td></tr></table><table id="ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar_perr" style="width:100%;height:100%;position:absolute;left:0px;top:0px;z-index:1;;" border="0" cellspacing="0" cellpadding="0"><tr><td height="100%" vAlign="middle" align="center" style="font-size:9px;;color:black"><span id="ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar_pertr">30%</span></td></tr></table></div></td><td vAlign="top"><img src="/WebApp/eo_web.ashx?id=5c8065a6-f321-478c-b605-cc904fc13ec9" /></td></tr></table></div><div style="position:absolute; top:-1000px;"><input type="hidden" name="_eo_obj_inst" value="window._eo_initobj_ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar=function(){var list=\!i|fmt|c|u|pb\!.split(\!|\!);for(var i=0; i\1list.length; i++) { if (!window.eo_modules || ((\!|\!+window.eo_modules).indexOf(\!|\!+list[i]+\!|\!) \1 0)) { window.setTimeout(\!_eo_initobj_ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar()\!, 100, \!JavaScript\!); return; } } _eofi_a.a.b.ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar=1;_eofi_b(\!_eo_o_ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar\!,\!TimerProgressBar\!,new _eofpb_a([[[,\!ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar\!,\!ProgressBar\!,\!ctl00$uxPlaceHolder$uxWaitForPayment$TimerProgressBar\!,,,\!OnLoadTimerProgressBar\!],,\!__doPostBack(\'ctl00$uxPlaceHolder$uxWaitForPayment$TimerProgressBar\',\'_eo_arg_\')\!,,,\!None\!,,,,,[]],,\!/WebApp/eo_web.ashx?id=412c8be3-5fe8-4e49-805c-7c3822893803\!,,,30]),\!ProgressBar\!); eval(_eofi_v(unescape('%78%78%78%7B%6D%65%71%7C%3B%68%7A%73%65%7B%78%76%7D%02%34%36%6B%0F%0C%59%02%65%69%71%61%03%75%79%69%78%6B%0F%0C%60%76%6D%7A%52%09%06%59%76%7D%73%71%08%08%68%69%6D%73%71%0C%63%7B%05%6B%78%71%0D%07%4B%76%76%32%3D%45%02%7E%02%70%32%2C%4A%3C%44')));}; _eo_initobj_ctl00_uxPlaceHolder_uxWaitForPayment_TimerProgressBar();" /></div>
<!-- End EO.Web ProgressBar TimerProgressBar. -->


Does this give you any clues toward a solution?
eo_support
Posted: Friday, March 20, 2009 6:56:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
That is normal. You are confusing about things from two totally different worlds. One is the DOM elements, another is JavaScript variables. Our client side ProgressBar object is a JavaScript object. It has nothing to do with whether a DOM element with the same name exists or not. That also means your saying about "TimerProgressBar" is a DIV is inaccurate. It represents a DIV in the DOM tree. However this does not imply anything when it comes to JavaScript.

Please follow suggestions in our previous reply to troubleshoot this problem. First run the sample. then try it in a blank page. The compare the working page with your page. This issue is closed unless you followed all that and can provide a sample with which you can reasonable believe its a problem with the ProgressBar. Otherwise we would assume it's your coding error and no longer follow up on this issue because it works in our sample and also for other users.
pt100
Posted: Saturday, March 21, 2009 2:51:26 AM
Rank: Newbie
Groups: Member

Joined: 3/20/2009
Posts: 9
Good Morning!
Back after a good night's sleep.
Yes I understand that, and suspected that from the beginning (why else would there be a need for eo_GetObject() in the first place if the ProgressBar were a DOM object, which could be accessed by standard methods).
What was confusing is the fact that the other controls (MS and DevExpress) I have worked with are objects in the DOM tree, and can be accessed by the method I described. To add to the confusion, you also have a corresponding DOM object with the same name/id (the DIV) that seems to be the visual (static) representation of the ProgressBar, and has many properties related to the ProgressBar (like width and height). But the methods setValue() etc of course are not there.
Since the functional part of ProgressBar is a javascript object, it is obvious that this piece of javascript is currently missing from my application, and that's why GetObject() returns null no matter what.
So after breakfast I'll start looking for it :-)
pt100
Posted: Saturday, March 21, 2009 3:16:42 AM
Rank: Newbie
Groups: Member

Joined: 3/20/2009
Posts: 9
It works now!
Since I learned that part of the functionality of the ProgressBar is in a separate javascript object instead of a DOM element, I realized that my startup script (which finds the ProgressBar's DIV element instead of it's javascript object) was overwriting the corresponding EO javascript object variable.
After I removed the startup code the bar works as I intended :-)
I am getting a reference to it by calling eo_GetObject("TimerProgressBar");
So only the question remains: if, on a page, I instantiate more than one of my user controls which each contain a ProgressBar, do their ProgressBar javascript objects each have their own scope, so that they can still be accessed by eo_GetObject("TimerProgressBar");?
If they share a common scope, obviously then I'd need some instance-specific qualifier in addition to the "TimerProgressBar" name.
I can of course find this out by testing, but would like to have your comment.
Thanks for the terrific response time and your good support!
Best Regards,
Pentti

eo_support
Posted: Saturday, March 21, 2009 10:38:42 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Please read our previous reply again:

http://www.essentialobjects.com/forum/postst2353p2_to-allow-anonymous-access-to-eowebashx.aspx#12242

Your question has already been answered there.

When you have multiple instances, you may run into this problem:

http://www.essentialobjects.com/forum/postst2913_datepicker.aspx

While the progress bar is free, our time is not. We generally do not offer tech support for our free products, even though we don't mind to give you a few pointers in the hope that you would find the product useful. In order for it to be productive for both of us, you will need to pay more attention to our replies, samples and documentations. Otherwise we will no longer be able to offer timely response to your questions.
Stiku
Posted: Thursday, May 28, 2009 2:53:01 AM
Rank: Newbie
Groups: Member

Joined: 5/28/2009
Posts: 1
Hi,

We have problem that some can see menu and some not and there are not specify access.
identification is LDAP.

please how we can fixit?

Thanks.
eo_support
Posted: Thursday, May 28, 2009 9:45:36 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

The first thing you want to check is whether the JavaScript files are correctly rendered. When the menu is not displayed, right click the page to view the page source, search for script blocks with src properties pointing to eo_web.ashx?id=xxxxx. For example, "<script type="text/javascript" src="/EOWebDemo_Net11_CS/eo_web.ashx?id=cb4b68f2-5496-4b0f-8421-dab3b36ac08d"></script>". You will see a number of them. Take any one of them and try to open it directly with your browser. For example, with the above script tag, you would try to open "/EOWebDemo_Net11_CS/eo_web.ashx?id=cb4b68f2-5496-4b0f-8421-dab3b36ac08d" directly with your browser (make sure it's still under your site). If you get the JavaScript code, then it is good. Otherwise the browser should give you the exact message why it fails such as accessed denied or file not found and as such. You can then proceed to fix the respective issue.

BTW: Next time please try to post the question under a new thread. This way if it is a different issue, it is easier to track and manage.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.