Found some cool glow effects. Couldn’t actually get them to work in my context, but it’s the thought that counts.
Tag Archives: HTML
Passing selected value into HTML select onchange handler
So you have a <select> element and you want to call a handler, but you need to pass the selected value to the handler because you have multiple instances of the same <select> and can’t access them by ID (because there is many, one of which will have the new selected value, but you don’t know which). The solution is to pass in the newly selected value, like this:
<select onchange='handle_change( this.value )'>
Easy-peasy!
Get element or tag name with jQuery
To get the element/tag name with jQuery:
$( '.selector' ).get( 0 ).tagName
jQuery htmlspecialchars equivalent to encode text as HTML
Found this which said:
$('<div/>').text('This is fun & stuff').html();
CSS height 100% not working
My CSS height value wasn’t being applied. Found this. The problem was that I needed to specify heights for all of the ancestor elements. Bug fixed!
HTML meta refresh
Today I read What is the Meta Refresh Tag? about the HTML Meta Refresh facility, basically:
<meta http-equiv="refresh" content="0;url=https://www.jj5.net/">
Embedding archive.org videos…
Today I read about how to link to archive.org videos…
HTML blockquote
Today I was forced to lookup how to treat <blockquote> and <p> elements. It turns out you wrap paragraphs with blockquote, i.e.:
<blockquote><p>...</p></blockquote>
Character encodings in HTML
Today I had to look up all the various ways HTML might nominate a content-type and I found Character encodings in HTML over on Wikipedia which had all the answers…
Set the target frame of a form
Today I had to lookup how to set the target frame of a form.
Basically you set the ‘target’ attribute on the form to the name of the frame you want to target.