html

Does anyone have any experience using libraries to generate HTML from Objective C on the iPhone?

I need to generate some html from within an iPhone application. Do you have any recommendations on templating libraries to use? A simple Google search is turning up surprisingly empty. ...

Moving checkmarks in checkbox lists after page reload - Firefox only

I'm getting some strange behavior in Firefox whenever I put checkboxes inside a list (ol, ul, dl), and then dynamically insert buttons above the list. If I start with a something simple list like this: <dl class="c"> <dt><label for="a1"><input type="checkbox" id="a1" />one</label></dt> <dt><label for="a2"><input type="checkbox" ...

Is Javascript causing my form to not echo selected once error reloads the page?

Hello, I am still new at PHP/Javascript/Ajax and am having a very hard time (been going on for weeks) trouble shooting this problem. My site has a registration to be a member page that requires all fields to be filled out. This is a website for the Cystic Fibrosis community, so there is a section on the form where you choose your relat...

html anchor tag onclick problems !!

Hi all, I came across a strange problem with html anchor tags. I have an anchor tag on the html page and on clicking the 'a' tag it is supposed to give me an alert message. It is working well. But, If I append a new 'a' tag using jquery to the html page and on click of that appended 'a' tag is not working. i was able to give href, target...

PHP/HTML image resize

how can i resize an image like this: resize it to a specified width, keep the proportions and if the height is bigger than a specified value to crop to the specified height ? ok actually i know how to do that but i don't want to do this in a different file and refer the picture something like <img src="picture.php" />. I need to proces...

How do I load Javascript from an external file?

What is the best way to load a common Javascript chunk of code from a file on a simple website? I need to add a script that tracks users for the Piwiki Open Source Analytics. I have hardly worked with Javascript, and just wanted to know what should I do? <!-- Piwik --> blah blah blah <!-- End Piwik Tag --> Basically, I don't want to h...

end tag for element "div" which is not open? html validation errors?

Hi Does anyone know what these mean, I'm validating my website but I'm getting these weird messages about tags. I have and opening div at the top of the page but I still get these errors? Are they false warnings? Thanks for all your help Regards Judi # Error Line 195, Column 7: end tag for element "div" which is not open </div...

Dynamically populate an empty dropdown with a call from a service.

Hi, I am working on an application where we submit details to an external web page that we have no access to make any changes to. The external page is a .htm page. We want to be able to pre-populate the .htm page with the details from our WCF service and proceed to the next stage without user intervention. The problem is that there is...

<Canvas> contents as data?

Hello everyone, Is there a way to save a canvas element's content to data such as binary? I'm looking to be able to redraw this data when needed. Not really sure on how to go about it.. Thanks so much!! ...

Javascript Object Not Digging My PHP Var's Value (Has HTML in It)

Hello, I'm building a CMS for a client (Building on top of wordpress). I'm having an issue with some data I am returning from my database. Basically I am building Javascript Objects from PHP data so that I can update certain areas of my site upon mouse click. example (this would work fine): <script language = "Javascript> var myOb...

HTML Entity for DASH

Putting two dashes on a page sometimes, like this -- in rare occassions messes the HTML up. For instance, if you enter -- into your Wordpress blog it'll actually munch it into a single -. This doesn't work well for code that requires --options --to --be --specified --this --way. The HTML entity for is &ndash and the longer is &mdash...

regular expression to match specific text not linked

I would like to write a regular expression in javascript to match specific text, only when it is not part of an html link, i.e. match <a href="/link/page1">match text</a> would not be matched, but match text or <p>match text</p> would be matched. (The "match text" will change each time the search is run - I will use something l...

How can I show different content when JavaScript is disabled?

Hello, I need to show COMPLETELY different content when JavaScript is disabled. I know I can use <noscript> tag... but how can I hide the rest of the page when JavaScript is disabled? Thanks. ...

image not appearing in IE7 OR IE8

I have an image that is using absolute positioning on my site. It is positioned to appear over a css-background-image. It works fine in gecko based browsers and webkit. I was surprised to see the same problem in BOTH versions of IE including 8. I am currently using a png for the image but tried it with a jpg and that made no difference. ...

How do I implement auto-complete for City / State fields on a form?

I want to implement City and State auto suggest in a form textbox. How do I do this? Weather.com has a great example on this on their front page. Questions: Where can I find a complete USA listing of city and state pairings? And is there an open API for this? Do any existing scripts/frameworks exists that already perform this auto-s...

Is it useful to #container, #Wrapper in every CSS layout?

Is it useful to add whole code in #container, #Wrapper in every CSS layout? Can't we make layout without this extra div ? What are pros and cons to use this extra div? Is it good practice ? Is it useful for any type of design/layout? Is it semantically correct? ...

What is the benefit add position:relative to every layout element?

in many website's source code i saw position:relative is added to every div which makes layout and no #wrapper div being used? Is it good practice to add position:relative to every layout div? Is it related to IE 6 only? this is css .header { position: relative; float: left; left: 143px; width: 977px; height: 150px; background-color:...

HTML + Javascript form submission question

I have authored a html + javascript form which displays a set of images along with a submit button. The user can select the images he or she is interested in and when the user clicks the image, I change the image border to indicate image selection. And when the user clicks on the submit button, I would like my server side script to rec...

Should I use <table> or <ul> ?

I have to render dynamic data using javascript which should be displayed as n rows, m columns. I have heard of ill-effects of using tables but cannot justify on my own as to why I should/should-not use tables. Can you reason the best practice in choosing the alternative for the requirement. I at all <ul> is the alternative, how do I mana...

Display images in multiple rows based on div width

Hi, I would like to display multiple rows based on div width. Something like that: <div style="width: 100%"> <div style="width: 300px"><img src="img1.jpg"><br />Image name 1</div> <div style="width: 300px"><img src="img2.jpg"><br />Image name 2</div> <div style="width: 300px"><img src="img3.jpg"><br />Image name 3</div> <div s...