something stopped me in winJS - winjs

I want to implement a feature in winJS:
1. Load any web with url in any size;
2.scroll to any position in this web;
3.after I scroll to the potision I need, set the web cannot be scrolled. Only display the specified area of the web.
How can I solve this problem and go to next step?

Related

Unable to find the WPF custom control using coded ui

I am trying to automate WPF application (WPF with 3rd party devexpress) using coded UI (VS 2012) in my local machine (Windows server 2008 R2).
I am facing issues while identifying controls under dynamically generated content of the window. I've Tried different hierarchical levels to hit the control,But i am
still not able to hit the control.
Till some level I am getting the handle, but after I am not getting the handle.
My application is complex hierarchically structured with combining winforms and WPF.
I've Tried to use coded UI record and play feature to generate the UI Map and used the same structure to identify the controls. It worked while debugging line by line but it's failing while running.
e.g. Below is one hierarchy,
List item
Dashboard
Dash_Grid
LayoutManager
LayoutGroup
LayoutPanel -->Till this level I am able to get the handle and lower I am not able to hit the control
Container
Navtop
Nav_Grid
TileLayoutControl
........(all tiles)
This issue is not only with one page. I am having the same problem with all the pages.So this is blocking our automation.
Please can any one help me on this?
Try this two possible solutions:
Use the devexpress extension for codedui to identify and locate dexExpress controls:
https://www.devexpress.com/products/net/controls/winforms/coded-ui/
Dont replicate the elaborate hierarchy of your app when identifying controls but instead select the main controls in the hierarchy and use them to set your search properties. this is especially important for dynamically created content where the hierarchy is constantly changing.
in your example:
var List_item = new WpfListItem(parent);
List_item.SearchProperties.. = some search properties
and than set your control's parent to that top list item and ignore the midlle men:
var Container = new UITestControl(List_item);
where UITestControl should be replaced with the controls actuall type.

Animated Icon During Web page loading

I am creating an iOS app that displays a web view. How can I show an animated busy icon that shows a webpage is still loading. The icon should of course disappear when the webpage is fully loaded. An example code would be nice to have.Thanks
OK, I figured out my own problem. For those of you who might want to know how to do this... UIWebView has a protocol called UIWebViewDelegate Protocol naming some methods that can be implemented optionally. To show an animated icon in the status bar while a web page is loading, simply implement the webViewDidStartLoad method. Something like this...
- (void)webViewDidStartLoad:(UIWebView *)webView {
// starting the load, show the activity indicator in the status bar
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
}

Using multiple UIWebViews in a UIScrollView

I am using 5 UIWebViews in a UIScrollView to show the result of my game. Intention is to allow the user to scroll through the results screen. I had a problem where the UIWebViews won't load when scrolled to the next page. This means the first page will load successfully however when you scroll to Page 2, you will see a white blank page. Page is loaded as I can see the alert which was given in all the 5 pages, but it won't show.
I tried a workaround as mentioned here
inserting various views into UIScrollView
http://pinchzoom.com/blog/items/view/1386/one-of-the-problems-with-the-uikit-at-the-moment-is-an-issue-embedding-a-uiwebview-within-a-table
This fixed my problem, however when I submitted the app to iTunes, it got rejected with the following comment.
"3.3.1 Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs."
The non-public API that is included in your application is _documentView
I would like to fix this issue and resubmit. Can someone help please ?
Thanks
Jugs
Just use one WebView for all results (which will scroll if it doesn't fit into the screen).

SharePoint: Site Layouts

Hi I was wondering which Layout I could use to get the search box in the top right hand corner. I used (Welcome Page) Blank Web Part Page) as the page layout but its missing the search box in the top right corner.
Also another question: How can I add my own layouts to the list in the Create Page, page. Thank you.
The search box is defined in your master page. Ususally default.master, it would not matter which layout you choose the elements defined in the master page will still be in the same place. In your case it would appear that the search box does not exist on your master and would need to be added in again.
You would need to amend the master page for your site and add the appropriate SP control for search into the appropriate place on your page. This will ensure that a SP search box is rendered in that location for every page.
To define your own page layout have a look at Link 1 and Link 2.
As for the search box, it is defined as part of the Site Template. Try creating a Site using the Collaboration Site template.

MOSS'07 - Page View Web Part Slows Menu Hovers

In our MOSS '07 site we have a page that contains just a Page Viewer web part in it that points to a site on another server. However, I've noticed that on that page (and any others that have a Page Viewer web part on it) our drop down menus and hover effects are super slow and completely max out the CPU on the visitor's computer (process is IExplorer.)
Through testing, I was able to determine that it doesn't matter what URL the web part is pointed to...just having the Iframe on the page seems to cause it (just setting the viewer to load Google's homepage--which is probably the simplest site I know--still causes the problem). If I go and remove the web part, the menus start functioning just fine again.
I attached a debugger to the process and stepped through the Menu_HoverStatic and called functions and it seems to have a hard time when assigning panel.scrollTop to zero in the PopOut_Show function.
Has anyone else noticed this? ...perhaps found a solution to it? I can't find where to edit PopOut_Show function on our server (I think it's a resource in one of the .NET DLLs) or else I'd just comment out that line as I don't think it's really important anyway...at least on our site.
I really like the ability to have web pages from another server hosted in our SharePoint site, but the performance on the hovers is agonizing... and, honestly, unacceptable. Depending on the resources of the user's computer, the hover effects can take 15 seconds to complete at times!!!!
Any suggestions would be really appreciated!
SharePoint's built-in JavaScript is probably making the browser wait until the IFrame within the Page Viewer Web Part has completely loaded. If you can see a status bar message that says "Please wait while scripts are loaded..." when you attempt to click on the page then that's definitely the problem.
Thank you for your reply. I was actually able to discover what the problem was (my appologies for not sharing it here with everyone when I did!)
The problem wasn't so much from having the IFRAME on the page, it was because I had set the zone to be 100% width and height. Because of a but in IE, trying to calculate the location of the dropdown was erroring (I don't remember what javascript function or call was exactly to blame, but I remember stepping through it with the debugger.) I believe it had something to do with "location offset" or something like that. My take at the time was that it was trying to position the dropdown menu on the screen, and the calculation for positioning it was failing.
To get around it, I had to set a javascript routine to programmatically set the height of the zone after the page loaded. Exactly setting the height prevented the dropdown problem in the menus. Of course, it wasn't ideal because if a user resizes the window, the IFRAME (or, more precisely, the zone it's in) doesn't resize with it. But, it was a suitable band-aid for the problem.
I'm hoping that IE 8 will fix this when it's released.

Resources