html

:after pseudo-class and tags

Hi, I just created a simple page where I tried to emulate ajax with CSS. For doing that, I wanted to create invisible radio-buttons with visible labels, an external CSS-file should be loaded as soon as the user clicks on a label. There is just one problem: Tags are printed out as plain text inside the class. Is there a way to handle tha...

Iframe – let the user pick the src - any security issues?

I want to allow the logged in users to view any 3rd party content via an IFrame. Something like allowing Gmail users to view any Web Calendar they want inside an IFrame. Is allowing the users to set the IFrame Src Url a security problem? What security issues will I face? Any other need to know Tips for using IFrames will be welcome. ...

Final value of an appended element using jquery

Hi all, I have a table in which i append rows on onclick event, the row has a button which enables you to delete it ... this works fine. The problem comes when i have inserted some rows e.g 5 rows, and i delete any row btwn the 1st and last row then add two consecutive rows , the last row is duplicated with the counter value of the prev...

What is the best way to post contents of an ordered list on html form submission?

In the past I have always used a hidden field, and on the submit button onClick event I stuff the list contents (the text of the li elements) into a hidden form field using custom code, and parse it out on the server-side using custom code. This has always felt like a hack and I was wondering if there is a more modern approach. I'd lik...

Switched to new server - Why do relative links link to ip address, not domain.name

Just started a new server - relative urls go to ip.numb.er/files rather than www.domain.com/files and this is causing images and links to work incorrectly. Did I misconfigure something? Forget to turn on a switch? ...

How to handle linking without hardcoding (relative, absolute, or using a media_url)

I have a website that uses php includes, for thing like the header and navigation. I am linking to a lot of css /js files in the header, obviously. I also want to be able to move the website into a subfolder of another site, so it can be located at www.example.com/somefolder/MySite, so I can't hardcode my links to be relative to the ro...

Meta tag redirect good or bad for search engines?

I have this meta tag to check if JavaScript is enabled: <meta http-equiv="refresh" content="0;url=http://www.example.com/activate_js.html"&gt; Is this bad in the eyes of search engines like Google, Bing and Yahoo? If so, what other "safe" methods are there? ...

JS element style switching

I need to switch my element background image beetwin two images on every click on it. I have this, byt it swithes color just two times =\ <html> <head> <title>Javascript Change Div Background Image</title> <style type="text/css"> #div1 { width:100px; height:30px; background-image:url(blue.png); } </s...

submit form with normal link, wont work

I have this: <a style="display: inline-block; width: 100px; font-weight: bold;" href="javascript:submit()">Search</a> As instead of a button with submit, but nothing happens when you click.. How can do this? ...

Finding Unicode character name with Javascript

I need to find out the names for Unicode characters when the user enters the number for it. An example would be to enter 0041 and get given "Latin Capital Letter A" as the result. Thanks ...

Do I still need to use the title attribute if my element has a `<figcaption>`?

I have a piece of code like this: <figure> <img title="An amazing image that I forgot to specify a url for"/> <figcaption>An amazing image that I forgot to specify a url for</figcaption> </figure> Is it necessary for me to specify the title attribute in addition to the figcaption element, and will not doing so result in SEO pr...

How to replace a HTML-tags inner text content using C#!

Hello! Right now I'm working on a Internet Explorer add on which is supposed to scan a HTML-document for URL's in plain text, and then "linkify" them. I have access to the websites DOM, and had an idea to traverse all of the DOM nodes and search for "links" using RegEx, to replace these text with HTML-code, however, when changing the "...

How to use option lists to change POST value ?

I have a gallery page that change the category based on the $_POST("cat"), how do I use the option dropdown list to reload the page (or only the gallery) to change the gallery view accordingly. Here is the option list: <form> <select> <option value="">Pick A Category:</option> <option value="1">Landscape</op...

How can I resize an image, added via ajax, to fit within specific dimensions while maintaining aspect ratio using JQuery/CSS?

I've got a web application that loads some content from an external source to the dom via an ajax call, one of the things that comes back is a set of images (different sizes and aspect ratios) to be displayed in an profile photo section. I'd like for each of the images to be resized to fit within a 64px x 64px area and I'd like to mainta...

HTML how to use different fonts

if i place my ttf font file in my websites root folder lets say named AMC.tff and in my website use <font face="AMC"> is it going to work... if not than what is the method to use unusual fonts in your website ...

Clicking inside canvas element selects text

I have a canvas element in my HTML document. When I click inside of the canvas multiple times, it selects part of my <h1> element's text, which is before the <canvas> tag. Is there a way to stop this from happening? I am guessing there is a JavaScript solution. ...

what kind of html element is used for users to input an order?

basically I have some SQL and I want the user to be able to select the ordering in the "order by" section with an HTML element. Are there any out-of-the-box solutions? edit: it's more like order by country,status,... or order by status,country,... ...

How to change this code in order to work another way

I have this code : <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"&gt;&lt;/script&gt; <script> $(function() { $(".button").click(function() { var dataString = "message= "+...

How do I style a table like a notepad?

I would like to create a CSS/HTML version of this notepad on my page: I was thinking of using a simple table like this: <div id="notepad"> <table> <thead id="tbl_header">Comments</thead> <tr></tr> <tr> <td class="col1">Dot</td> <td class="col2">Text for...

absolute positioned div inside of relative positioned div?

Hi there, Most people are aware of Using absolute positioning on a div whose parent is set to position: relative will cause the absolute positioned div to become relative to the parent div instead of the body. My question is, is there a way to remove this effect? I.E The parent div needs to be set as position relative so it w...