HTML website design, links opening smaller windows on the page - javascript

So i tried searching for what I looked for but I couldn't really find exactly what I was looking for, if it even is possible that is.
What I'm looking for is a way to make the links people click on my website appear almost as ads, not a seperate window or tab in the browser but its own small window on the current tab itself. I made a image as a sort of example of what I mean. I don't know if it'll do any good but its worth a shot, I'd love to have it be able to work with Coolmenu as well. And if people wanted to open them in a new window or new tab, they could just right click, like below:
Update: 10:32 7.11
I realized that both of these links, as well as when i searched for some on my own all date form like 2006-2009, whereas all of them use
<div id="overlay">
<div>
<p>Content you want the user to see goes here.</p>
</div>
</div>
I think I can just write () (correct me if im wrong) as well as the paragraph stuff, but what should I do about all the ? should I just straight out remove it or replace it?
Update 10:50 7.11
I don't got more time to work on it today but next time I got some time, should I post all the other javascript and css I have on my page (only coolmenu that is) to give you some sort of idea of what exactly I want to accomplish?
And again, thank you all for the great help.
Update 12.11 08:05: I'm having trouble getting it to work together with Coolmenu.
I can provide with my css and javascript code for both coolmenu and the window thing if required, should i upload a .txt or just put it here?

Modal Windows
I guess you wanna make Modal Windows. You can easily do that using this tutorial here: Simple jQuery Modal Window Tutorial.
Screenshot:
Demo here: Demo
jQuery Dialog
Or you can even use jQuery Dialogs, which uses same principle, but easy to implement.

Although you don't want to open a new window, this is the quickest way you will get it to work how you want and involves the least amount of javascript.
Code:
Hi
Parameter 1 is the URL, parameter 2 is the name of the window.
In the 3rd parameter you can pass the following options:
status: The status bar at the bottom of the window.
toolbar: The standard browser toolbar, with buttons such as Back and Forward.
location: The Location entry field where you enter the URL.
menubar: The menu bar of the window
directories: The standard browser directory buttons, such as What’s New and What’s Cool
resizable: Allow/Disallow the user to resize the window.
scrollbars: Enable the scrollbars if the document is bigger than the window
height: Specifies the height of the window in pixels. (example:
height=’350′)
width: Specifies the width of the window in pixels.
For more info click here

Related

How can I use javascript to open a navigation pane in Adobe Acrobat DC?

Is there a way to use javascript in Adobe Acrobat DC to open a specific Navigation Pane? I've been struggling to find suitable documentation for this, so I'm asking here.
I've got a button that allows a user to attach documents to the PDF file, which works great. The issue here is that I can't set the attachments pane to stay open. I can execute the menu command to show/hide attachments, which works great for one attachment, but then as soon as you add the second attachment the pane closes, which is less than ideal (and then it opens with the third attachment, closes with the fourth, etc., etc.).
Is there a bit of code that can solve this issue, or some other setting in the document that will achieve the same effect automatically? Please note that my end users are not the most tech savvy of folks, so some way that minimizes button clicking to display the attachments is ideal.
I was researching the same problem and came across a solution using this undocumented function.
Right click on the button and go to Properties.
In the Actions tab, under Select Action choose Run a Java Script. Click Add and copy and paste this text:
this.viewState = {overViewMode:7};
It works perfectly.
Is there a way to use javascript in Adobe Acrobat DC to open a specific Navigation Pane?
No. Acrobat JavaScript cannot control the navigation panes.

Embedding PDF with flipping pages

I've seen a lot of questions and answers here that help you too embed PDF documents, but they are all "vertical read", where you scroll down to see other pages.
Is there any plugin, or maybe even a simple script that would help you to embed and read the PDF document horizontaly? Like where you see two pages and click next on top to see the next two.
Just like a book. (No fancy animations though)
Thanks.
There are plugins that lets you read pdf documents. But they might be fancy.
http://www.jqueryrain.com/2012/09/best-jquery-pdf-viewer-plugin-examples/
or
http://fliphtml5.com/free-pdf-to-jquery-flipbook.php
I like the last one especially
You can set the initial view of a PDF to show two pages.
If you add Fullscreen view to that, and the user has not deactivated clicking to the next page, it actually should give the effect you want (not verified).
If the Fullscreen view does not work, your user would use the cursorLeft and cursorRight buttons to navigate.

creating a pop-up(or is it a pop-over?) window for a webpage

I do apologize for the title if it is inaccurate. (feel free to offer me suggestions on the proper wording if needed.)
My question is for my web page, I would like to do something where you click on a link (or image), and instead of opening a new tab or browser window, you get a box that hovers over your page displaying the image of the link (or smaller image you clicked on). I am not sure if the correct term for this is a pop-up or pop-over window.
The best example of what I would like to do, is if you were to go to amazon.com and you see a product and it says "click here for a larger image". when you do that, a sort of window will display itself over the current page and show you the larger image.
Would anyone be able to give an example of code to see how this would be done as well? I am very thankful for any and all recommendations.
You could use a solution like fancybox, I believe this is what are you looking for http://fancybox.net
If I've understood what you mean, there are tons of jquery plugins to do that, for example http://lokeshdhakar.com/projects/lightbox2/
Here is a link, he has an explanation and code snippets for ya, works great.
http://www.htmlgoodies.com/beyond/javascript/article.php/3881276

Accessing CSS Properties inside a Popup Window

I don't think this is possible but I thought I'd ask anyway.
I'm building a Wordpress plugin for sharing buttons and Buffer doesn't have a mechanism to return to the site if you locate in the same window, so I built out a nice popup that will fetch the add link. This works great except that the buffer add page creates a modal dialog that is positioned 100px from the top.
This creates a nasty 100px space above the dialog. See here:
I was wondering if it's possible to change the css inside that popup window, or perhaps find a way to have the window directly access just the div with a specific id?
The modal is draggable as well, so maybe create a drag action to drag it up to the top?
Any ideas would be helpful.
--EDIT--
Adding Fiddle as requested.
Not sure what the size of the window will be when you're not logged into Buffer, but you'll get the general idea of how the spacing is messed up at the top ... maybe.
SO won't let me add a fiddle link without code the post is: jsfiddle.net/y6RQ7/6/

How to implement gmail compose window concept in Single Page Applications?

I am working on a project where it would be easier for users to quickly add transactions.
I am very much interested to do something similar to what gmail compose pop up does on the single page
I have no idea how to implement such a thing. Please give me directions about how to do such things
I am interested in building it using AngularJS
P.S Sorry for a broad question, but I really don't know what this is called and don't know what to Google for either
You can construct a popup like that very easily using a regular div element and some CSS. In particular, the position: fixed CSS property will let you put something at a position on the window, no matter how it scrolls.
Here is a simple JSFiddle that demonstrates the technique: http://jsfiddle.net/BinaryMuse/ndr2Q/
You can click the titles of the books to expand their description, which will hopefully make the preview window tall enough to scroll. (If not, just resize the window.) No matter where in the document you scroll, the "popup" window (which is just a regular element with an ng-show and some CSS) stays at the bottom-right of the screen.
You can find libraries, like Bootstrap, that present jQuery plugins to allow you to do popups on the page, but in general they're designed to prevent the user from interacting with the page behind the modal in any useful way. A technique like this allows you to scroll around and use the page in the background similar to Gmail's interface.
Dockmodal is a Gmail like dockable modal plugin that has the option to minimize and restore opened modal dialogs.
Check out these angular JS alerts based on bootstrap:
http://mgcrea.github.io/angular-strap/#/alerts
You can use the provided $modal service that takes a template URL as well :
var modal = $modal({template: '/js/app/views/elements/modal-welcome.html', show: true, backdrop: 'static'});
And shows it up as a popup.

Categories

Resources