I am using TinyMce on my asp.net web site for comment posting.
I want to make sure that the input is safe before I insert it into DB.
The TinyMce does it's own HTML encoding on client side.
In my other question people suggested that encoding should be done on the server side and not on client side.
What can I use on server side to make...
Looking to be able to change an image dynamically based on the selection option dropdown with an id of "main"
I came across this code which finds the text not the select value, which is exactly what I want. I just need to connect to the image.
alert( 'Text is: ' + $('#attribute119 :selected').text() );
The image is formatted like t...
How to determine which key is pressed in javascript?
...
I have a web app where I need to change a drop down list dynamically depending on another drop down list.
I have two options:
Get all the data beforehand with PHP and "manage" it later with Javascript.
Or get the data the user wants through AJAX.
The thing is, that the page loads with all the data by default and the user can later sel...
I have Server A (www.example.com) sending information to Server B. I can only have HTML / JS on Server A (and have to do the "crunching" on Server B) so I'm trying to send form data via AJAX (trying to avoid a form post to Server B - don't ask).
Obviously doing an AJAX call cross-domain is considered XSS and a big no-no, but if I were t...
Good evening,
I am in the process of writing a Java Servlet (Struts 2, Tomcat, JSP etc) which is capable of doing some fairly complex simulations. These can take up to 2 minutes to complete on the and will return a graph of the results. It is trivial to calculate the percentage of the simulation completed because the process works by re...
At the moment I achieve this using something like this:
var myElem = "<tr id='tr-1'><td>content</td></tr>";
$("#myTable").append(myElem);
$("#tr-1").click(function() {
// blah blah
});
Traditionally, when I wasn't using jQuery, I used to do something like this:
var myElem = document.createElement(...);
var myTable = document.getEle...
Ok so perhaps someone can help me with a problem I'm trying to solve. Essentially I have a JSP page which gets a list of Country objects (from the method referenceData() from a Spring Portlet SimpleFormController, not entirely relevant but just mentioning in case it is). Each Country object has a Set of province objects and each province...
Hi,
I am using a function that obtains a target element id at onclick. Example, if I click on the text element that has the id of 'help'.
var click = (e && e.target) || (event && event.srcElement);
The var click would contain the ref to the id of "help".
I want to compare the var click to the string 'help' using the if statement be...
$("#autoNames").html(function (index, html) {
var begin = "<script language='javascript' type='text/javascript'> var names = [";
var end = String('];' + '<' + '/' + 'script' + '>');
var result = begin.concat(jsonService, end);
...
Can I dynamically ensure that the content always remains centered in the window pane on this website?
Right now it uses a static margin-left on the .items class, and it uses jquery tools.
http://andstones.ca/newsite/
Can I do it in just CSS or CSS and Javascript?
Thanks,
Kory
...
I want to give my client's the possibility to preview their personalized product.
In a nutshell, personalization means the user specifies some text and positions the text somewhere on an image of the product.
A great example of what I'd like to achieve is this. Select a frame size and then hit Personalize, after you select the occasion ...
In other words, what technology would take care of doing the time tracking? Would it be the JavaScript? I don't see being able to keep track of such things with PHP.
Here's what I need to accomplish:
I need to have a long form spanning many web page reloads because it is pretty much an online test where each page load displays a new q...
I have an html page that is loading multiple iframes into which are embedded dynamic images created from a Tomcat server page (.jsp). This works as expected from Chrome and Firefox, but for some reason IE displays all of the images the same (as the first image). I've created an example:
http://coupondiscounts.com/jsImageTest.html
jsIma...
This checks "if we are on movies.php page":
if (location.href.match(/movies.php/)) {
// something happens
}
how to add for this (like or) "if we are on music.php page"?
...
I am experimenting with the new Safari 5 extensions JS API and I am having an issue right from the ground up, I want to use an XMLHttpRequest to get an RSS feed from a website however upon the .send() it immediatly kicks off errors:
Failed to load resource: cancelled
Then looking at the XMLHttpRequest object is says in status: Error: I...
I have the following code on a webpage:
<div id="emails">
<ul>
<li>email1</li>
<li>email2</li>
</ul>
</div>
<a href="#" onClick="deleteEmail()">click</a>
and I want to remove the first email, i've been trying with this:
function deleteEmail(){
var ul = document.getElementById('emails').getElementsByTagName('ul');
ul.removeC...
Is one way more efficient? Are there any limitations in one method versus the other? Thanks for any input you guys can give me ;-)
...
Hello, I have a few inputTextBoxes and I'm using document.activeElement to handle value changes of those inputboxes called by "change()" function of inputBox element.
the problem is when I change the value of one of the inputboxes and then click in another inputbox... the function will get the document.activeElement of the new inputbox ...
I have a tree view which has a folder icon by default and once clicked it has to be changed to a checkbox icon. And further on clicking the checkbox icon should display a folder icon.
Sample Code:
Server side code: C#
htmlSb.AppendFormat("<li><span class=\"folder\"
onclick=\"javascript:return Test.Controls.TreeView.SelectNode('"
...