html

Is my anti XSS method OK for allowing user HTML in PHP?

I am working on finding a good way to make user submitted data, in this case allow HTML and have it be as safe and fast as I can. I know EVERY SINGLE PERSON on this site seems to think http://htmlpurifier.org is the answer here. I do agree partially. htmlpurifier has the best open source code out there for filtering user submitted H...

HTML list margin

Hello guys, I'm trying to make a numbered list but I'm getting a margin on the top and the bottom between the list and some text (I'm using Firefox). When I try get rid of it with CSS, I loose the numbers and the indentation. Is it possible to get rid of the margin without loosing the numbers and list indentation? If you use the follow...

Is there an easy way to hide HTML Source from the end user?

I expect that there are probably ways for a determined end user to see your code, but I would prefer to hide it. Ideally, I would like to be able to hide it from OTHERS, but not me, in case I need to debug a live system. Any suggestions? ...

CSS adjusting table size

Hello All, I have the following html code. <html> <body> <div style="max-width:1600px; min-width:900px;" > <table> </table> </div> </body> </html> My question , when I have the screen resolution to 1024 * 768 then the table should fit the screen and when I increase the screen resolution to 1600 * 800 the table size sh...

java source code to html with links from uses to definitions

A tool (preferably free or open source) that converts java source code to html with proper links from uses of identifiers to their definitions. ...

Why is there a post-jQuery flash in Safari?

Hey all, I have a simple search box that it hidden until hover(over) and hides again on hover(out). In Firefox all is normal, but in Safari there is a tiny flash after the hide animation where the full bar is visible. You can see what is happening (in Safari only) on the homepage of my site: stormink.net. (the search button is in the to...

Height 100% on SPAN with multiple column

I have the code below with 3 columns. I want to have the border of each column and each column also has its own color. I tried many previous examples of multiple column css problem and they don't work. For example, I don't want to use dirty trick of background image to render background color and border because the website allows changin...

Subclassing from (extending) an HTML element?

I'd love it if I could make my own class that extended an HTML element class, e.g. HTMLDivElement or HTMLImageElement. Assuming the standard inheritance pattern: // class A: function ClassA(foo) { this.foo = foo; } ClassA.prototype.toString = function() { return "My foo is " + this.foo; }; // class B: function ClassB(foo, b...

How can i call a javascript function to run when innerHtml changes with Ajax?

I am using Ajax to change the innerHtml of a div by using onclick on a link. I need to call a javascript function after the file is retrieved from the server and replaces the content of the div. How can i do this? <div id="thisDiv"> <a href="this.php" onclick="ajaxfunction('thisfile.php','thisDiv');return false;">link</a> ... </div> T...

layout shifts - CSS problem

Hi, I am coding this layout as a wordpress theme and having a slight problem This is a link to my index page and how the layout should be, however, after adding comments and a comment form, the layout shifts to the left a bit. I am pretty sure it has to do with the comments or comment form because when I delete the code to include th...

Rounded corner box technique with images all around as borders

Does anyone know good example of using CSS to create rounded corner box where: All 4 corners and 4 sides are image. The sides have repeated img The width is constant while height is flexible Work all in FF 3.x, IE 7 or higher, Chrome Let me know. Thanks ...

IE8: border + background-image problem

I have a span with a background-image repeat-x + a border. For some reason only in IE8 (not even IE7/6) the image hides the left border. When I set the border-left to 2px I can see a 1px border My Code: <span class="smallTab calTab calTabUnSel"></span> .smallTab{text-align:center; border:1px solid #A0A0A0; border-bottom:none; font-s...

Is there anyway to detect whether a specific Opensearch search engine has been added to the browser?

Hi all. I am currently working on an application that requires to check whether the Opensearch has been added. I've successfully done the code that adds the search engine of my application to the browser via Opensearch XML file. but I wish to detect whether the search engine is currently installed or not. ...

Can someone help with how to save a display.php page?

I will do my best to explain my situation and what I have done so far. I am new to php and have tried to learn everything from the net and the forums, but now I must post in one. I have a form that is comprised of two pages input.html and output.php. The user completes the form (input.html) and submits it. They are presented with a f...

Forms in html - How do I make the form do 2 things?

I have a form to sign up to getting a rss feed through Feedburner. this is the code - <form action="http://feedburner.google.com/fb/a/mailverify" method="post"> <p><input name="email" type="text" /></p> <input name="uri" type="hidden" value="dafyomi" /><input name="loc" type="hidden" value="en_US" /><input type="submit" value="clic...

<style> tag inside any elements will still work?

I see something like this: <div> <style type="text/css"> ... </style> </div> It's very strange,but still work. Is this against the standard? ...

How to convert a document back to string?

I need a java script function that converts the document object of the current loaded page back to it's source text. In firefox it's smth like that: var doc = document; var str = (new XMLSerializer()).serializeToString(doc); alert(str); But i need a cross browser solution. How would this be done? For example: <html> <body> <sc...

Problem with IE7 link over jquery

Hi, I'm testing a website using Jquery. I have a plugin that when you hover over it, it slides down revealing another banner thus sliding the banner below down. I've overlayed a link in using z-index on the bottom banner, but whilst it works in other browsers I can't see it in IE7. Any ideas why? Would moving the styles up help? Or m...

Euro sign in HTML

Hello! The euro (€) is the official currency in 22 European states. In HTML there are different possibilities to display the sign €: &euro; &#8364; &#x20AC; Which one would you use in HTML? I think no representation is supported in all browsers. It's a pity that there is no standard way to display the sign. Can you recommend one o...

How to get the browser to cache images, with php?

I'm totally new to how to cache images. I output all images in a gallery with php, and want the images already shown, to be cached by the browser, so the php-script don't have to output the same image again. All I want is the images to show up faster. when calling an image I do like this: <img src="showImage.php?id=601"> and the sho...