webeno's tutorials for beginner website designers, bloggers and internet marketers
Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts
Sunday, May 18, 2014
Calculating colour contrast from hex colour code (php, javascript)
This time I have a nice little snippet to offer you: there is an easy way of calculating contrast from hex colour codes. I needed this on one of my web apps where I wanted to display the background of certain buttons in one colour and wanted the app to automatically calculate if I should set black or white as foreground colour for the button so it's easy to read.
Saturday, February 22, 2014
Add a copyright notice to text copied on your website or blog
Here's a quite smart trick for today: Add a Copyright Notice to Copied Text.
What it does is that when someone copies text from your blog or website, this script ensures that once the text is pasted, it adds the URL of your post (on a blog) or page (on a website for example) and a copyright notice to the end of the pasted text. How awesome is that, right? :)
What it does is that when someone copies text from your blog or website, this script ensures that once the text is pasted, it adds the URL of your post (on a blog) or page (on a website for example) and a copyright notice to the end of the pasted text. How awesome is that, right? :)
Monday, June 17, 2013
Dynamic copyright notice to always display the current year
Another quickie, but it will be very helpful in making sure you won't seem to have forgotten about another important detail: Always Display the Current Year in your © Copyright Notice.
Wednesday, May 22, 2013
Getting rid of flashing white page on your website
Today it's going to be a quick one, and I actually don't have a link this time, I just remember I had to deal with a flashing white page appearing for a split second on a black background website that obviously didn't look very good. Reading through a couple of articles, I learned that the cause of the issue is that I have used javascript on my website but the script itself was in the header. This could be anything, even your Google Analytics code.
The solution:
Monday, September 05, 2011
How to create a (browser) "Back" link
I always wanted to know this, so I hit the internet and searched for it: I wanted to find out how I can create a Back link on my page. This can be very practical for example on a 404 (page cannot be displayed) error page, as this way if visitors came to your website from one of your pages (or any other website) they can easily click your Back link making your page even more user-friendly.
Monday, August 08, 2011
How to leave a facebook network
*** EDITED: Unfortunately this solution does not seem to work at this stage as facebook seems to have changed their code to prevent people from being removed from their primary network. I encourage you to report this to them by filling out this form and they might eventually do it for you: http://www.facebook.com/help/contact.php?show_form=profile_bug. As a workaround, you may choose a different network, that you are ok to keep, then you can remove your old network. If anyone reading this has a solution, please feel free to comment below. I'm however keeping the original post for the sake of history tracking. ***
I might be an exception, but it did disturb me a lot to have the name of a network added under my name in facebook when looking in friend lists, such as my friend's friend list, or when you open the link of the list of people who liked a post... etc. You might just want to get rid of your primary network for other reasons (one of the simplest, not part of it anymore), but to be honest, when I tried to remove this annoying network name from below my name, I did not find a solution up until today.
I might be an exception, but it did disturb me a lot to have the name of a network added under my name in facebook when looking in friend lists, such as my friend's friend list, or when you open the link of the list of people who liked a post... etc. You might just want to get rid of your primary network for other reasons (one of the simplest, not part of it anymore), but to be honest, when I tried to remove this annoying network name from below my name, I did not find a solution up until today.
Wednesday, August 04, 2010
Easy countdown timer for your website
I guess I found the easiest countdown timer on the web, namely Andrew Urquhart's DHTML Easy Countdown — v1.53. All you have to do is to copy the javascript provided in the downloaded file onto your hosting server, call this javascript at the beginning of your page, then use the 'countdown1' selector id in any div, span or other tag, and finally provide the date and time within and you're good to go! ;)
Example code to call the javascript (put this between the 'head' tags):
Example code to call the javascript (put this between the 'head' tags):
Sunday, June 20, 2010
New website 'in the house': widosub.com & V2 Manufacture updated
Was just ready a few days ago with the latest, very simple website i created for an amazing musician and dj, widosub. I created his site with WordPress and used the The WordPress XSPF Player Plugin, a Flash based music player plugin. Go ahead and check it out now: widosub.com.
I also made a recent change to V2 Manufacture: due to the fact that the client wanted to see the website through iPad and iPhone, I had to replace the Flash based simpleviewer script by a Javascript based picture gallery tool. I used the probably simplest and awesomest script called Galleria by Aino. As a backup solution, for those who have difficulties seeing javascript content, I created a separate, simple, html/css based version of the picture gallery - I used a simple CSS photo-album for this replacing the numbers with thumbnail pictures.
I also made a recent change to V2 Manufacture: due to the fact that the client wanted to see the website through iPad and iPhone, I had to replace the Flash based simpleviewer script by a Javascript based picture gallery tool. I used the probably simplest and awesomest script called Galleria by Aino. As a backup solution, for those who have difficulties seeing javascript content, I created a separate, simple, html/css based version of the picture gallery - I used a simple CSS photo-album for this replacing the numbers with thumbnail pictures.
Sunday, November 29, 2009
Select (highlight) All Javascript
To ease your work, I decided to equip my code boxes with a 'Select All' function, so that you can easily highlight the text in the box, copy it and paste it into your .html file. I searched a lot and the only one that really worked for me and was very simple was the forum thread called Select All Text In A Form Field On Click. You can test this by clicking into any of the code boxes I posted.
Wednesday, October 28, 2009
Form in tooltip with text linked send button
While continuing to work on gergomatis.com I needed to find a simple contact form, something that fits the minimalist design of the site. I was spending a very long time with searching and I thought this was only possible with JavaScript [one of the simplest examples: Help Writing An Html Code (onclick Open Something)], but then I found exactly what I needed. No JavaScript, no complicated coding, a simple CSS rule is enough:
Subscribe to:
Posts (Atom)