html

Textarea that can do syntax highlighting on the fly?

I am storing a number of HTML blocks inside a CMS for reasons of easier maintenance. They are represented by TEXTAREAs. Does anybody know a JavaScript Widget of some sort that can do syntax highlighting for HTML within a Textarea or similar, while still staying a plain text editor (no WYSIWYG or advanced functions)? ...

HTML Table help alternating number of cells.

What is the proper HTML if I want to alternate the number of cells in each row? I want 2 cells is row 1, 3 in row 2, 2 in 3 , 3 in 4 etc...Similiar to a brick wall. I have this so far, but it doesn't render like I would like. I know I could do this nesting tables, but can I do this with one table? Thanks, ck <table border="1" cellpaddi...

catching input image value in controller using IE

How do I catch the value of an image button in a controller. I have: <input type="image" id="savebutton" name="savebutton" value="next" src="..." /> In my controller I have [AcceptVerbs(HttpVerbs.Post)] public ActionResult BillingShipping(string savebutton) { ... } This works in Firefox but not in IE. Howeve...

AJAX - when user leaves page - good or bad practice/implementation?

I was just reading http://stackoverflow.com/questions/1619930/how-to-check-users-leave-a-page earlier on when suddenly I thought of performing AJAX when user leaves the page to send analytical data back to the server. Is performing AJAX on the onunload event a good or bad practice/implementation? ...

how to implement conditional htmlspecialchars?

If it's <script src="/script/jquery.autocomplete.js" type="text/javascript"> ,should call htmlspecialchars. If it's <pre><code><script src="/script/jquery.autocomplete.js" type="text/javascript"></code></pre>,should leave it as is. How to do this kind of task? EDIT Think you are using wmd editor like SO,and you included some code but...

[HTML/CSS]: Is there anyway to hide a column in a Table.

I am showing results in a Table in a grid form. There is an ID column. Is there anyway through HTML or CSS that I can hide the first column? ...

How do I tell the browser to open an avi file with VLC or similar in HTML?

So I have a list of avi files on a web page (For my own purposes!), and was wondering what do I have to put into the html code to tell the browser to open VLC? or mplayer or simliar? ...

Side border and dynamic content help

I have two side borders on my website, left and right side... small image about 15x15 which repeats itself down the website... When setting 100% like below, the border only goes "one screen" down (which is 100%). But my website is dynamic and the content changes... I want the border to change along with the total height of the page... H...

Changing heights of container divs using percentages in CSS to reflect contents

I have the following code that mimics my problem. I want to style the elements within the "Container" div using percentages. Therefore I have to set the "Container" div to height 100% (or other value) to make this work. The problem arises when I want the "Container" div to change height to reflect contents. In the case below I'd want the...

HTML: How to make a submit button with text + image in it?

I would like to have a submit button which contains text and an image. Is this possible? I can get the exact look I want with code that looks like: <button type="button"> <img src="save.gif" alt="Save icon"/> <br/> Save </button> ... but I haven't found a way to have one of those for my forms. Is there a way to do that with an <inp...

Percentage Height HTML 5/CSS

I am trying to set a div to a certain percentage height in CSS, but it just remains the same size as the content. When I remove the doctype element at the top of the page, however, it works. I want the page to validate, so what should I do? The code is as follows: #page { padding: 10px; background-color: white; height: 90% !importan...

Suppress line feed in <textarea> on pressing enter [html, javascript]

I want to suppress line feed in on pressing enter. Instead, I want to submit the form. I know how to submit the form on pressing enter in textarea, but I don't know to supress line feed on pressing enter. I need to hide it from user, I mean I want user not to see that enter made new line even for a moment. Thank you in advance. ...

html post form action not specifically spell out php file?

I have a post html form, and the action is index.php, which is the websites main page. I never actually have index.php in the address bar, since links to "/" go to it, and even if I did, it would be website.com/home(/), since I use rewrite rules. So basically, the user should never see index.php. However, the form submit doesn't work if ...

Preserving previous while adding new one on a form

I have this form that comes with some parameters from another page. I want to preserve those values and add a sortby parameter, but every time I hit submit all the parameters disappear, but the new sortby parameter. How can I preserve the parameters from the previous page and add or change just the orderby parameter. <form name="formSe...

Want to show Thumbnail Images on client client

Hi, In the below picture there are some thunmnail and large picture, when user click on the thumbnail, I want to show large picture like in the in picture there is big image. I am looking for some javascript library/solution to accomplish this. Thanks ...

Problem with dynamic SVG image generation

Hi Guys, I am trying to write a server side script (PHP) for generating an SVG image based on user input. I am using the following code: <?php echo '<?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"&gt; <head><meta http-equiv="Content-Type" conten...

Why isn't this PHP parsing XML correctly?

I am attempting to parse Yahoo's weather XML feed via this script. The parsing itself works: I am just struggling with getting the days to correspond with today, tomorrow and the day after. The final HTML output looks like this: Which can be seen here: http://www.wdmadvertising.com.au/preview/cfs/index.shtml todayMon______________19 ...

Copying plain text from a WYSIWYGI to a normal textarea?

I know I did ask this question earlier but here is my problem in details: if I copy the text from textarea1 to textarea2 using a JavaScript program, it works fine if I attach the teaxtarea1 with a WYSIWYG editor then it refuses to work. And I am using openWYSIWYG. Why can't I can copy the plain text from textarea1 when it is attached...

Selecting HTML Comments with jQuery

Does any one know how to select html comments with jquery? <html> <head> <title>Check Test</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt; <script type="text/javascript"> $(function() { $("body *").each(function() { ...

How do I warn a user before closing a page when textarea is not empty?

I'm trying to replicate the same thing as on the stackoverflow textareas. EDIT: I went with something like this, after reading the suggestions here: window.onbeforeunload = function() { var myTextArea = document.getElementById('post_content'); if (myTextArea.value.length > 0) { return "You haven\'t submitted your pos...