Quantcast
Channel: DaniWeb Code Topics
Browsing all 225 articles
Browse latest View live

Ajax API

Hello everyone, I wrote an Ajax API, and I thought that it may be of some use to you all. I think that it's pretty self-explanatory. Post or PM me if you all need more or need help. Peace! -Stev

View Article


JavaScript (Spartan) Property Toggler

!below is the code snippet 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...

View Article


idle user timeout with relogin popup

I hate websites that timeout and don't let you know about it this script pops up a message when you timeout and allows you to re-login in place

View Article

client-side Image size/type validation (demo)

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...

View Article

String.Normalize()

We know we already have built-in Trim methods, 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,...

View Article


Get dll location with javascript

I am currently stuck with problem of set the dll file location path in my javascript object, in the classid i currently do this: "classid="http:RFID_AUCMS.dll#RFID_AUCMS.Main" This work fine if i put...

View Article

Practice Scripts - Opening a Window

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...

View Article

Sample code to download a file by submitting a form

<head runat="server"> <title>Untitled Page</title> <script type="text/javascipt"> function startDownload() { var url='E:files\\sample.pdf'; window.open(url,'Download'); }...

View Article


JavaScript Sleep

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...

View Article


Image may be NSFW.
Clik here to view.

Web App State Management

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...

View Article

page links destroy

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

View Article

the underdot platform

The reason I never started using js libs...

View Article

Sanitize HTMLString

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...

View Article


ComboBox

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);...

View Article

Simple Month Calendar

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...

View Article


Slideshow

Here is my first attempt at creating a simple slideshow. Contributions to making this more efficient are welcomed! jsFiddle --> Demo

View Article

Automatically and proportionally change iframe height for mobile and deskto

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,...

View Article


Count E-mails in textarea

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

View Article

Text onmouseover to show image then remove

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...

View Article

Escape button

Here Iam creating two dialog boxes on the click on links.When Dialog box no. 1 is open and I press escape key then it gets closed but this is not the case with dialog box no. 2.Why so?

View Article
Browsing all 225 articles
Browse latest View live


Latest Images