html

how to have data align to top of html table row

i have this html table where i have one cell in the table with rowSpan = 3. so in the first column, i have 3 rows with inputs and in the second column i have a picture showing to span all 3 columns. I am trying to figure out how the browser figured out how to vertically allocate spacing for each of the rows in the first column. I wan...

jquery - find Nth word in paragraph, add an anchor, then hide remaining text..

Hi I need a way to force a "read more" type effect using jquery. I suspect it will be rather difficult going about it this way but here we go. Take this paragraph: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque interdum nisi ut sapien tincidunt pretium. Maecenas vel mi eu dui feugiat hendrerit. In hac habitasse...

Is it generally acceptable to use a primary key as a the id of an HTML element?

I have an HTML list whose <ul> items have ids same as the primary keys in the database table. Is it generally acceptable to expose the primary keys for this purpose? If not, what efficient methods can be used to mask them? ...

How to add Return Home button to external sites?

Hi, I am developing a website with some links to some pages on external websites (belonging to the same company). The client wants to add a way to easily return to the home site, i.e. something better than just using the browser's Back button, and something better than just opening the external links in a new browser window. Seeing as ...

asp.net mvc - show content from string with html

in my Model I have a string property Feeds with value like that: <img src="/Images/Company/twitter.png" style="border:0; vertical-align:text-bottom;"/>&nbsp;<b>9/29/2010 1:01:33 PM</b><br/>How to get started building rich #VS2010 #VSPackage based extensions - <a href="http://bit.ly/a8ksc1" target="_NEW">http://bit.ly/a8ksc1&lt;/a&gt;&lt...

Wordpress theme with multiple color schemes

I am building a WP theme and want to implement multiple color schemes. I looked through different free and premium themes and found out that this feature is developed different ways there and here. What is the best practice to make multiple color schemes support in a theme? ...

$('#id1').html(" ") removes all children of #id1 from DOM, or they are still there ?

I do something like this: $("#id1").html(data); I refill a div with html but when I try to get the html of a child of this refilled div I get an empty string although it has, it's like the old child is still there but without html. Edit: I tried to reproduce my problem, here is the html: (click 2x times on refill and after click open...

PHP and cookies

What is the best way for storing users IDs or usernames so they will not have to login every time? I want to forward user to the members page if the stored ID or username is compared with the one stored in database. Is is safe to do it using cookies and how can I do that? ...

How to prevent form submission and make jquery ajax call instead

I have an event to capture when the return key is pressed on a form input field, but the ajax call is not fired, instead the from is submitted as a normal http request. $("#addurl").keypress(function(e){ switch(e.keyCode){ case 13: // add url ajax call $("body").html(ajax_load) ...

Jquery detect when user uses SELECT element in form

Hello, I want to be able to detect when the user has selected an option from a SELECT element in a form. I know what to do from there, but not sure about how to achieve the initial detection. <select id="mySelect"> <option>1</option> <option>2</option> <option>3</option> </select> I would like the solution in JQuery if po...

ASP .NET Event Wire-Up for <input type="button"> tag (not asp:button or server link)

Here is what I want to do. Use this HTML line and have the ASP .NET server-side deal with the onclick event. I don't want to use nor do I want to use an anchor tag which would both allow me to capture the server-side successfully. I want to use this: <input type="button" id="submit" name="submit" value="See Your Results" onclick=""...

submit button and display block in IE

hi, why does the code below put the submit button on its own line in FF but on the same line in IE? <style type="text/css"> #div1 form input.submit {display:block;} </style> <div id="div1"> <form> hi <input type="submit" class="submit" value="hello there"> </form> </div> ...

Using AJAX to loop through Dynamic XML Nodes and inject into a set of h2 elements using jQuery

So, I have a list of nodes in a dynamic XML that is cached on a server. Using Ajax, I loop through the particular nodes to return a string each time: XML: <?xml version="1.0"?> <Products> <Product> <ItemName>String</ItemName> </Product> <Product> <ItemName>String</ItemName> </Product> <Product> ...

XHTML JavaScript preload images before rest of page is loaded

Hello! Is there anyway I can delay the display of the HTML code (page) until some certain images are loaded so that the layout appears with the header images as well as the HTML? Thank you. ...

Anyway to get this small piece of code to look the same in FF and IE in quirks mode?

Hi, I have the following code: <html> <head> <style type="text/css"> li {list-style-type:none;} label {clear:left;float:left;width:110px;} input.submit {display:block;margin:20px 0 10px 110px;padding:4px 0;width:140px; } </style> </head> <body> <li><label>Full Name:&nbsp;</label><input type="text"></li> <li><label>E-mail Address:&nbsp;<...

PHP: mail() function doesn't work on long html messages.

Hello everyone, Here is my code: $message = ' <html> <body> <table> <tr> <td> <img src=http://www.mdrnfx.com/mail_ust.jpg&gt; </td> </tr> <tr> <td> <br> <div align=justify> <p> <strong>Bugün demonuzun 2. günü…</strong> <br />Öncelikle bizi tercih ettiğiniz için teşekkür...

illustrator map to imagemap automatically? or is there a better way?

i have a vector illustrator file with all the counties of california as distinct paths. i need to have these counties be links to other pages online. is there a way to automatically generate an html imagemap from this file? illustrator provides an export as jpg function that has options for polygonal imagemap shapes, but it isnt working....

How do I fix invalid HTML characters in pages served with different encoding?

I have a number of websites that are rendering invalid characters. The pages' meta tags specify UTF-8 encoding. However, a number of pages contain characters that can't be interpreted by UTF-8, probably because the files were saved with another encoding (such as ANSI). The one in particular I'm concerned about right now is a fancy apostr...

HTTP Doctype header issue causes problems in IE7?

We've built a javascript based widget that our client has embedded in their website. They claim it doesn't work on their site in IE7, and that the problem is the difference in doctype headers at the top of their pages: Ours: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transiti...

opening a new window counteracts my "enforce_auth"

Hello, On my social network. There are "home" links that take you to the appropriate index if you are signed in or out. There is a "index.php", that if you are browsing the site signed out, it takes you there, and if signed in, and hit "home" it takes you to "index_signedIn.php" This is working fine for me. The problem is, when I close ...