I have this project that I need a modal box to appear when they login for the first time.
I'm using a class called superbox which works well but it's activated by clicking links with href and rel attributes attached.
So I was wondering if there was a way of auto clicking the link on page load.
This is the link below:
Open
Any help would be appreciated,
Thanks.
Okay basically, auto clicking literally doesn't exist. But you can activate the box on pageload.
$(document).ready(function () {
//alert('page was loaded!');
SomeSuperBoxOpeningFunction('content', '470x225');
});
EDIT
But since there is no such feature in superbox plugin. Then lets make a totally alternative fix for that:
http://jsfiddle.net/hobobne/8FLkx/
This is a very very simple idea behind showing some boxes.
I checked the sourcecode of your superbox and found the the following function:
function showBox(curSettings, $elt)
Related
Edit: Stackoverflow modify automatically the Amazon links when you click, so for see the popup, select, copy and paste the URLs in the browser.
On Amazon there is a link to open directly a side popup, like this:
https://www.amazon.com/dp/B07FKTZC4M/#aod (#aod open the popup)
where We can enter some filters. I tried different ways with no success to generate a link that open directly the site popup with new filter pre-applied.
So i need a link that open this page with "new filter" pre-applied:
I tried different solutions, but don't work, for example:
https://www.amazon.com/dp/B07FKTZC4M/ref=aod_f_new#aod
https://www.amazon.com/dp/B07FKTZC4M/ref=new#aod
https://www.amazon.com/dp/B07FKTZC4M/#aod_f_new=true
https://www.amazon.com/dp/B07FKTZC4M/ref=aod_f_new=true#aod
https://www.amazon.com/dp/B07FKTZC4M/ref=aod_f_new?ie=UTF8&f_new=true#aod
I see some informations on source page, maybe that help:
Question: Is there a way to create a link that open directly the side popup with new filter pre-applied? Maybe adding some parameters to the URL.
You can call a function in JavaScript with which you can change the z-index of the popup.
Something like this:
<button onclick="popup()" value="open popup">
Also make the popup. I am just making a rough one:
<div id="popup" style="z-index:1000; position: absolute;">Some code</div>
Remember to set the z-index at behind and the position. Then for JS i will make it simple in case you can't code JS
function popup(){
document.getElementById("popup").style.zIndex=-1;//basically changing the popup's z-index
}
This will just change the z-index of the popup which you must create yourself
I am writing tests for my Bootstrap 3.x webapp using Nightwatch. All is working fine, but I would like to add the "close modal by clicking somewhere next to it" in one of my tests. I don't seem to be able to identify the html element that's supposed to receive the click event however.
Can anyone help me with this?
Thanks!
The background is a div with class .modal-backdrop. According to the docs: "...generates a .modal-backdrop to provide a click area for dismissing shown modals when clicking outside the modal."
If I set button to disabled, and someone clicks it, how can I make it display another div, which contains explanation why its disabled?
I have no clue how to do this, and would realy appreciate some help.
Thank you!
I had a problem like this a while ago. I think the solution was to wrap a div around the button and detect a click on the div, via jquery. Not pretty but gets the job done.
you can make it using javascript onClick event.
There are many ways to do that. You can create an element using document.createElement and a text node using document.createTextNode to create your own message panel.
or you can just create a div then target it using querySelectors of javascript then use innerHTML.
I wrote some codes here for you. pls check the link:
https://jsfiddle.net/jLt5hjn8/
At the moment i have a normal button:
Sign up
Instead of sending it to a link immediatly i want it to display a popup window with mutliple options like this:
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_prompt
But instead of the textbox i would like it to display checkboxes with the site it will direct you to. (and you can only select one checkbox)
Quick example i made in paint:
http://oi57.tinypic.com/s5cvu1.jpg
Not sure if this is possible since i'm not experienced with working on websites.
Your question is very broad and I don't think SO is here to give you a tutorial but as a help for you to get started I suggest you check out window.open event that you will need to fire in order to open a pop up http://www.w3schools.com/jsref/met_win_open.asp then on the pop up window you will have to decide whether it's better to have a checkbox or a radiobutton, since you want that only one option is ticked and so on. I suggest you look on google for "pop ups getting started" and javascript. I hope that helps.
Use onclick method:
<a href="" class="button" onclick=Login(); >Sign up</a>
again define the method signup in Scrpt tag
<script>
Login()
{
}
</script>
For better understanding refer this example:
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onclick
This is very simple example, alternatively, if u r aware of jquery, it will make your work very easy, going for jquery is better option.
http://jqueryui.com/dialog/
I'm making a rather simple online store page at http://pyentertainment.com/store.html integrating PayPal for payments, and just when I thought I was done I noticed none of the hyperlinks seem to do anything. By this I mean when I click them (I'm using Chrome and the same happens on other browsers too), on the status bar where it normally says "loading www.xyz.com" it changes to something for a fraction of a second and then disappears, not loading a new page; it's way too fast for me to catch what it says.
This happens to the links on the nav bar and to the social media links on the right.
Some context: When you click on an item, the page dims and an iframe comes up showcasing said product, with PayPal cart buttons. View cart/Add to cart open a new tab, but if you close them by clicking "continue shopping" they throw another error which although I'm not too concerned about might be the cause of the problem; I know iframes can be iffy to work with.
I'd appreciate any help. The links work on the rest of the domain, too.
Thanks in advance!
I would suggest downloading firebug from here:
Firebug Home Page
And watching what loads while you're loading your page, it will tell you if the resource is actually being located/served when the page is processing. If it's not, you may want to review how you built your links toe ensure they're properly configured.
Thanks guys, the issue ended up being that I had the entire body to check for clicks, and if the user clicked outside the item display box while it was on, dim it out, like this:
$('body').click(function(event)
{
if(!$(event.target).is('#productDisplay'))
{
$("#darkenBackground").fadeOut();
$("#productDisplay").attr('src','buy/loading.html');
return false;
}
});
I got rid of that feature and instead added a little close button to do the same thing. The links work now! Thank you all for your help :)
i cant give a full answer but it looks like its your dimmer specificly the part that detects the body click. try putting it into an if statement to check that the functon has been called before running the body click function
EDIT
something like
if(product displayed) {
look for click event on body
}