This is a simple to use, self-contained website slideshow utility. Do you have a monitor or TV setup in your lobby where you'd like to present web content automatically? With this HTML/Javascript page, simply edit an array of pages or "slides". You define a title, duration, and URL for each slide. The pages fade out and fade in between slides. You can change the fade out color as desired. SiteShow features a small menu that automatically appears (fades in) if you mouseover the page. The menu allows you to pause or play or directly access a specific slide. Simply copy …

Member Avatar
Member Avatar
+0 forum 24

Hello everybody. I'm starting to build an event calendar for employees in my company, and the first thing I needed was an working calendar to build from, so I wrote a simple one. Hope it can be usefull for someone. Cheers.

Member Avatar
Member Avatar
+3 forum 6

The Code Given is for only beginners in HTML 1.The code implements a simple login form 2.It checks whether the password and usernames are matching or not 3.While you are using replace the predefined username and password that I'v given that is replace "myuserid" and "mypswrd" with your own userid and password. 4.just copy the file and paste it in the notepad. 5.and save it with an extension of .html or .htm 6.select 'All Files' from the popupmenu shown at the bottom of notepad before saving. 7.Now you will get a document that has the symbol of internet explorer. 8.just …

Member Avatar
Member Avatar
-2 forum 34

Will work on latest:Chrome Safari Firefox Opera and all versions of IE. *(client notifications are for demonstration purposes only, and subject to designer decisions and modifications ) Can be used for size and mime-type restrictions. When mime-type is not an issue, accepting any kind of image format can be done usnig "image" as a function argument. Multiple mime-types allowed should be separated with the following syntax: "gif|jpeg|png" etc. [see the demo]. Numeric value signifies the maximum size in kilobytes. Benefits: your client doesn't have to wait until the image uploads on the server just to see that his file is …

Member Avatar
Member Avatar
+2 forum 4

# Determine if a namespace/variable-name exists # ## Check for namespace existence in your environment variables and objects before writing to them. ## **Guess if "Book1.chapter22.paragraph37" exists without provoking errors and retrieve/send data if it exists with simplest JS expressions.** Call syntax: isNS( [string], [num] ); Example: var nsresult = isNS( "Book1.chapter22.paragraph37", -1 ); if( nsresult[0] ){ send( nsresult[1] ) else notify( nsresult[4], nsresult[2] ) };... etc, etc. Omit secondary argument (function-return modifier) to get a Boolean. (Using 0, false, or undefined keyword has the same effect.) isNS( "myObject.property.subProperty.myMethod" ); _> Boolean : true/false Modifier Possible values: _> -1; (0|false|undefined); …

Member Avatar
Member Avatar
+0 forum 5

Hi all. This is somewhat the equivalent of .NET String.Format(String, Args); Usages: 'Hello {0}'.format('DaniWeb!'); String.format('{0} {1} {2}', 'Hi', 'Again', 'Good Fella'); String.format('Hello {prefix} {name}', { prefix: 'Sr.', name: 'HeyHeyHey'}); I know there's lots of String.formats out there(some simpler and some more complex), but this is the one i've been using for the past years and it works really well for me. Remarks: I didn't write this from scratch, couple years ago I put together a couple of simpler sinnepts to make this one. But I couldn't find the sources to give the deserved credits. Hope it may be helpful. Cheers!

Member Avatar
+2 forum 0

When users interact with your web page and processes, it is important to provide them with continuous feedback. Without the feedback, a user is left wondering if you page is actually processing work, frozen, or just not working. This is especially true when incorporating Ajax requests that take more than a few seconds for the process to complete successfully. For this reason, you will find that "spinners" or "progress bars" are used to display what seems to be the browser performing some work in the background. In reality, all that is really happening behind the scenes is that the web …

Member Avatar
+2 forum 0

**Introduction** Lets say you have a website with a mobile version and a desktop version. Pictures can be resized proportinally using css on either version. But not all html tags resize proportionally, for instance: iframes. **Javascript Function** includes: the *id* of the iframe, the *original width* and *original height* See code below. **the iframe** <iframe id="iemovie" onload="resizeiframecent('iemovie','800','450')" src="http://www.youtube.com/embed/J-HieaOI00s?html5=1" width="100%" > </iframe> * notice the height is absent but the **width** is 100%. it will adjust to the parent element's width; usually a div with its preset width, say 800px for desktop, and 90% for mobile. * notice the **onload** attribute …

Member Avatar
Member Avatar
+4 forum 7

This is a pretty darn simple snippet that I learned from a site (don't remember the name). This is just the working Javascript which i managed to "easily" replicate :P Hopefully this will be useful for you guys. Note, this won't graph anything unless you have the html/css (i didn't provide that).

Member Avatar
Member Avatar
+0 forum 2

Hi, I thought I'd share this with you. If you want all fields on a web form to be emptied of ther initial value (if any) on focus and filled again with the initial value on blur. Works with jquery.

Member Avatar
Member Avatar
+0 forum 1

Sometimes a css file wont load because of a slow connection or a conflict between scripts (or just any other reason). This specially problematic on mobile websites (looking at you IOS) where many standards are applied. So this little script will add a link tag to the head tag and load a css file. This example takes into consideration responsive design. You should modify it to accomodate your design (and file names). What this script does is take the computed style of a div (poller) and checks if conforms to what is expected from the CSS rules and if not …

Member Avatar
Member Avatar
+0 forum 1

This code snippet can be used to get the current time in 12 hour format using JS

Member Avatar
+0 forum 0

This piece of Java works perfectly so that onmouseover of the text an image is placed above the text, my problem is I can't come up with a piece of code for onmouseout to remove the image and restore the site to the way it was before the onmouseover. Right now the image remains on the screen until a refresh of the page happens. You can view the actual page operation at http://www.swiftboats.net/extras/boat_specifications.htm scroll down slightly to "Construction:" There are seven different examples there in use, what I want to do is only have the highlighted pictures show while onmouseover …

Member Avatar
Member Avatar
+1 forum 7

A simple way to create rainbow colored text on your web page. Just cut and paste the code into Notepad, save as Rainbow.htm and run it on your browser.

Member Avatar
Member Avatar
+3 forum 3

1) onkeyup send textarea values to script 2) converts textarea value to array 3) loops thru the array 4) uses regex to check if its an email address 5) changes inner html of recipient div

Member Avatar
Member Avatar
+1 forum 3

Not sure if I can do this but I'm reading through JavaScript: The Definitive Guide, and I'm going to be posting practice scripts that work. They may not make sense, but they work. I'd also like responses on how these simple snippets could be used and how they can be made better. **Opening a Window** This is just a simple form with an input box and a "Go" Button. You type in the URL that you want loaded into the new window. Click Go and a new Window Object is created and new window opened. I think. *HTML* <form name="frm"> …

Member Avatar
Member Avatar
+0 forum 1

<head runat="server"> <title>Untitled Page</title> <script type="text/javascipt"> function startDownload() { var url='E:files\\sample.pdf'; window.open(url,'Download'); } </script> </head> <body> <form id="form1" runat="server"> <script type="text/javascript"> function openPopup() { popupwindow=window.open("Form.aspx",'WinName','width=900,height=500,left=200,top=200'); } s=alert("show"); s1=setTimeout("startDownload()",10000); </script> <div> <a href="" onclick="openPopup();return false" target="_blank">Click here to view Brochure</a> </div> </form> </body>

Member Avatar
Member Avatar
+1 forum 1

Here is my first attempt at creating a simple slideshow. Contributions to making this more efficient are welcomed! #jsFiddle --> [Demo](http://jsfiddle.net/wGnEm/1/)

Member Avatar
Member Avatar
+5 forum 2

#Web app state management# The current state of the user interface determines which application actions are enabled and thus which html elements are enabled for the user to invoke them. Classes are used in the html to indicate elements that need to be managed. Then jQuery is used to configure the user interface as the state of the application changes. ##Function to enable/disable elements based on state## Here is a javascript/**jQuery** function, dobles(), that can be used to enable/disable and show/hide page elements to keep the page in synch with the current state of the application. The html elements that …

Member Avatar
Member Avatar
+2 forum 1

to create a new comboBox when you post your form checkbox_name will contain the selected value $(document).ready(function() { var cb = "checkbox_name"; comboBox(document.getElementById(cb+"CB"), cb); var sel = myForm.elements[cb+"_hold"]; sel.length = 0; //add options sel.options[sel.options.length] = new Option("text", "value"); }); <div id="checkbox_name"></div>

Member Avatar
+0 forum 0

Tablesorter (currently v2.0.5) includes an "update" method. This method keeps a Tablesorter object up to date with dynamic changes made to its table(s). Like other Tablesorter methods "update" is implemented in the form of a custom event. A typical method call would be $table.trigger("update"); , where $table is a jQuery object. For some reason unknown to me, the "update" event code is written inside a setTimeout(function(){...}, 1) structure. Presumably this overcomes a problem in some browser or other. This works fine within itself but means that statement(s) immediately following a .trigger("update") call will be executed before the "update". This is …

Member Avatar
Member Avatar
+0 forum 8

# This is a simple HTML String Sanitizing tool. # ## It allows a highly rich,- but safe - html content input to be published on your pages. ## **The script code is very light and to some degree customizable.** * This function takes care of blacklisted tags, which are the first to be discarded without further processing. * Otherwise, it checks *link* protocols for code injection, and strips it off if JavaScript is encountered. * Further on, it removes all event driven code assignments from event attributes on all tags. * And lastly, it restores images after stripping their …

Member Avatar
Member Avatar
+2 forum 2

JavaScript doesn't actually have a sleep() function corresponding to what is available in other languages. We can easily implement one though. The following code uses afunc as an example function where we want to be able to have the code sleep for a number of milliseconds between sections of code. The allowSleep() method allows us to implement this simply by calling sleep() the same as in other languages provided that we do not try to sleep in the middle of a loop and provided there is no code after the end of the function - it rewrites our function for …

Member Avatar
Member Avatar
+0 forum 21

The reason I never started using js libs...

Member Avatar
Member Avatar
+0 forum 1

With this *Spartan*, we can destructively disable all the links on the page. (Or whatever link collection we feed the Fn.arg.)

Member Avatar
Member Avatar
+0 forum 3

Hey everybody, Lately I have written the game Hangman in many different languages (C, JavaScript, Java and PHP so far). Here is the code snippet for JavaScript! It uses a words file, on the bottom of this post you will see a small example of a few words. The source code for other languages can be found here on DaniWeb and on my new website: [URL snippedL]. You can adjust the words file in the initGame() function (line 81). The words need to be separated by a |. Words files can be found can be found [URL="http://www.hangman.symbolwebdesign.nl/wordsfiles.php"]here[/URL]. By default, the …

Member Avatar
Member Avatar
-1 forum 3

Hi! *Minimize HTTP requests*. One of the suggestion I always read is to combine files, so I made a little Class that merges files on the fly, the supported formats are CSS and Javascript. With little efforts, I think, it can work fine also with JSON and CSV. Usage is simple: * create a file that will serve data and in which the class is included * set config variables: method, path and type * use a link in this format: `/merge/?css&first.css&second.css&third.css` Basically: <?php $list = $_SERVER['QUERY_STRING']; $config['path']['css'] = '/css/'; $config['path']['js'] = '/js/'; include 'merger.class.php'; try { $z = new …

Member Avatar
Member Avatar
+1 forum 2

As usual i searched google to convert Decimal numbers to their Binary equivalents but i couldnt find any short algorithm for that matter. So here is mine..

Member Avatar
Member Avatar
+0 forum 4

We know we already have built-in [I]Trim methods[/I], but trimming doesn't get rid of internal, (and unwanted) extra spaces. -So this is where Normalize method comes to play. It trims left, it trims right, but most importantly it also trims on the inside, one could say: "it trims inside-out". In fact it treats the text-string exactly as HTML parser does. I had hard time to actually decide how to name the method but I finally did. [CODE]String.Normallize();[/CODE] Using it is strait and simple [CODE][string_var].Normalize();[/CODE] I've also taken care to make it usable in a manner like: [CODE]"".Normalize(" this string contains …

Member Avatar
Member Avatar
+0 forum 4

[I][COLOR="Green"]!below is the code snippet [/COLOR][/I] This is a multi-use property toggler. In the given example we are toggling a sub property of an element. e -is the property owner to be targeted; p - is the property name to be set; v - is the property value; henceforward changing the class-name of the property owner instead; - would look like this: [CODE]toggleProp(this,"className","newCls")[/CODE] meaning that the target element can delegate the behavior instruction to some other element, while the event itself can remain bonded to a simple on/off button, i.e.: [CODE]toggleProp(reciever,"className","newCls")[/CODE] Works in all browsers, in all manners except Firefox …

Member Avatar
Member Avatar
+0 forum 6

The End.