html

What are the advantages of creating web pages with XML instead of HTML?

Hi Everyone, From time to time, I see web pages whose content is solely written in XML (not HTML or XHTML). These pages usually have some style sheets (either XSLT or CSS) attached to them which makes them look like any other ordinary web page. My question is, what are the advantages of such an approach (if any), and why would anyone...

PHP Search for string then get next characters

Hello, I have a string that looks like this: blah blah blah Team ID:</div>xxxxxxx blah blah blah where the x's are a 7 digit number. How can I search for the "Team ID:" and then get the 7 digit number ahead of it? (In php). ...

Using web technologies to create desktop applications

Recently, the pace at which web browsers improved and implemented new technologies (e.g. HTML5) seemed to have accellerated considerably. At the same time, the tools for developing web applications, like e.g. jQuery, or the myriads of web frameworks have also made web development much easier. Are we now at a point were it makes sense t...

Dynamic rows of divs (boxes) using CSS?

Hi there, I have a variable number of boxes and I'd like to display as many as I can without forcing the viewer to scroll horizontally, there should also be a certain space in between them. This means that the boxes will have to move to the next or previous "row" if the browser is resized. How do I achieve this using divs and CSS? Tha...

Adding a new value into img tag to check if it was clicked with Javascript?

I'm trying to make a map with repeated images, and I also want tiles on map to be clickable. Here I wrote a script but I have problem about unchecking checked images. http://jsbin.com/aruge/edit Please help. ...

3D perspective text on a webpage

How can I achieve 3D text transformations in perspective using Javascript/CSS. Solutions using external libraries of Javascript/CSS are also possible ...

the thin line between web apps and desktop apps

I've been working a lot lately with web apps, mostly with javascript and json-rich web UIs. I have to say I get impressed all the time with what I can achieve through these technologies. More and more, I ask myself whether I would have preferred to go with a classic GUI to start with (whether it was C#/VB.Net + WinForms, or C/C++ + GTK/...

HTML sliding bars?

Hi, how does one create a sliding bar using HTML? I cannot seem to find anything in the official documentation. ...

HTML Select, embed object with text?

Is it possible to have a HTML Select containing elements, not just text values but say an object (specifically i'd like to add a JQuery slider with the text) but if someone could advice me generally how to do this, i could investigate. ...

JavaScript - Per each case, make array.

My last question asked for running once without the use of booleans. I decided I needed booleans but not a lot of variables since that would be messy. So let's say I have this: var counter = 0; $(function() { $('#typing').keyup(function() { switch($(this).val().toLowerCase()) { case 'test': // DO THIS...

CSS Percentage Bars

I am trying to make a SIMPLE Css percent bar. OK go to http://htmledit.squarefree.com/ and copy/paste this in it: <!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" xml:lang="en" lang="en"> <head> <style> #perc { width:...

CSS trouble with IE7

I am designing a website and it looks good in basically all browsers except IE7, where I have a problem I haven't been able to correct. I have a menu in HTML like this: <div id="nav"> <ul> <li id="cMenu"><a id="cart" href="#">Home</a></li> <li id="pMenu"><a id="promos" href="#">Promos</a></li> ...

How do I have a transparent div with NON transparent text?

I want to have a div that is semi opaque filled with text that is not opaque at all. My problem is that when I make the div semi opaque the text is semi opaque too. Is there way to have my text appear as it normally would? Below is what I'm using now: .opac { opacity:.2; background-color:black; } ...

JavaScript Image object

Can anyone tell me how I can access the following line of HTML in JavaScript, please? I cannot seem to find the image object in JavaScript: <td colspan="2" rowspan="5"><img src="../image/6765.jpg" width="330" height="130" /> The end result is that I want to change the images. Thanks for any help ! ...

CSS: clear all formatting of anchor tag

I have a site where the page is formatted to be 800px wide with an image taking up the top 40 pixels. I wrapped the image with an anchor tag so that clicking on the image takes user to home page. When I wrap the image with an anchor tag, the image seems to shift to the right a little bit which throws of the alignment! Is there a way I c...

CSS Slide to new width

Let's say by using jQuery I can set the width of a DIV doing this: $('#perc_in').width("14%"); then I make it do this: $('#perc_in').width("57%"); Is there a way I can make it so instead of going from 14 to 57 I can make it SLIDE the progress bar from 14 to 57 percent? It's a simple div around another div with the percent being the...

jQuery function string

This isn't working: function checkIt(String rep) { if (counter[$(rep).val()] == undefined) { count++; result = Math.round((count * 100 )/howMany); $('.percent').text(result); $('#perc_in').animate({'width': result+'%'}, 500); counter[$(this).val()] = 1; $('#counter').text(re...

Maintain div size (relative to screen) despite browser zoom level

Hello all, I'm creating a bookmarklet for my iPhone which will add a scrolling menu to the upper-left corner of the screen. The problem I've run into is that if I visit a site which can be zoomed in, when I zoom in my "floating" div becomes larger as I zoom in the page. Is there a way so that my div will be .2 inches wide (measurable wi...

A little bit of If statements, some html investigating, and the webbrowser.

I have a code that retrieves all the "place names" and all the "addresses" separately in this link: http://www.yellowpages.ca/search/si-geo/1/sh/Ottawa,+ON I need to modify my code so that it will only retrieve the placename and address if <div class="address""> is not found within <div class="listingDetail""> class="address" is the...

Rails 3 UJS and XHTML

I have a simple question about how Rails 3 works with XHTML doctypes. Since Rails 3 uses UJS for its ajax calls (and even normal calls such as delete calls) and does so by use of HTML5 data attributes, then, since XHTML doesn't support data attributes, will the markup be automatically invalid? ...