html

How To: Displayed image file name different than actual filename on server.

I would like to display an image but have the file name different than the actual file name on the server. ex) The user would see <img src="/img/photos/Awesome_Picture_By_John.jpg"> by looking at the source code but the actual file name would be /img/photos/12b7dch2.jpg any help is appreciated. Thx ...

Ajax Post method using jquery

<script type='text/javascript'> $("#cart").click(function() { var loadUrl = "ajax_redirect.php"; var val = "2"; $.post(loadUrl, { page: "cart", data: val }, function(data) { alert(data); alert("Course added to Cart"); } ); }); </script> <body> `<a class="button" id="cart" href="#" title="Apply"><img src="images/button....

The modern way to clear floated content?

What's the modern way to clear floated content these days? There's the "recent" modern way of adding a ".clearfix" on the parent element to clear the contained floats and that would work great. In fact, this is my favorite method and still use this on any site I touch. It makes every browser render correctly. However, I know it's sort ...

nokogiri multiple css classes

How is it possible to select an html element that have two classes. For example, hot to select the element p bellow in an html document (given that it has two css classes) class='class1 class2' : I tried to use the following : doc.xpath("//p[@class~='class1 class2']") doc.xpath("//p[@class~='class1']|[@class~='class2']") doc.xpath("...

Anyone familiar with <center>?

I see this in a website for the first time of life. Is it supported by all browsers? ...

Generating HTML file which fetch data from SQL in the C# and ASP.NET

I'm new to ASP.NET and now I am creating an HTML file in ASP.NET C# which is stored in an folder. Now when the aspx file is run it will fetch some data and display it in the output. And there is an button. When I click it the HTML file is created. Now my problem is I want to fetch the same data in the HTML file also to display it and to...

How to implement a search in a HTML site?

I am really wondering if i can use search for a HTML website. The pages are static. I just want the users to able to search for contents of my site. and the results shown with in my site itself. Is there anyway i can achieve this. I can use PHP on my server. Google search can be implemented but it takes you to google's page to show the r...

How to output <option selected="true"> from JSPX ?

A few html tags interpret "any" value of a give attribute as "true" -> option tags come to mind. I frequently end up doing something like this: <c:choose> <c:when test="${isSelected}"/> <option selected="true">Opt1</option> </c:when> <c:otherwise/> <option>Opt1</option> </c:otherwise> </c:choose> I kno...

Is it ok to remove the lines below in a HTML file?

Is it ok not to include such lines in a HTML file? Removing these lines makes the code look more clean. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <meta http-equiv="Content-Type" content="tex...

Angle brackets in php

I want to store angle brackets in a string in PHP because i want to eventually use mail() to send an HTML email out. The following is the code that doesn't seem to work. while(...) { $msg .= "<img src=\"http://.../images/".$media['Path']."\"&gt;&lt;br&gt;"; echo "message: ".$msg."<br>"; } What I want is for $msg to contain a bu...

How to print a page with more attractive way

I have a web page to print the customers for each each company has. For instance the comany name is A. A has 4 customers and A wants to print its customers' detailed list to A4 page. On the other hand the comany B has 75 customers. Each customer, doesn't matter belong to which company, may have different size of detais. COMPANY A FORM ...

Making right div repeat background based on left div's height

I have two div's in a container div, one floating left, one floating right. I have a php function for a search engine that spits out results, into the left div. what I need to do is have the right div repeat the background based on the height of the varied results on the left div. I have no idea how to go about this, any ideas? Right n...

HTML / CSS table with GRIDLINES

how do I display the gridlines in a HTML table? (am using IE6) ...

Why does select with onfocus not work in IE?

I want to highlight a select element with a background color to indicate, it is mandatory. When the user opens the menu by clicking on it, I want to remove the background color, so it looks nicer and is more readable. This works just fine in Firefox, Chrome and even IE6, but on IE7 & 8 the pulldown doesn't open on the first click (or is ...

Editor with design view?

There are editors better than dreamweaver in some cases but because most of them dont have html/code design view, i resort to dreamweaver. Does anyone know any other code editor having design view like dreamweaver? ...

Does the Browser store the calculated coordinates of a div in accessible variables?

Hi Guys, If I have a flowing layout (position: static / relative), does the browser store the calculated coordinates (x,y) of a div in properties which can be accessed? Further, it would suffice if the solution worked with Firefox only. JQuery is unfortunately, not an option. ...

resized image coordinates in html

Hi, I have an image in a html page resized to 400px width with css .cropbox { width: 400px; height : auto; } Also i have a js on that image that let the user select one point of the image. Of course the coordinates are relative on the resized image. How can i get the coordinates relative on the original image? Something like newx = o...

Span inside a or a inside span or doens't matter ?

I want to nest span and a tags. Should I Put <span> inside <a> Put <a> inside <span> It doesn't matter ? ...

Javascript update to HTML table cell (from thousands to millions)

I need to create some javascript on my web report which converts table values to thousands or millions (eg divides or multiplies by 1000). The trouble is that each value is 'clickable' (ie it is wrapped in an anchor tag). Is this possible? <table class="Table" > <thead><tr> <th class="l Header" scope="col">£000s</th> <th class="l ...

HTML: Coloring part of text in a line

Consider the following: <p> <b> <div style="color:rgb(81,33,244)">Player1</div> </b> to overtake <b> <div style="color:rgb(187,4,0)">Player2</div> </b> in 1 hour 20 minutes </p> In this Player 1 and Player 2 are shown in different colors, however the 'div' breaks the line and it looks somethi...