html

Use html node from Javascript variable with jQuery?

I would like to use the attr() method on a html node, which I have a reference to in a normal variable in Javascript. Now, the problem is that this node is not returned by a jQuery selector, but with normal Javascript: var myNode = window.getSelection().getRangeAt(0).commonAncestorContainer; Now, I would like to do something like: jQu...

How do I overlay JAVA onto a static image?

I am re-designing a website for a major University, and they use java images on most of their pages. How do I place/inlay a Java slide show onto a static image (ie: background image). (I know it is a weird combination of JAVA, CSS, and XHTML.) ...

Avoid new line between adjacent HTML lists?

Short version: When two lists are adjacent to each other, is there a way with CSS (or by some other means) to prevent a new line from being added between the two lists? Long version (with code): I have machine-generated HTML that is not intelligently handling nested lists that mix <ol> and <ul> elements. (If you guessed that this is...

Indent list items with floating image: problem

Hi guys, I have already found following question with almost similar content: http://stackoverflow.com/questions/3797713/how-to-indent-list-items-using-css-when-you-have-floating-blocks And here is my situation: if a list item gets too long, so that it automatically makes a line break, the text flow continues without the indentation. ...

Onclick doesn't fire in IE when DOM element created via jQuery

So here is the jQuery snippet I am using to create a div that I want to click on $("#someID").after('<div style="cursor:pointer; text-decoration:underline; display:inline;" onClick="alert(\'It Worked\');">Details</div>'); This Works in FireFox without any problems its just IE that doesn't fire the event. The div is added right after ...

JavaScript: Add elements in textNode

Hi, I want to add an element to a textNode. For example: I have a function that search for a string within element's textNode. When I find it, I want to replace with a HTML element. Is there some standard for that? Thank you. ...

How do you make a social network badge?

You see them everywhere. Like the twitter and facebook buttons that show up on blogs and websites that display a number of "tweets" or "likes". All I need to be able to do is display a number from my MySQL database based on two variables (username and an ID). It would probably be useful to encrypt the variables somehow so that users can'...

From HTML Form to XML Tree

I would like to pick some of your brains on this matter... I've got a large form where there are a lot of multiple selection choices. Some are radio groups and yet others are "select all that apply" checkbox groups. I'm trying to figure out the best way to translate each of these selections within my XML tree to send to the SQL server....

How to call a jQuery function AFTER html and content (images) finished loading..?

Is it possible to do at all..? The goal of this is to load a heavy Flash movie, after the images, text, and contents of my page is finished loading... Any solutions..? More details: The Flash movie (a music mp3) is loaded in a frame (menuFrame) with the menu. The content (that needs to be loaded first) is in another frame (contentFra...

HTML top and left pixal proportional growth of position

I want my page to be centered in the users screen,say with width of 800px. How do I ensure that the div tags left and top attributes adjust correctly based on the users screen resolution? ...

Best practices for providing dynamic content 'drop in' widgets for third party websites?

I am wondering what best practices are for providing dynamic content in lightweight, 'drop in' widget style that can be used by third party content editors. To elaborate, we would like to give third parties the ability to show dynamic content from us on their website without a back end system integration where they would have to call ...

Is it acceptable to use the marquee element in HTML?

I was wondering if it's alright to use marquee, and if it's supported by other browsers. I know twitter is using it, i think it's quite good for annoucements? any thoughts on that :)) ...

css and android web application, loading local images

how do i load a local image from android assets from a generated (php) server-side html file? eg. > img src="file:///android_asset/calendar-date-icon.png"> -or- background:#ffffff url(file:///android_asset/calendar-date-icon.png)no-repeat; cannot get either to work ...

Right-align some text to the right edge of the text above?

I have some lines of text. I want the last one right-aligned so that the text forms a nice column. This is the sort of thing I want to achieve: Once upon a midnight dreary, while I pondered, weak and weary, Over many a quaint and curious volume of forgotten lore, While I nodded, nearly napping, suddenly there came a tapping, As of som...

Image in wordpress header breaks when on other pages

Hello, I have a very strange issue, that I'm hoping someone here can help me with. I have an RSS icon in my wordpress header.php and it works perfectly fine when on the front page but when you visit another page such as, the About page, the image is broken. I'm not entirely sure what the issue is as I don't have a ton of experience in...

Show first line of a paragraph

I have a DIV with a multi-line paragraph. Is there any way (maybe using jQuery) to only show the first line of the paragraph and hide the others? ...

Div with phantom left padding

I have a Div tag that for some reason is padding the left side with approx 50px. The following is the html and mind you nono of the "class" have padding-left" <body> <div class="popHeaderMain" align="center"> <div class="PopHeader"> Keller Williams Realty | (704) 602-0271 </div> <...

Generate html files from MySQL data with file names as function paramater names from MySQL categories?

Hi all. So building on my question posted here http://stackoverflow.com/questions/3951716/using-python-to-write-to-html-file-with-mysql-data-as-source I have worked out how to do that although a bit different to the answers. Now my question is related to how to create html files from the data stored in MySQL, using the Category names fro...

How to get rid of parent webpage styles

I am developing a Google Chrome extension. Extension shows a dialog box (jquery ui, as a div) inside any webpage, in the dialog box user can add some content [HTML content without body, without styles info]. The problem i am facing is, that the styles specified in the webpage are getting applied to the jquery dialog and the content use...

Show exact same selection range in two text fields

I have two text fields on top of one another. The one on top the user types into. The one behind it auto-completes out words with a light gray font. It works great, until you're up against the edge of the text field on top. How can I scroll the bottom text field along with the top to keep their text perfectly overlaid? Thanks in ad...