How to stay on the same page layout when clicking the link? - web

Hi stackoverflow community. I have a page with lest of articles' overviews with associated links. I want user to stay on the same page when he clicks the link but instead of having a list of articles he will get to the full article. Not quite sure how to achieve that?

For this kind of web page behavior, you'd use JavaScript DOM manipulation with Ajax requests. JavaScript frameworks such as jQuery have very good support for this. You will need to handle navigation sensibly, so that hitting the back button does the expected thing, but the frameworks support this, too. Try out some tutorials for the various frameworks to see which one suits you best.

Related

Adding onBlur and onFocus events

My company is currently looking into making our website "Web Accessible". I'm very rough when it comes to using Kentico (v8.2.50), but that's the CMS that is driving our site.
Running the front page through a Web Accessibility Checker, we encountered this warning on our main menu strip:
script not keyboard accessible - onmouseout missing onblur
onmouseover event handler missing onfocus event handler.
The fix sounds simple, but I'm not sure where to add these events. Has anyone had any experience with this?
It really depends on how your site has been put together. If the site has been built using the portal engine, you're probably able to find the markup that you're looking for in one of the transformations. There is a possibility that you're using the CMSListMenu control which for restricted flexibility in terms of markup. Without a little more information or a page to look at it is hard to tell.
As for looking through transformations, I can highly recommend Search for Kentico to help find things within the CMS, it's been invaluable on a number of occasions when looking for specific markup. What it can do is help you locate things within Kentico by very quickly looking through the templates and transformations etc.

Apps Script vs Chrome Extension: Writing an alternative spellchecker to Google Docs

Say, I want to develop an alternative spellcheck module to google docs.
This means that I have to get corrections from my backend, and color the misspelled text's background, and do a small popup bubble when user hovers over it, where I'd display the correction. (please mind that spellcheck is not the actual goal of my project, but it does address my problems in a more simplified way)
What are my options? Any ideas how to do this?
Few possible solutions I came up with:
Chrome extension vs Apps script
Chrome extension
pros: user has to grant permissions once, can freely traverse and append anything to dom via content script
cons: is a "hacky" way, if google changes classnames or js source, it would stop working, and also, reverse engineering google docs's editor engine is impossible
Apps script
pros: supported by google: if it works, I dont need to be afraid of docs updates
cons: it seems to me that I can't just fiddle with the dom (because of Caja compiler), has very limited support (if any) for custom highlighting or hover functionality.
As I see it, neither of these are perfect solutions for this project. What do you think? Any suggestions are very welcomed.
I know this is an old question, but I have recently gotten into the same problem, and believe I have a solution. So for future Googler's I will post my answer here.
My solution was to create a Chrome Extension and understand how the Google Docs DOM's are structures to interact with it.
You can find my code to work with the Google Doc DOM's here
In Apps Script you can't "fiddle" with the DOM and you won't be able to implement hover functionality. Also, a lame Highlighting would involve changing the current document itself (which would go to revision history, undo queue, etc)
Therefore, your only altertive is the Chrome Extension. But I agree with you on the cons. It is a super hard task that could break at any minute without notice.

Extend IBM Connections on an application level like blogs and forums

We are trying to extend IBM Connections 4.5 CR3 with own XPages apps not on the well described widget extension level for communities but on the application level.
Our goal is to extend the applications menu and load our apps inside the connections framework just like the original blogs or forums IBM apps.
Some others tried the same thing like this one:
http://blog.riand.com/2014/06/get-your-application-integrated-within.html?m=1
It seems that the trick for coming around the CORS trouble is not well documented in there.
Mikkel has put some code onto GitHub for the server side page generation:
https://github.com/lekkimworld/ic-wrapper
Can someone over here solve this or help us to come some steps further?
There are a number of approaches you can take, depending how daring you are.
The most pragmatic approach would be:Load a connections page, steal the HTML that makes up the Menu bar, copy that into a XPages custom control and you are done (of course you had added a link to your application beforehand in LotusConnectionsConfig.xml
Check the JSP that reads the LotusConnectionsConfig.xml how it is rendering the menu bar. Configure the Apache HTTP to expose the XML for read access, so you can dynamically create that menu - saves work when your menu changes often
Use the approaches described by Phil
Add a small JS that you call in your added menu. It would remove the content of the Connections page below the menu level and insert an iFrame which loads your XPage
Cheat by building a widget for a community homepage and have just that one widget (taking the whole page as real estate) in that Community
That's just off my head. Hope it helps

Retrieving Google Instant Data

I want to develop an application that will visualize the recommendations of Google instant. It is for a course project and for now, I don't know much about web programming tools. What I wonder is that is it possible to retrieve that data from another web page. If you think it is possible and it is possible with which platform, could you please guide me to the correct direction?
Without more information on what you're actually trying to do, it's difficult to give a proper answer. From what I can understand, you just want a list of the auto-completed items from a Google search, to manipulate however you like?
In which case, using the highest-rated answer from here, you can use http://suggestqueries.google.com/complete/search?client=firefox&q=YOURQUERY to give you a JSON object which you can then manipulate to get the auto-complete results. The client= part is needed, but I haven't looked at various options you can put in there.
Personally, I've never used JSON before, so can't give you any help on how to go about parsing it, but you can find more information about it on the JSON website, and w3 website.
Will need to act like javascript or run a javascript engine OR a browser add on and communication with that add on.
What happens as you type is a javascript function is called. So you need to call this function in your own or mimic what it does. I guess it calls a web service/ web page form programamtically (ajax) with what you have typed. The server responds with the suggestions. Not very difficult as long as Google does not deny you if it realizes your not a browser. i think they like only 100 free API calls but you can google google about that.
Http Components in java will help calling the serice, with cookeis etc. You should use the dev tools on firefox to see what happens under the hood when you type in the google search bar and see the code.

use iframe or template

Hi:
In our application,there are so many sub pages and menus,for example:
the main menu for the whole site:
Index/Document/News/SysConfig and etc.
And inside the Sysconfig page,there are also other menus like :
user managment,roles,logs... and etc.
Now we use the iframe to make the layout of the site,we change the related iframe's src attribute according to user's choice. but I wonder if this is a good idea?
I thought use the tempalte,for example the apache tiles in jsp and the masterpage in asp.net.
I wonder which is the best pratice?
Best Practice would be to go the templated route ...
I haven't really looked into web accessibility for a long time ... but in the past when I used to work on externally facing sites, using frames of any sort was a big no-no. Screen readers would have problems with frames including iframes. I'm not sure if the current generation of screen-readers handle them better.
There's also the search result/deep linking issues to consider. For example, will your google result link point directly to the page in the iframe? do you have to do a hack to redirect the user to the main page?
Also going the templated route may not be that difficult as long as you don't have a lot of content to migrate. There are fantastic content management solutions out there like Wordpress, or Drupal and Joomla if you have more complex needs.

Resources