HTML (Hyper Text Markup Language) is the standard content markup language of the web. It is an open standard developed and maintained by W3C (World Wide Web Consortium).

learn more… | top users | synonyms

8
votes
1answer
100 views

Checking all checkboxes

Problems: Wanting to check all checkboxes when the checkbox w/id=checkall is checked. Wanting to uncheck the "checkall" box when any other checkbox is unchecked. Solution: ...
4
votes
1answer
88 views

HTML Form validation with PHP

I'm kinda new to PHP and I'm trying to make a script to validate a HTML form only with PHP (I know there are options to do so with JS, but I guess it's better to have a "cover" with a server-side ...
1
vote
1answer
93 views

Lotto/lucky draw

The following script draws 6 numbers at random. I input another 6 numbers and compare with random numbers generated, if they're the same, you win. ...
0
votes
0answers
13 views

Stacking 2 fixed header [on hold]

I would like to stack 2 fixed header together while scrolling Is it possible with only HTML and CSS? If not, where can I find a short and clean javascript to achieve it? Code: http://goo.gl/KqAM2R ...
3
votes
2answers
40 views

Rendering nested array in a <ol> with headings

I have an array with the following structure ...
-4
votes
0answers
13 views

Header element or font-size [on hold]

I'm confused why people use <h[1…6]>-elements. What is the point to do that, I mean you can style every element using CSS to look like a heading: ...
1
vote
2answers
54 views

jQuery range slider change text based on hidden field value

I am working on a jQuery ratings function that uses the Foundation range slider. My current implementation works correctly on 2 of 7 of my range sliders. However, I am quickly realising that my ...
0
votes
0answers
17 views

Skip sending for all that return no results but still send to others [closed]

PHP below checks person's preferences in the database then pulls relevant jobs that match their preferences from another database table. It then compiles it into an email... I can't get it to stop ...
3
votes
1answer
40 views

Single button use to create light box that brings up different content based on the div

My goal is: when you click on the button "word" it will turn into a lightbox. The button will bring up another content box that holds the same profile image as before with a small bio with image ...
2
votes
1answer
50 views

The 101 Pictures Gallery

I am working on a website for a group of artists and want to know of a way to make my code cleaner and my website run faster. I am working on the gallery page, and there are over 100 pictures I want ...
2
votes
2answers
48 views

Displaying an overlay when hovering over photos

I have some very illogical jQuery code and I want to see if someone finds a better way to do the exact same thing: jQuery: ...
1
vote
1answer
35 views

Including a header file with proper content and structure

I am new to HTML and programming in general and am currently working on setting up my first website. For this I created a couple of PHP pages with a separate file for each of them and in order to ...
2
votes
1answer
38 views

Submit an array as html form value using JavaScript

I'm sending data from a form with a variable number of fields via an ajax call. Some of the fields are grouped together so I have opted to send them as an array of JSON objects to keep the groupings ...
3
votes
1answer
40 views

Simple HTML and CSS website

I'm making a really simple html website with CSS and I was hoping on some feedback. A few notes: There will be more content under this, but I want the starting screen to take up the full page and ...
3
votes
3answers
74 views

Price calculator (quote) based on word count

I am working on an ad form for a local newspaper. I am not familiar with the programming side of things, still learning. I was able to successfully get the form to count the words, but I need it to ...
2
votes
4answers
69 views

Hovering over multiple images to show another image while also fading in and out in jQuery

I'm trying to figure out how to correctly hover over an image to fade in another image and when you move your mouse out, it would go fade back to the normal image. ...
15
votes
6answers
1k views

To-do list in jQuery

I'm making a simple to-do list with jQuery. This is my first step in JavaScript and jQuery. How can I improve my code? User enter tasks in input field, submit by pressing 'Enter'. On double-click, he ...
1
vote
2answers
40 views

Reloading selects with JSON

My JavaScript code is slow for large inputs. However, it is especially slow in IE. The browser will freeze for about a minute while the select is being reloaded. Any ideas for how to optimize this ...
3
votes
2answers
63 views

Toggling html buttons and text

I went through a question on SO, and optimized the code according to OP's requirements. I would like a review if it is done properly or not. Here is the code snippet, there are 2 level buttons, when ...
2
votes
0answers
48 views

Truncating text with jQuery but keep the HTML formatting

I repeat here this answer on Stack Overflow. I first posted an answer with not finalized code, as a simple description of the solution I could think, without any test. But later I remained ...
3
votes
1answer
37 views

Algorithm for subdividing html-elements

I am trying to write a module that automatically subdivides div-elements, given some initial parameters. I've prepared the following jsfiddle. What I am doing at the moment is: Setting the width ...
12
votes
2answers
172 views

FizzBuzzLizardSpock

I decided that since I was learning AngularJS and Bootstrap, I'd be remiss not to post a FizzBuzz, but FizzBuzz bores me, so I've extended it. My version of FizzBuzz is configurable, and allows you ...
2
votes
2answers
78 views

A chessboard model in JavaScript

I've created a chessboard model in JavaScript that will eventually iterate through some moves of a championship game. I've created a board object and a piece constructor. I've also created all the ...
3
votes
1answer
59 views

HTML/CSS MS Word style navigation ribbon

I made a MS Word style ribbon header, but it all seems very hacky, and I'm not really sure how to simplify it to something more reasonable. Rolling over one of the navigation icons changes the related ...
3
votes
1answer
29 views

Avoid jQuery in click event

I have the following controller: ...
0
votes
0answers
29 views

Replacing code inside div to actual text and then removing script, iframe and other related attributes

Let's take the Stack Exchange example here. When you write code on your "about" section on your profile here on Stack Exchange, the code is automatically converted to actual text/HTML. For example, ...
4
votes
1answer
67 views

Generate N pairs of checkboxes and N textboxes

I've written a piece of code, where a pair of checkboxes and a textbox are generated N amount of times. Depending on what's in the DB, the checkbox/textbox may have a default value or are left empty. ...
0
votes
0answers
28 views

JavaScript process HTML response

This is a function from a Tampermonkey userscript that I use. I am not the author of the original script, but I am trying to make some modifications to it. The script adds output to an HTML page ...
1
vote
1answer
121 views

Use Promise to wait until DOM element exists

I need to create a JavaScript Promise that will not resolve until a specific HTML element is loaded on the page. I don't have any way of knowing when this element will be loaded, other than to simply ...
0
votes
1answer
35 views

Massive Number Of Scripts With Angular

I've recently started switching from JQuery to Angular and it's awesome at making my HTML expressive and easy to read but every reusable module I make has its own script which leads to a massive ...
2
votes
2answers
64 views

(Part 2) Securing PHP shopping cart (Paytrail integration)

i've developed my shopping cart further. This is related to my earlier post: Securing PHP shopping cart In addition to those functionalities, i've proceeded to make integration to Paytrail payment ...
8
votes
3answers
97 views

Single Digit Math Quiz

I decided to write a very simple web-game: ...
11
votes
2answers
71 views

Prorated refund calculator

I wrote this little piece of script for my workplace (insurance, etc.) to help our admins, as a light and simple file I can just email to my colleagues. The purpose of it is to calculate a prorated ...
2
votes
0answers
48 views

jQuery boilerplate library

I'm working on my library. It's just a boilerplate, wrapping some script code, with helper functions, some plugin implementation, required meta tags etc. How can I develop this better? ...
3
votes
0answers
40 views

Using Nokogiri to scrape Oscars winners from Wikipedia

I am scraping a Wikipedia page, getting info from that page and instantiating a new object with the information collected: ...
2
votes
1answer
52 views

Setting header color on scroll for each post

On this site this site, I have some code which you can see below which figures out the offset for each post from the top of the document and assigns a colour from each post to the header when it ...
1
vote
1answer
49 views

Image slider demo

Since I'm new to web development, I've decided to create this carousel, to practice a bit of JavaScript, more specifically jQuery. I'm really happy with the result, but I'm sure that to an expert my ...
7
votes
3answers
113 views

On hover, hide text and display options

Recently I learned HTML+CSS and a bit of jQuery and am building various web-things to stretch my skills and learn more about how to do things the right way. I was a bit surprised at just how many ...
3
votes
1answer
47 views

Simple AJAX script calling a number

I wanted to create a basic interaction which does 1 outcome but with 2 possible actions: get a number from an other document, by either clicking on a button or waiting a fixed amount of time. I wrote ...
5
votes
1answer
54 views

Simple syntax highlighter - part 2

I've completely revamped my old syntax highlighter, and made it more flexible and easy to use. It works the same way as the previous one, wrapping <span> ...
2
votes
1answer
56 views

JavaScript dropdown component

How can I improve this component with using event delegation rather than doing a lookup using parentNode so that I can change the markup around without having to ...
0
votes
1answer
91 views

Auto generate text input and checkboxes when value of text input changes

In these fiddles I am generating the number of textboxes and checkboxes depending on the input of user. This first fiddle deals with the first problem generate number of textboxes onchange of the ...
10
votes
1answer
219 views

Rendering an HTML form based on a specification in a string

Here's a brief explanation of my method: Provide a string and parse it to HTML code respecting a specific format. The accepted format is: For dropdown menu : Test DropDown~Select:Options1; ...
-1
votes
1answer
30 views

Listing blog post excerpts

I have created many sites that requires php and html. They all work fine, but I'm now thinking if all that time I do it in a wrong way. Usually, first I build the site template, then styling and last ...
7
votes
1answer
162 views

Simple grid using SVG

I developed this grid which displays number of records for X & Y, user can click each number to see a list. (I didn't add list markup to fiddle yet - so lets not worried about it for now.) What I ...
3
votes
2answers
68 views

jQuery Accordion

I have some JS that I am not OK with. How can I reduce the amount of code? ...
8
votes
2answers
291 views

Simple syntax highlighter

I've made a simple in-browser syntax highlighter using JQuery. It's pretty simple, it just wraps keywords, integers, and such in <span> elements with color ...
4
votes
2answers
59 views

Dynamically Generating a Map Webpage for MMO

This question is related to my previous question about an MMO Server. Here, what I am doing with this program is connecting to another Java server program that resides on the same server as the MMO ...
2
votes
2answers
107 views

Dynamic PHP Form Submit Script

Below is a PHP script which dynamically finds and process all of the form elements such as inputs, textareas, dropdowns etc... then organize them into a table as shown in the image below when sending ...
3
votes
0answers
76 views

Personal Website

I have written the following code for my personal website, in Jade and Stylus. Can anyone review this code? Are there any tips that you can give me on how to make it better? Here is the main-page.jade ...