Using FileUploadField extension with extjs3.4 - javascript

Trying to handle with the FileUploadField extension for ExtJS 3.4 provided on Examples web page (http://dev.sencha.com/deploy/ext-3.4.0/examples/form/file-upload.html), I can't get any of the tree examples to be as it is shown on web page. And of course, can't get them work as they might.
When I specify a "FileUpLoadField" on my application, there appear two "browse.." buttons: It seems that one belongs to the ExtJS extension and another belongs to the browser.
On the other hand appear what it seems to be two textfields and there's no Icon.
I've got the FileUpLoadField" extension copying code that's provided on: http://dev.sencha.com/deploy/ext-3.4.0/examples/ux/fileuploadfield/FileUploadField.js
I've put this code on a .js file and added it as a library on my app.
I suppose this issue is related with browser/ExtJS extension I'm using.
Could anyone try to explain what I'm doing wrong?

You probably didn't add link to FileUploadField.css in your code.

Related

How do i fix "id attribute is not unique" in wordpress site (checking on achecker for wcag2.0)?

I am trying to make a wordpress website wcag 2 compatible. I am running the test on achecker and getting the error that matchHeight-js is not unique. How can I determine and fix the problem? I am viewing the page source and i can see the 2 id's that are the same but don't know what to do with them. Here is the website link Here is the error I'm getting achecker error and here is the part of my code that is wrong faulty page source. Can someone please help me fix this problem?
It looks like a bit more than just two elements happening to have the same id.
It looks as though two parts of your system are loading the same jquery library, albeit with slightly different versions.
The first is the plugin primary-addon-for-elementor and the second is your site's theme, bizberg. One or other of them should have checked to see whether the library assets they needed were already loaded.
Do you have access to a test site and/or the plugins or themes directory or can you inspect your theme's files in the WP backend as administrator under Appearance>Edit theme [I don't advise doing this on a live site!]. It may be simply a case of removing one of the calls (the <script lines that load the library) so they don't get called twice.
Any info you can give on what access you have to the system would be helpful and we may be able to pinpoint the problem more directly.

Chrome Apps <a> tag not working

Its been a few years since I have worked on Chrome apps. I started messing around with making some simple examples to learn the new process. The problem is that I have found that using an <a> tag to change the html page that is loaded to another html page inside the packaged app will not work. I'm looking for different methods of changing the screen with retrieving user input (button click, link click. and so on). I have looked online and have found very little documentation about making chrome apps most examples show how to make a simple "Hello World" and how to publish it. Not many extensive tutorials beyond that. Just to clarify this app would be a real chrome app not a link to some site. all files would be packaged with the chrome application.
Chrome Apps are meant to be "single page apps", and cannot navigate links by design. <a> links should open in a regular browser window instead.
If you want to do "url routing" within your application to change views, you can just roll your own solution, but should probably use a framework to help you out instead.
Here are some examples:
Polymer
Angular
Ember
Meteor
Backbone
The list is extensive. There are likely many other stack overflow answers that compare each framework.
The DOM (Document Object Model) which represents the contents of a Chrome App window is initiated from an HTML file, but from that point on you can't change it by referencing any other file, which is what you're expecting navigation to do. (<a> elements that navigate to an external browser via a "target=_blank" attribute are perfectly OK.)
However, you are free to change the DOM from your JavaScript at runtime. If you like, set an event handler on the <a> element and change the DOM as you wish. If you want to change the DOM via HTML (not from a file), you might find the JavaScript method insertAdjacentHTML useful. Actually, you can get the HTML from a file, but you have to read that file yourself with the Chrome App file I/O API.
Advice in another answer to use a framework is, in my opinion, overkill. If you think of a Windows app, a Mac app, or any other kind of GUI-based app, you would never assume that you could just change the UI over to something completely different by referencing an HTML file. Think of a Chrome App as being similar to those technologies in that sense, and you'll be on the right track.

Javascript Infovis Toolkit's Spacetree sample not working locally

Trying to make custom tree animation based on InfoVis toolkit, and to be particular, want to customize Spacetree Tree animation sample. For that reason, saved sample to local computer, however opening local sample is not working properly, i.e. the outcome is not exactly same with web version. Firstly, the nodes are not colored, secondly, there is no response for onClick event. I've checked both local and web versions of html files, everything is same, all js and css files are properly called and accessible. Anyone had similar problems? Please share the solution if you have. Thanks in advance.
screenshots:
I would suggest that you download the package. It contains all the examples to play with for all visualizations. And in my package, the example that you are referring to works fine.
So, you don't have to create local copies the way you are creating. Just download the toolkit and you have local copies of all the examples including the one you want. In fact, you can create as many local copies as you want from the toolkit.

How to architect a HUD in a Google Chrome extension?

I am trying to make a Google Chrome extension using content script.
My goal is to have a display at the top of the page (which is already working on my own pages) that can interact with the page.
I need things which are very complicated to put together in an extension, due to security policies :
Using require.js on the extension (that works for now, using this Github repo)
Using a templating engine to describe my display : I need to add a lot of content to the page and I don't think writing HTML in javascript would be a good workflow.
For my current version I use jade with my server, but this is not possible with an extension. I think I need to use something like Angular.js or Backbone.js, but I can't make them work on the content script.
I need a lot of communication between my extension and the page : For example I need to detect almost constantly mouse moves
I need communication with my server using socket.io
Every bit of functionality of my extension have been developed and tried in a standalone web page, but now I need to integrate it in a real extension and I am really stuck
So due to these requirements, I am wondering what would be the right approach for building this : putting it all in an iFrame (would the server-side communication work? And how to communicate with the page ?), or a way to make a templating engine work nicely in there, or a solution I didn't think of?
Try this:
Develop the HUD part as a standalone page that the content script will include in an iframe. You should be able to use Angular.js etc. with this, but you will need local copies of as much as possible and you'll need appropriate entries in the manifest.json to get it working in the extension. See/create other questions for the details.
Have your content script inject the code to monitor mouse-moves, etc. into the target page. Have this code digest and summarize the data, so it's not spamming the system. Maybe message the summaries to the HUD page and/or content script five or six times a second.
After that, it should just be a matter of getting the pieces working, one at a time. Break it down to specific problems and ask a question on one specific problem at a time (If you can't find the answers in previous questions).
I'm pretty sure what you appear to want is do-able, but the details are too broad for a single Stack Overflow question.

Interacting with webpage from C++ Application

i have a sitation where i want to access HTML DOM object from within my application to update certain parts of web page through javascript commands at run time.
It is a local webpage opened in FireFox which would be accessed by my application, so that the final output is always shown at the webpage which is updated by appliation.
It would be great if you could give me some idea about how this can be accomplished.
I have similar requirement like the webmonkey extension of firefox but need to do it outside of browser from my application.
You can try QtWebKit from the Qt framework, it provides an OO set of classes to interact with webpages from basic actions to very complicated and advanced stuff. I believe you may find your answer there, a link is provided below...
Good Luck
see Here

Categories