On a web page I'm creating, I have a div with a background image. I overlay some text over the image that I'll be changing frequently, so that's why I'm using a background image and real text instead of an img tag that contains the text.
The background image contains some click-able areas, so I need an image map.
I think the best way ...
Is there a way to abort the print event after a user has pressed the web browsers print button?
This works for print buttons within the HTML (jQuery):
print_btn.click(function() {
if (confirm("Are you sure you want to print? Consider the environment")) {
window.print();
}
});
Is there a way to do the same with the web...
Hi,
Are there some noticeable outcomes in terms of performance or other aspects to follow semantic HTML?
Thanks
...
During a log inspection of my ASP.NET MVC application I discovered that some users managed to post same form twice. I tried to reproduce it but I failed. Anyway I'd like to prevent users from posting same data twice. Is there any canonical solution for that in ASP.NET MVC or I have to develop my own custom solution?
I case of custom sol...
Here is something that I've used for ages now and all of the sudden I get these strange behaviours, maybe someone knows the reason why? Here is my HTML:
<div class="tooltip" id="tooltip"></div>
<input type="button" name="hide" value="hide" onclick="hide('tooltip');" />
<input type="button" name="show" value="show" onclick="show('toolti...
I'm trying to introduce a checkbox next to another element. The problem is that the a element has been made a "block" by the CSS so that it appears at the correct height and width. Being a block, I can't simply put another element next to it and hope it shows up there -- it shows up just below it.
A self-contained sample is shown bel...
Right now I'm capturing users' text selections through s = window.getSelection() and range = s.getRangeAt(0) (browser's impls aside). Whenever a selection within a <p> is made, I can easily call range.surroundContents(document.createElement("em")) to have the selected text wrapped with an <em> tag.
In this example, however,
<p>This is ...
In my application I'm exporting an Excel file by getting the layout of a HTML page. So, in my codebehind, I'm modifying the HTML layout and inserting itens on it like if it was a webpage. Doing it that way, I don't need to use any external library and, as the data I'm exporting is just a table, I don't need nothing complex to handle it. ...
Hi,
I need to parse a xml string to obtain the xml DOM, the problem I'm facing is with the self closing html tag like <br /> giving me the error of Tag mismatch expected </br>.
I'm aware this can be overcome by using <br></br> instead of <br /> in the string, but is there a way this can be done without making the above change.
please ...
I am working on a CMS. One of its functions is the editing of HTML "chunks" in a WYSIWYG editor that are displayed as individual pages.
I have an area in the CMS where these chunks are previewed.
The chunks rely on a "foundation.css" file that is loaded into the WYSIWYG editor. It does some small resets, defines a default font and tex...
Hi,
Working on a drag and drop feature and I would like to know/have an opinion on how you can tell if an element, in this case a div tag, is position (via the drag) over another element?
Thanks, R.
...
How do I show all divs in Firefox?
...
Here's my directory structure:
-root
--docs
---doc1.php
--includes
---header.php
---footer.php
---css.css
--index.php
In my header, I link to my CSS file like so:
<link href="includes/styling.css" type="text/css" rel="stylesheet" />
That works for index.php, because it's the correct path (root/includes/css.css).
But for doc1...
I have an php page with mixed Latin and Arabic characters. The charset declaration tag is in the html code
and the file is saved as UTF-8. All the text is static and in the php file (does not come from a DB or an external source)
When I browse to the site some pages randomly get corrupt in IE and FF and display all question marks. Aft...
I've always communicated required form fields on web applications to users by hanging an asterisk off the end of the control or the label and having a little sentence along the lines of "required fields are flagged with an asterisk(*)" or similar message at the head of the form so that they know what's what before they start filling it i...
Hi guys!
I have this problem on my website's layout, and it's basically preventing me from continue it, it's destroying everything.
here goes the HTLM code:
<table cellpadding="0" cellspacing="0" width="446" height="362">
<!-- MSTableType="layout" -->
<tr>
<td valign="top" colspan="2" height="110">
<p align="cente...
This is a continuation from http://stackoverflow.com/questions/1704845/redirect-only-html-files
How can I change my .htaccess to make it exclude certain subfolders or subdomains from the HTML-only redirect? I tried doing using this code to exclude the 'downloads' subfolder and the 'dev' and 'support' subdomains, but it didn't work:
Rew...
I need to match all of these opening tags:
<p>
<a href="foo">
But not these:
<br />
<hr class="foo" />
I came up with this and wanted to make sure I've got it right. I am only capturing the a-z.
<([a-z]+) *[^/]*?>
I believe it says:
Find a less-than, then
Find (and capture) a-z one or more times, then
Find zero or more spaces,...
Hello
I am trying a new functionality for my web site. I want to do simple navigation by hiding/showing elements.
For example, when a user clicks a "details" button on some product, I want to hide the main div and show the div containing the details for the product.
The problem is that to go back to the previous "page", I have to und...
I'd like to insert
<?php include_once('google_analytics.php'); ?>
before the closing body tag of about 100 php files. Unfortunately the person who made the site didn't make a header or footer template.
What is the best way to do this? I've tried using grep/find for getting a list of files and piping the results through xargs to se...