html

Secure inserting value of $_POST['textarea'] into <textarea> HTML tag using PHP only.

Is there any way to insert $_POST['textarea'] into <textarea> without escaping shell special chars? I do sth. like : <textarea> <?php echo escapeshellcmd($_POST['textarea_field']) ; ?> </textarea> and I have a problem with \ chars. I do not wont them in <textarea> but without escapeshellcmd(); function it ...

Turn a div into a link

I googled how to turn a div into a link but there seem to be a lot of techniques, none of which seem like they would work well in IE. What is the best/simplest technique for turning a div into a link? ...

How to give a link to a directory in HTML?

Good days, My problem is giving a link to a directory, in an inner network. It is working for IE 6 but i need to do this for especially for IE7 and IE8. My internal Link is like that: \CompName\Report\ I tried to do this with : file://.... but it didn't work. Any ideas? ...

Tabbing through links that are hidden on webpage (accessibility issue)

I have a web page with 3 links. 1 of the links is hidden by a parent div that has display:none. When I hover over another div however, the hidden div will be shown thereby revealing the link. How can I tab through all 3 links and get link 3 to display automatically when i tab to it? <html> <head> <title>Skype Home</title> <meta ...

The substitute for <pre> tag?

Good days, I am looking for a substitute for pre tag of HTML. In pre tag the things with long lines seems bad sometimes on different resolutions, it gets worse and worse. The thing is I need to use pre tag because the one who will be the updater of the website don't know much HTML and also don't have time. So he should simply copy and ...

WebOS development requirement

Hello All, I have this increasing interest in web OS. I want to start building my own. But I am at absolute zero position. I went to websites of XIN, EyeOS, YouOS to gain some initial idea. Still exploring... Can someone tell me about how can I do scratch start. Like system requirements, technologies one should be using, some referenc...

What's the best way of putting form data into a database when there's an unknown anmount of data?

I have a pretty large form that consists of radio buttons/checkboxes as well as text inputs. Due to the nature of checkboxes, if they post the form without checking it, it isn't sent in the POST data. Which leaves me a bit stuck with how to handle it. I originally started my database with the standard 'column for each field'. For exampl...

how to Resize Quick TIme Player to the size of an HTML/CSS DIV

Hello there I am using Quick time via javascript so that I can play video on my web browser. I want to resize the video so that it fits the size of the DIV. The problem is that when the player launches the video the size of the DIV remains the same but the player gets out of the DIV. I want the size of the DIV remain the same doesnt mat...

JS Drop Down menu with submit button

I need to implement a drop down menu like the one in the image. I know how to accomplish something like this when there is no 'go' button but how would I do this with the the 'go' button? Is there a way to allow the user to select a link but not trigger it unless the user clicks the go button? Is there a jquery plugin or something for ...

Is it possible to explicitly tell a script when to execute, when the page is open dynamically?

Hi, I have a page which dynamically opens each page based upon the tags. I am attempting to execute a script, which is to run when the dynamic page is run from the div id="CreateVids" tag. I'm totally new to this so i'm not too sure what is the problem. I have been looking to see if there is a property of the that I can set but I cann...

Is PHP classes an effective solution for listing content?

Hi there I would like to list my portfolio on our website, and I wrote a class, Client for setting and getting parameters about each client's basics, i.e.: the client's name, website, is it featured, is it published, what items did we do for them, etc. It's fairly primitive, but am I correct in assuming it's better to create an object ...

Setting a fixed height to a block breaks the 100% width

The problem is when I try to set height: 20px to all rows this breaks the natural width: 100% from a block element. This bug only occurs on IE7 (tested on FF, Chrome and IE8). HTML <div id="container"> This must be adjusted to content <div class="row">row 1</div> <div class="row">row 2</div> <div class="row">row 3</div> ...

How to sanitize HTML code in Java to prevent XSS attacks?

I'm looking for class/util etc. to sanitize HTML code i.e. remove dangerous tags, attributes and values to avoid XSS and similar attacks. I get html code from rich text editor (e.g. TinyMCE) but it can be send malicious way around, ommiting TinyMCE validation ("Data submitted form off-site"). Is there anything as simple to use as Input...

how to randomize an integer variable, with odds on certain numbers appearing

To get a random whole number between 0 and 4 inclusive, I use the following code: var random = Math.floor(Math.random() * 5); However I want the number 4 to be chosen twice as often as the other numbers. How would I go about doing getting a random number between 0-4 inclusive, but with the number 4 appearing twice as many times as 0-3...

Emulate IE7 for IE8 but not for IE9 using "X-UA-Compatible"....

I have a website depending on vector drawing, for internet explorer i'm using VML and for other browsers i'm using SVG. IE8 however, doesn't have support for neither without falling back to IE7-mode which has VML. Therefore i'm including <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />. The problem (well, actually a good t...

How can I highlight spaces with jquery?

I have an input textfield that has segmented chinese words(usually they are all squashed together). I want to highlight the space between the words, on the fly(So in other words if i type a space between 你好 the space between the characters would be red) When I submit the text however I want to only submit the chinese with the spacing, no...

Why can I not set the width of the first column of the second row on this page?

For some reason I am unable to set and width properties of TD elements within this table, which are NOT on the first row. For example, in the linked example you can see I have tried to set the width of "Status" by using both the width attribute (set to 280) as well as inline CSS. Neither of these seem to work. Example: http://www.dnsde...

How to Check if a website contains Flash.

I've created a web browser using mfc and i'm using IHhmlReader to read the contents of html when the user enters a url in the browser and page is completely loaded.Now i want to check if the webpage has any flash in it. Any Helps would be highly appreciated. Thank You. ...

how to validate radio buttons in javascript?

my html code- <form method="post" name="editorform" id="editorform" onsubmit="return validate_editorform(this)" action="#"> <ol><li> <label for="qtitle"><b>Title</b></label> <input id="qtitle" name="qtitle" class="text"></textarea> </li><li> <label for="tag"><b>Tag</b></label> <table bord...

Checking checkboxes using javascript when there id's have a certain character within

I need to check a certain selection of checkboxes using javascript. All these checkboxes have the letter a at the beginning of the id and other checkboxes have a different letter.I also don't know how many of these checkboxes there will be since they are created dynamically <input type="checkbox" id="a1" /> now if i click on a button ...