how do I create a widget of my web application - javascript

I want to create a small widget of my website. This widget will facilitate easy
viewing of latest content posted on the website
embedding it on other website.
posting of comments instantly to my website from within the widget
How shall I start building such widget.
I heard of this CROWDSOUND, and this is exactly what I want but want to create my own.
Please help me do this.
Thanks

Look at the iframe tag in HTML.
This, is, for instance, how Google Gadgets integrates multiple webpages into little boxes in a single home page.
http://www.w3schools.com/TAGS/tag_iframe.asp
http://code.google.com/apis/gadgets/

Related

PHP Javascript, Website which loads everything into a div is there a way to make the back button work

I am currently building a website but in an effort to prevent not necessary data to be loaded i decided to split but the website into serveral divs and load the content inside the div.
Because of this when i click on the back button i dont go to the previous location on the site but to where i was browsing before. Is there a way to solve this without rewriting the entire site? So for instance on my site there would be a members page that would be called upon using javascript by loading $('#content').load('members.php?id=$id');
For instance by creating a fake location...index.php#fakelocation (which contains the specific content i just loaded)
Can anyone give me a push in the right direction (or if this is impossible id like to hear it to)
I think what you're looking for is a combination of the History API and AJAX.
Lucky for you, there's a great library called PJAX that combines these technologies.
Without knowing more about how your backend works, I can't comment on additional steps to optimize the whole application, but PJAX is friendly with any number of server-side technologies.

Can I customize custom Google search engine to show or link to the first result only?

I'm making a site for my web dev class that's supposed to act like ai, where the user asks a question about a computer issue and ideally, the main result would be a YouTube tutorial embedded on the site. So the site homepage would just be a search bar in the middle, kind of like google's homepage.
I want the question to just be entered in the search bar(I already designed it in html, css, and javascript) in the middle of the homepage and when the user presses enter, the result page should just be an embeded youtube video spanning the page width.
Realistically, if I were to work on a site like that I'd have to develop my own algorithm, but for demonstrating how the site would look, how can I go about customizing the Google CSE script to result in one embed video, or what's the closest way thing I can do to that.
Is the javascript in google CSE even customizable in that regard?
Also, open to trying any suggested, more open source search API.
I started learning HTML, CSS, and JavaScript this year btw, so I'm sorry if I'm saying anything noobish/dumb
Search engine makes use of crawlers and build indexes to show up results on searches. A search's result is entirely based on how the site was ranked based on the keywords. So in short, no you can not customize the google search result. However you can implement SEO (Search Engine Optimization) on your site in order to have your site show up in search result on any search engine. For starters, you can read more about it here: https://en.m.wikipedia.org/wiki/Search_engine_optimization
You can. Because you are not customizing how the public sees search results but only yours. However, there is no official customization method provided. You need to fake a Google by setting up a local website or using some user script technology.

any one who can help me with an online bookshelf?

Is anyone there who can help me to find a server which can store E-Contents (E-Book, video and podcast) and provide an embedding option to be used in my website?
You can use The Preview Wizard for books.
The Preview Wizard is designed to let you quickly, easily, and
reliably integrate previews with your site. You can embed a book
viewer, link to Book Search, or even add a preview "popup" window to
your siteā€”all you need to do is generate the code and paste it onto
your page. You can also customize this code using some simple
JavaScript functions.
Instructions
Demo

Access main page elements from a separate page (PageSlide)

I am using the jquery PageSlide plugin as a menu on my site (http://srobbin.com/jquery-plugins/pageslide/) This opens a separate page on the side of the main page to act as a menu of sorts. But I was wondering how I could access the main pages elements from this side bar. For example I have an Iframe I want to manipulate from the side page, but I don't know how to accomplish this because they are on separate pages! Thanks, any help is appricated.
Iframes are evil IMHO and should be avoided as much as possible. As I mentioned in my comment earlier, you can not run JS from an Iframe that can act on the main page. That would be a VERY scary world if that was possible.
If you want to have menu that slides from the side like many current mobile apps.
I would recommend considering those options:
You can do that with pure jQuery with no extra plugins. There are many resources online and one is a question discussing this in detail as well as a simple demo for it.
You can look for plugins that can help you with what you are trying to do, with a quick search, I came across this. But I am sure there is more.

how to find and mark all links in the web page?

I'm making an application which finds all links and buttons on the web page and
shows marks over the links and buttons (with any browser or custom application window).
Now, I'm trying to implement it with browser helper object(BHO)
and javascript. The BHO injects javascript code in the existing web site and the injected javascript finds the location of links and buttons and marks the links in the web page by analyzing DOM of the page.
However, it has many problems because there are lots of links that are coded by DHTML, javascript, flash and the like. What makes me difficult is that it is not easy to mark these links because it often moves and disappear after the page is completely loaded.
In particular, flash buttons cannot be accessed by HTML DOM, so I'm in trouble with finding such flash buttons with the above method. Therefore, it may be necessary for me to implement this application with different method or framework, but I can't find any other way to do. I think any method to find click-able object on the webpage of screen would be helpful to me. I hope you have some suggestions for me?
To highlight all normal links on a site you can use this jQuery snippet:
$('a').css('color', '#F00');
There is no easy way to highlight flash links or links by window.location in JavaScript.

Categories