html

How to wrap text of html button with fixed width

I just noticed that if you give a html button a fixed width, the text inside the button is never wrapped. I've tried it with word-wrap, but that cuts of the word even though there are spaces available to wrap on. How can I make the text of an html button with a fixed width wrap like any tablecell would? <td class="category_column"> ...

Regex match spaces in html attribute

I have a bunch of html with lines like this: <a href="#" rel="this is a test"> I need to replace the spaces in the rel-attribute with underscores, but I'm sort of a regex-noob! I'm using Textmate. Can anyone help me? /Jakob ...

Styling form elements (select, checkbox, radio, etc)?

Styling form elements using css can be problematic since every browser render tag in different way (just like when safari render checkbox). Okay lets ignore safari for a while, skinning input and button are rather easy but how to completely skin select, checkbox, radio, etc. See this pages: Checkbox skinning Select skinning Radio skinn...

Make ABC Ordered List Items Have Bold Style

I have an html Ordered list with type set to "A" <ol type="A">...</ol> Thus, each list item will start with A, B, C, etc. I would like to style the A, B, C letters to be bold. I have tried setting font-weight:bold; via css, but it didn't work. Any suggestions on how to do this? ...

Problems using window.opener

I have a simple ajax application From this, a popup is launched, with a form. Both the form resultpage, and the ajax application hava a javascript file in common. From the popup window, in the form resultpage, I am trying to call a method from the common javascript file, to apply to the parent window. My javascript file contains an ...

Add Options to select drop down in IE

I'm trying to add items to a select drop down at run time. So far it's working in Firefox and Opera, but it doesn't seem to work in IE7 or 8. What is supposed to happen is that when a user selects a center, then the personnel drop down gets populated with the personnel at the center.... //Clear out the all of the exisiting items if (do...

Django widget HTML id

Hi all, In widget's code I need to get access to HTML id of the rendered element. I know I can run regexp on the rendered string and get the ID, but I believe there must be an easy way. Let's assume this is the widget I have: class TextInputWithHint(TextInput): ... def render(self, name, value, attrs): res = super(Tex...

Fonts in a textbox?

In a normal textbox created in Rails by: <%= text_area_tag 'chat_data', '', :rows => 30, :cols => 70 %> is it possible to have fonts for the text, such as bolding and colouring? I'm using the textbox to store a chat session and want to make it more aesthetically pleasing. ...

Zend Framework html form input element with whitespaces

When I create a html form like this: $form = new Zend_Form(); $form->setMethod('post'); $form2->addElement('textarea', 'Name with Space'); The HTML becomes: ... <textarea name="NamewithSpace" id="NamewithSpace" rows="24" cols="80"></textarea> ... Mention that the input name becomes camelcase! When I call $form->getValues(); after ...

Unicode problem with JSF and HTML forms?

I have an HTML form generated by JSF which maps an input element to a bean setter and it looks to me like JSF is garbling unicode input on the way in. In particular I put the following exception for testing purposes in the setter public void setTitle(String title){ System.out.println("title set with: "+title+"\n"); if (title.st...

Problem with HTML output in JSP

Hi, I have code which generates some HTML, but when I try to output this content in a jsp all '<' are replaced with '&lt;' and all '>' with '&gt;'. Here is the piece which renders the result: <c:out value="${data}"/> Can someone please explain what causes the character replacement, and how it can be avoided? PS: I've tried escapeXml...

Need help in my design html / css / javascript

Hello, I am trying to design a file hosting website template, the problem is i have redesigned the radio buttons to div elements to have custom image instead of default circles with javascript, This is image 1 when default page loads <script type="text/javascript"> <!-- //script to change background-color of the selected //button and ...

How to create desired form with css without using too many div tags?

The mailing list form I am creating has the following fields: first name, last name, street address, city, state, zip, email, and phone number. I created the form using list items and css NOT tables. I want the first name and last name labels together on the first line, the street address all by itself on the second line, the city, state...

retriving cookie value and changing element style

Hello, I have a cookie set as yab_uploadmode and it has numeric value ranging from 1-4 and 4 div elements named btn1, btn2, btn3 & btn4, how can i retrieve the value of cookie and apply style to that particular element without use of any framework. Thank you very much. Regards, Shishant Todi ...

Persisting the scroll position of DIV while printing

I would like to print scrollable div as WYSWYG. Is there a way? ...

how to load an english-site image, if the spanish-site-image does not exist

I have a multiple language site. With html, javascript, may be ajax if an image does not exist in spanish folder, it should load image from the english folder. path example english site : images/home.jpg spanish site : es/images/home.jpg Today i have message.properties ... stuff for doing text conversion message.properties message_es....

what would I have to do to get the new HTML Editor ajax control to work as a sharepoint content editor webpart?

Microsoft have just released a few new ajax controls including an ajaxed up HTML editor control. http://www.asp.net/learn/Ajax-Control-Toolkit/tutorial-50-cs.aspx I would like to try this in sharepont (as the built in sharepoint one is awful (no cross browser at all and flaky on IE) I tried the Telerik free one but it was not very sta...

When does an HTML input tag post back on enter?

I have a couple of asp.net pages with TextBox controls on them. Some of them postback on enter (within a TextBox control) and others don't. For the life of me, I can't figure out why or why not... I don't think this has anything to do with asp.net. Not using ajax etc. Tried playing with a very simple html page and still can't figure it ...

How to configure (GoAhead) embedded web server for compression?

I have html files that are pre-compressed on the server using zlib and it appears zlib adds the appropriate headers to the compressed html files: static int const gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ (from gzio.c) The browser (FF) supports Accept-Encoding: gzip,deflate However, it doesn't display the html. I am using...

What could go wrong in switching HTML encoding from UTF-8 to UTF-16?

What are the implications of a change from UTF-8 to UTF-16 for HTML encoding? I would like to know your thoughts on the issue. Are there things I need to think of before making such a change? Note: Interested due to enormous amounts of japanese and chinese text I need to handle. ...