As I prepare to tackle the issue of input data filtering and sanitization, I'm curious whether there's a best (or most used) practice? Is it better to filter/sanitize the data (of HTML, JavaScript, etc.) before inserting the data into the database, or should it be done when the data is being prepared for display in HTML?
A few notes:
...
I'm having a bit of trouble with the following code. I have an absolutely positioned div, inside of which I have 3 elements: 1 text input, 1 password and a button containing an image. The markup is as follows:
<div id="credentials">
<input type="text" id="username" />
<input type="password" id="password" />
<button ty...
On my page I have a few radio buttons. When one is selected a dashed focus box appears around the button. Can this focus box be removed?
...
Which of the following ways is the right one in using the characters " and ' inside PHP's sub-arrays?
#1 Way in debugging PHP code
$_POST["login['username']"];
#2 My original way in PHP
$_POST['login[username]'];
My code is now broken after changing all my variables to arrays.
The following is the HTML to which the variables re...
With CSS I can set font and background colours for the individual options of a dropdown "select" list; however, these colours only show up in the actual dropdown. The colours shown in the box on the page when the list is not open are still the defaults.
Currently I have a list with many dropdown boxes having a few options, and it would ...
Hello,
I'm sure this must be a common question, but I haven't found an answer elsewhere.
I've got a Flash object embedded in a long webpage. I listen for the MOUSE_WHEEL event in Flash, and scroll my Flash content accordingly. However, when I scroll over the Flash object, the webpage also scrolls.
Is there any way to prevent this beha...
In a database, I have the text <b>ISBOLD</b><i>isitalic</i>
How do I do that if I pull out this string, I will see
ISBOLD isitalic
and not
<b>ISBOLD</b><i>isitalic</i>
...
Let's say I have a bunch of HTML like below:
bla bla bla long paragraph here
<br/>
<br/>
bla bla bla more paragraph text
<br/>
<br/>
Is there an easy way with Javascript to convert it to properly semantic <p> tags? E.g.:
<p>
bla bla bla long paragraph here
</p>
<p>
bla bla bla more paragraph text
</p>
Output spacing is not impo...
I need to write on-line help (Eclipse help format) for an Eclipse plugin. I tried out the evaluation of Help Composer that comes as part of RCP Developer from Instantiations and it pretty much does what I am looking for. However at $500 per license it's way overkill and over budget for my needs.
Surely there must be some other tool for ...
I have a menu (vertical menu) and i want each of the Ul's to show when hovering the dd's, and hide back in when mouseOut (second function of .hover()) what will be the best easiest way (without a plugin).
<dl class="lft-menubar">
<dt>Computers</dt>
<dd>
<ul class="slidedMenu">
<li>3rd level menu</li>
<li>3rd ...
In creating CSS styles one approach seems to be a fully qualified style such as
#pnlImage div.ipd-imageInfo div.ipd-tags span.ipd-tag
compared to a shorter definition such as
div.ipd-tags span.ipd-tag
which would uniquely identify the style as well. However, if the site is expanded or changed the 2nd style runs the risk of not uniq...
Or is there such a tag?
...
Hello everybody.
I recently started to learn JavaScript and how to manipulate DOM elements.
So far it been great and I really enjoying the learning.
However, there is something that i am having a hard time to grasp. It is positioning elements with the JavaScript. All the offsets, clientsX(Y) and others just confusing me. And it is frus...
Could anyone tell me if there is something wrong with the code or a better way to modify it? for some reason when i hit submit on my contact form it displays the "error.html" page but i still get an email sent to my account.
$EmailTo = "[email protected]";
$Subject = "Contact Submission";
$Name = Trim(stripslashes($_POST['name']));
...
I'm talking about html,web page
...
I'm trying to get the following layout: Link to Image
And this is what I'm doing in code:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
</head>
<body>
<div style="position:absolute; width: 100%; height: 100%" id="container">
<div id='Header'>Header</div>
<div id='Content' style='height:100%; backgrou...
In a html page, i added the following code
<a href="http://www.google.com" target="_blank"><span><input type="button" value="google" /></span></a>
To achieve image button with sliding door technique, i happens to mark up like this.
Now When I click the button, google.com opens in two tabs in Firefox.
IE didn't respond at all !!!
Th...
Is there a command line utility (preferrably for Linux) that can output the resulting HTML after any JavaScript execution?
Since many web sites use Javascript to modify the output substantially, it is sometimes not sufficient to use an HTML parser to read data from a web page. A command line utility or library that enables you to see th...
Hi,
When I print my page links are converted to the actual URL rather than what the link contains, is there a way I can stop this behavior, as I have images wrapped in links and I don't want the links to display when a user prints the page
Thanks
...
I'm making a form (html & php) which is part of an admin section used to edit content for a website. I want to allow users to include some basic html. This works fine. I want to retain line breaks. This also works. My problem is that when someone writes something like this:
<ul>
<li>item one</li>
<li>item two</li>
</ul>
the line break...