Let's say I have this string:
Hello &, how are you? I'm fine!
Is there a function that will convert this to:
Hello &, how are you? I'm fine!
Also, why does "'" sometimes show up as: � on sites? What am I missing?
...
Hello,
can I programatically (or, as we're speaking about html and css, semantically) decide in which order should images load?
I want to make background image load first and then call som javascript upon $(window).load, is it enough to leave it on browser (e.g. body-background is on line 40, other images are later in css file) or do I...
Hi everyone,
I have the following code (inherited from someone):
<div class="feedback"> </div>
<form onsubmit="return false" autocomplete="off">
Enter your guess:
<input type="text" size="48" id="guessedword"/>
<input type="submit" value="Guess!" id="guessbutton"/>
</form>
</div>
Now, I want to do someth...
I went to test my page on another browser. On google chrome i can fill out a form, hit back and forward and still have the data there. Now i need to refresh the page so certain data is correct (such as session id if the cookie expires or user logs out before submitting). I refresh and lose all data. Is there some option i can set so all ...
I have a string containing HTML and I need to replace some words to be links - I do this with the following code;
string lNewHTML = Regex.Replace(lOldHTML, "(\bword1\b|\bword2|word3\b)", "<a href=\"page.aspx#$1\">$1</a>", RegexOptions.IgnoreCase);
The code works, but I need to include some exceptions to the replace - e.g. I will not r...
please help me to find a solution on this coding
<div id="side_forums_pane" class="side_pane" style="display:none; height:330px;width:260px">
<div class="jscroller2_up jscroller2_speed-19 jscroller2_mousemove" style="height:105px;align:left;left:2px;right:2px;width:160px;overflow:hidden;">
<b style="text-decoration:underline"...
I'm trying to center an image in php. I'm currently using this line of code
echo '<img src="newimage.jpg" width="110" height="120" class="centre">';
However, this seems to have no effect. I've also tried using something like this,
img.center {
display: block;
margin-left: auto;
margin-right: auto;
}
<img src="newimage.jpg" al...
I've just gotten into web development seriously, and I'm trying to make a page that appears the same physical size ( in inches ) across all browsers and platforms
I believe a combination of percentage values and inch values can make a consistent UI.
my own system is a 15.4 inch screen with 1920x1200 pixels i.e. 144 DPI.
Here is the mo...
Even Stack Overflow doesn't compress their HTML. Is it recommended to compress HTML? As far as I've seen, it looks like Google is the only one.... (view the source). Why isn't this standard practice?
...
When scrolling the div the table cells move, but the cell text stays in the same position relative to the page. The cell text should scroll along with the cell even though it's in a relative div.
The problem can only be seen in IE (IE7 at least).
The sample behaves correctly in Chrome and Firefox.
<!DOCTYPE html PUBLIC "-//W3C//DTD ...
I have a python psp page code is shown below. Currently it only prints out the characters in single rows of 60, with the character count in the left column.
<table>
<%
s = ''.join(aa[i] for i in table if i in aa)
for i in range(0, len(s), 60):
req.write('<tr><td><TT>%04d</td><td><TT>%s</TT></td></tr>' % (i+1, s[i:i+60]));
#end
%>
</...
I have a form with 2 text inputs and 2 radio buttons, as below:
<form id="form1" method="get" onSubmit="exec()" action="default.html">
<label>First input<label>
<input type="text" id="input1"/><br />
<label>Second input</label>
<input type="text" id="input2"/><br />
<label>Radio button 1</label>
<input type="radio" id=...
Woo, I have a doozy of a problem (might even be one for the Daily WTF) and I'm hoping there's a solution. (My apologies for the long post...)
I have been working on a website that I inherited about a month ago. One of the parts I have been working on is fixing one of the controls (essentially a dynamic header bar) so that it displays ...
How can I change cachable content so that the user will immediately get the refreshed version?
I'll give an example: I have a .css file that is cachable for 2 weeks, so even if I change it, users will still get the old version, unless the press F5.
There are a few solutions, that I know of, but none are perfect:
Changing the filena...
Let's say I have a Tomcat and a web application on it with index.html is in catalina_home\webapps\ROOT\index1.html and this web application runs successfully to the internet.
Also I have a glassfish with another application deployed on it with let's say an index2.jsp.
Can I have a link in index1 that can open index2?
...
I'm trying to create an HTML email that will display properly in all widely used email clients. I'm wrapping the whole email in a table, and I'd like it to have a width that is up to 98% of the available width, but no greater than 800 pixels. Like this:
<table style="width:98%; max-width:800px;">
But I'm not doing it that way, since a...
I've tried searching for the answer to this question all kinds of ways but with no success.
Is there a list of "standard" names for fields in an HTML form? For example, "First Name", "Home Phone", etc. I suspect there's probably not an official standard but more of a loose convention. I am creating a form and if possible I'd like it to ...
I have a public in my code behind page that takes a string.
I would like to call this method from javascript.
The parameter that I want to pass down is variable that changes from a ddl.
So I have something like this:
var value = document.getElementById('ddlContact').value;
<%=PopulateContactFields("value") %>
This p...
Hi folks,
I'm trying to add textures and shadows outside div elements in a webpage, without using "wrappers".
Any suggestions?
These are a few examples:
Help would be very much appreciated!
...
assuming the following html (minus the comments and "nbsp;" etc that xQuery wont process as is) why does this following code work
for $first in fn:doc("file:///index.html")//element()[local-name() = "head"]
return <test>{ $first }</test>
and this
for $first in fn:doc("file:///index.html")//head
return
<test>{ $first }</test>
...