Embed an FLV file into a web page
- Category: Hypertext Markup Language
- Hits: 35772
This is if you have an FLV file and you don't want any fancy management system, you just want your FLV to play on your webpage.
The following example is a demonstration of how to do this without installing anything on your webserver.
I like to use flowplayer for this example but my own systems can't use a solution as crude as this.
- Copy the below code (beginning and ending with object tags)
- Paste it into your HTML page
- Replace both instances of the text "http://my.video.com/myVideo.flv" with the full url of your own FLV.
- Save the HTML page and publish
The Code:
This file contains HTML or script code that may be erroneously interpreted by a web browser
- Category: Hypertext Markup Language
- Hits: 28279
The Error: This file contains HTML or script code that may be erroneously interpreted by a web browser
This is a common error when uploading files that the MediaWiki system does not allow. By making some minor changes to the MediaWiki LocalSettings.php file, we can fix this.
For demo purposes, I'm going to make our system recognize SWF files (by default these are disallowed):
How to make a HTML form post its variables to itself
- Category: Hypertext Markup Language
- Hits: 18129
The Issue
You have a PHP page which generates a HTML form. When the user submits the form, you want the same PHP page to process the data.
Solution
I've seen a lot of people write CGI requests but if you left the action attribute blank, this would do the same thing:
<form method="post" action=""> ...
Sort an associative array by values in Javascript
- Category: JavaScript
- Hits: 23888
An article on how to quickly adapt an array code and sort by its values. Surprising how many examples are on the web and everyone saying you're doing it wrong... Which is true but quite unhelpful. The original code is not my own either but that's not an excuse. I also found that examples across the web were only partial and thought I'd write a full example here. No jQuery and using the Google Chrome browser. I wanted to:
- Sort the array by its values
my_records.sort();
- Iterate through and output these in HTML
for(i=0;i<my_records.length;i++){ // do something to my_records[i] }
Pure JS - Display Time Elapsed & Remaining
- Category: JavaScript
- Hits: 14824
This is an example of Javascript code to update and display the elapsed/remaining hours minutes and seconds in real-time.
Why?
I know there are a lot of articles out there that write about the same, but this is an example that I was coding and found to be one of the most reduced cut down formats I've made. I thought I'd make a note of it to not have to search elsewhere...
This example specifically displays the time remaining on an access_token which is generated from an OAuth 2.0 process. I want to display to the user how much time is left before another access token will be generated and how long ago was the last token created.
How?
So almost pure JS. I'm working out the seconds remaining and seconds elapsed in PHP first then passing these as two variables to the below code but you could get your values from anywhere:
Inline Labels in Form Fields using Javascript
- Category: JavaScript
- Hits: 28136
This is to describe how to change the value of a field of a form from it's default when it is clicked on so that it auto-clears and changes to how it normally works.
Example?
Note the value in the below field. Now click on it and it disappears, allowing you to type normally. Clear whatever you type so the field is empty and click somewhere on the page (not on a link as this will take you to another page) and the field returns to displaying "Name:".
Why?
I've noticed a lot of solutions now use JQuery or Mootools but most of these will not work in Internet Explorer 7 which is unfortunately still in use. I needed a back-to-basics solution and this is the one I have used since my fad of JavaScript 1.2 in the 90s. For broader compatibility, this is my recommended solution.
Slideshow div layer through a window
- Category: MooTools Framework
- Hits: 32109
What?
This article is a quick note to myself on the idea of a slideshow with the MooTools javascript framework. Basically, I want to create a div layer that I can see through (like a window with no glass) and for all the flashy stuff, to only appear within the boundary of the parent div layer.
Why?
I'm making a slideshow from scratch.
How?
The idea is:
Mootools - How to contain a menu sidebar between header and footer
- Category: MooTools Framework
- Hits: 17344
This has taken me too long to figure out and I hope I don't lose this note again. The only website that was titled similarly kept slowing down my computer too much so I decided to work out my own. The complexity is due to content also being dynamically resized in height.
What?
Basically I have a menu in a sidebar, I don't want it to overlap the header nor the footer.I have a content page next to it which changes in height dynamically (a separate mootool function to this one).
How?
Page 5 of 9
Credit where Credit is Due:
Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.
Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.
Thank you for visiting and, as always, we hope this website was of some use to you!
Kind Regards,
Joel Lipman
www.joellipman.com
Latest Articles
Accreditation
Donate & Support

bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4
0xb038962F3809b425D661EF5D22294Cf45E02FebF

