html

Create an HTML Class in a PHP Document

Hi all, I'm currently trying dynamically create an html table in PHP. Further, I want the first two lines to be a different color. The solution I see is to give them a class and then use css to color the lines. if ($count<=2){ echo "<tr> class='color'"; }else echo"<tr>"; //other code echo"</tr>"; Problem is my code prints out th...

Dropdown Menu Different Levels

I want to create a Dropdown menu where I have 3 level, I have done the typical one work, When I hover on the main items I can see the second level items. Now the problem is that I can also see the third level items, Im looking to make the third level items only be seen when I hover the second level items to make it nicer. I took code fro...

Does HTML need to be encoded when passed back in JSON?

When passing HTML back through a response in JSON format, does it need to get encoded? ...

Do we need to use absolute positioning for z-indexed divs?

Hi, I'd like to position a div on top of another div, but absolutely, something like: <div id='parent'> <div id='under' z-index='1' width='100' height='100'></div> <div id='over' z-index='2' width='100' height='100'></div> </div> I know the width and height I need the two divs to be, but I don't know what absolute position t...

How do I apply a different background image to the <html> tag?

I need to apply different background images to the home page < html > tag and the inside pages of a site. In order to do this the references need to be unique. Without using class or id, how do I differentiate between the tags? I tried this, but it doesn't validate: <html class="inside"... Thanks! ...

Rails -- Add a line break into a text area

Hi, I got a rails app where I can input a few paragraphs of text into my model. The problem is I dont know how to input any line breaks. I've tried to add " {ln}{/ln} ; {&nbsp} and {br}{/br}" but that only displays the html as text and no break. Is there anyway I can set it so the text area control will use any of the html I pla...

flash file on an image in html

I am trying to place a flash file on an image at a specific location. how can i do this? i tried something like this <img src="images/logo.jpg"/> <object classid="homelogo"><embed src="images/logo.swf"></embed><object> bit it did not work. how can i overlap a flash file on top on an image at a specific location? Thanks. ...

JQUery looping through each table row

Hello, I have the following table structure <table class="ms-listviewtable> <tr> <td class="ms-vb2-icon"/> <td class="ms-vb2"/> <td class="ms-vb2"/> <td class="ms-vb2"/> <td class="ms-vb2"/> <td class="ms-vb2">test1</td> </tr> <tr> <td class="ms-vb2-icon"/> <td class="ms-vb2"/> <td class="ms-vb2"/> <td class="ms-vb2"/> <td class="ms-vb...

Using object as iframe

I heard that iframes are deprecated in HTML5, and object tags should be used instead. But the page does not load from the frame. Im not familiar with object tags, do i need to specify a classid or type text/html? Here's the tag: <object src="http://site.com/"&gt;&lt;/object&gt; Am I missing something, or has my browser(Chrome 6) not ...

How to detect if DIV content is appear in browser or not ?

I have the following code in my aspx page in which Javascript is disbaled will appear only if javascript is disabled from browser <div id="jsDiv" runat="server"> <noscript> Javascript is disbaled </noscript> </div> in C# code if i get the innerText or innerHtml of jsDiv at any time it will get the same result of div co...

does one need any 'programming aptitude' to become a web-designer ?

It's well-known among teachers that some people can program and some can't. They just don't have mindset for that. In a nut-shell, I want to ask if the same is true about web-design. I have a friend who is a good designer in general and can produce reasonably good-looking sites with WYSIWYG editor like Dreamweaver. But, since we're star...

Converting XElement to HTML string

I am performing XML Operations on an XHTML document utilizing Xml and Linq. When converting it back to a String for outputting to a browser, it renders script tags in their original provided form when creating the XElement as <script />. That prevents it being processed correctly by most browsers on the market. I would like to perform...

Unescaping HTML in Django

I have html encoded text which reads like this: RT <a href="http://twitter.com/freuter"&gt;@freuter&lt;/a&gt;... I want this displayed as html but I am not sure if there is a filter which i can apply to this text to convert the html-encoded text back to html ... can someone help? ...

parse javascript object returned from ajax as html

Result (data) looks like this: <tr> <td> Something... </td> </tr> <div id="paging">1, 2, 3... </div> This is ajax ... dataType: "html", success: function(data) { parse data... $('#myDiv1').html(data1); $('#myDiv2').html(data2); } ... Is it possible to parse data so that data1 contains table row(s) and d...

find-and-replace-in-html regular expression fails

I have a regular expression that looks through html content for some keywords that used to work, but now fails and i don't understand why. (The regular expression came from this thread.) $find = '/(?![^<]+>)(?<!\w)(' . preg_quote($t['label']) . ')\b/s'; $text = preg_replace_callback($find, 'replaceCallback', $text); function replaceCal...

Nice html output of a HashTable

I have a filled HashTable<MyObject>, MyObject contains a number and a String. What I need is the easy way to format the output so that it can be output to a html table and browsed via web-browser. I look for both framework - specific solutions and simple libraries that return a string with wrapped with html tags fi...

How can I include a link in a the popup of a google chrome extension?

I am experiencing some problems with a google chrome extension I have made. I've put this simple line of code at the top of the popup page: <a href="http://www.google.com"&gt;google&lt;/a&gt; However, clicking on it yields no results. But I have someone else's extension that includes links in the popup in exactly the same way, and see...

text align for display block element doesn't work in ie5,6,7

i have a simple menu list... <ul> <li><a href="#">Մեր Մասին</a></li> <li><a href="#">Դասընթացներ</a></li> <li><a href="#">Գրանցվելու կարգը</a></li> <li><a href="#">Հետադարձ կապ</a></li> </ul> and CSS: #menus a { margin: 0; padding: 3px 0 0 0; color: white; font-size: 15px; display: block; width: 160p...

How do I make my scrolling smooth?

I have written a scroller function which will scroll one div inside another one. The idea is to use the setInterval method to change the margin of the inner element to simulate a scrolling div. The problem I am facing is that the scrolling is not entirely smooth. Sometimes it stops for a split-second and then it resumes. What can I do t...

How can I make two different PDF files appear in the same iframe?

I used the FPDF class to create a multi-page PDF document and then I used an iframe to display the multi-page document. Here is an example of the result: I want to do the same thing on another page, except a bit different. Instead of displaying one multi-page PDF document, I would like to let the user upload two separate PDF's and the...