Cannot Perform A Subtraction - Illegal Character
Oct 23, 2010
This is odd. I cannot perform a subtraction. The following code:
Code:
var saturday=new Date();
saturday.setDate(saturday.getDate()+6�saturday.getDay());
Gives me:
Error: illegal character and points to the '-'.
View 4 Replies
ADVERTISEMENT
Apr 28, 2009
How do i replace ' string, when i try it i get illegal character error message..
I have also tried:
View 4 Replies
View Related
Aug 18, 2007
How do I subtract a number from a Drop-Down box, from another Drop-Down box, and display the result inside a text box?
View 5 Replies
View Related
Jul 23, 2005
I am building a web page to show a TCP/IP raw packet.
I need to show "special characters" on the web page I am working on.
When I say "special characters" i am talking about tabs, whitespace,
crazy unicode characters, etc etc.
What is the best way to present this to the user?
I am thinking that a large textarea is the only way to display it so it
retains all the special characters.
View 3 Replies
View Related
Feb 25, 2006
i don't know how to check for illegal characters for name.. i have one for username but i don't understand how to use it.. it does not allow spaces so it will not work for first and last names..
View 4 Replies
View Related
Jan 10, 2010
right now im using a percent bar to redirect the page when all buttons are clicked but i want a more efficient way of doing the redirect there will be a total number of buttons on my page, for examply 5 every time one is clicked, is there a possible way of subtracting 1 and when buttons = 0 the page redirects
View 1 Replies
View Related
May 22, 2009
I have a HTML form which takes some values including a password field. I have a JS function to check and alert when a user enters some particular special characters(this is bcoz only these characters are not allowed in the back end of the html form, all the other special characters are allowed). following is the code for it.
function checklen()
{
var iChars = "`<>";
for (var i = 0; i < document.ipform.password.value.length; i++) {
[Code]...
now i want a feature which does'nt allow the user to enter an uppercase letter or a special character(only these are allowed~@#$%^&*()-_+|) as the the first character of the password field. Since i am newbie to JS, It would be a great help if some one can help me to sort out this..
View 5 Replies
View Related
Nov 12, 2011
In my application (yes I know that it's asp) I need to automatically replace a character if it is found in the textbox Is there a way to do this. this is how it renders on the page
Here is the vb equivalent:
View 4 Replies
View Related
Oct 18, 2011
I have Javascript code for auto calculate.here is the code:
<script type="text/javascript" language="javascript">
function autocalearn(oText)
{[code].....
I have a textbox for the overall total, and i want it automatic subtract the total earn and total deduction..
View 23 Replies
View Related
Sep 8, 2004
Heres the code:
case "D": if ((Number(a1)==1) && (t.getDate()<10)) str+="0";str+=t.getDate();b
Its part of a date script. if i use
<!--
<![CDATA[
]]>
//-->
then the script doesnt work - but it is validXhtml....
View 1 Replies
View Related
Sep 8, 2009
I would like to perform a regular expression on a string and if TRUE do something.
I have huge amounts of knowledge doing this in PHP but trying out javascript.
View 1 Replies
View Related
May 6, 2010
know there is a similar post on here but it didn't really give me any actual help on this topic:It seems that I have the correct regular expressions in this however it doesn't want to follow my freaking instructions can you guys maybe show me where I'm going wrong and give me a short source code on how to rectify it. Code is below:
function validate(theForm)
{
var falseCounter = 0;
[code]....
View 7 Replies
View Related
Mar 19, 2011
I want to retrieve datas this ms access database using javascript.If I enter 'R' in the search box, I should get all the records starting with 'R'.
View 1 Replies
View Related
Jul 10, 2011
Code:
function randOrd(){ return (Math.round(Math.random())-0.5); }
var cardArray = [
[1, "hundo", "dog"], [2, "kato", "cat"],
[code]...
How come the random function has no effect on the second array it was given to randomize?
View 4 Replies
View Related
Jan 25, 2006
I am having problems with the code below (obviously) coming up with illegal character for various characters within the field name
which is: S_Gift Finder1_0
I have tried various ways of escaping the characters but to no avail.
I am unable to change the name of the field as it it comes from an external off-the-shelf package. Code ....
View 4 Replies
View Related
Mar 21, 2010
I am having a hard time implementing a feature on my website. I want an input box to appear when the "sell" tab is clicked, and I cannot figure out how to do it with Jquery. I can't figure out how to chain an action to tabs. here is my code so far
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
[code]...
View 1 Replies
View Related
Jun 18, 2011
I'm sure this is much simpler than I have been making it seem in my head so I'm giving up and asking Basically I have a html document being dynamically created by php. In the markup I create some divs (the number of which changes between pages) all of which belong to the same class (class="div") and have id's of the same format (id="div_90001" or "div_88926773"). What I want to do is perform a function on eachelementin the class and extract the number in the id and then perform a function with the number (AJAX) and then return the results to the div (probably some extra markup)
I can handle all the AJAX parts, the extracting of the id number etc... I just can't make a function that will work on all elements in a class. I fear I am not making much sense, I'll try again cos I don't think I'd understand what's above. I have some divs that belong to a class, I want to perform the same function on each of the elements in the class. How is this done?
View 1 Replies
View Related
Mar 21, 2010
I am having a hard time implementing a feature on my website. I want an input box to appear when the "sell" tab is clicked, and I cannot figure out how to do it with Jquery. I can't figure out how to chain an action to tabs. here is my code so far
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
[Code]....
View 1 Replies
View Related
Feb 4, 2010
I have this code below:
Code:
$('#admintable').load("/includes/ajax.php?type=gallery&action=order&var=" + $.tableDnD.serialize());
The problem is that throughout my php project it calls different classes and definitions based on what modules are loaded.Is it possible to get it to load a function that is predefined rather than executing a page that will require me to once again declare all my variables and classes so I can perform just a simple db search.
View 4 Replies
View Related
Apr 3, 2009
I have a matrix of radio buttons:
<input type="radio" name="chcalt" id="radio33" value="1">
<input type="radio" name="chcalt" id="radio32" value="2">
<input type="radio" name="chcalt" id="radio31" value="3">
[Code].....
The colum totals would change to: 2, 0, 1 and the total would be 3
I basically need the total of each column and the total overall. The value should be taken from the actual "VALUE".
View 6 Replies
View Related
Jul 10, 2009
I'm loading some content on a page with ajax. After it's loaded I can't seem to perform any more jquery on it. How do you get around this?
View 3 Replies
View Related
May 31, 2011
I'm using jquery file upload - when each file has uploaded, the name of the file appears, and I've added a check button:
<td colspan="2"><span class="ui-icon ui-icon-check"></span></td>
What I'd like to do is make jplayer fire off a "ding" sound as soon as each file is up.
For example (just to test)
$('.ui-icon-check').live('click', function() {
$(this).css("background-color","yellow");
});
needs an action, like a click or a mouseover or something. For each file that arrives, and therefore adds another instance of ui-icon-check, I'd like to fire an event. A weekend of googling has really only turned up Live Query from 2007, which works perfectly with
$('.ui-icon-check').livequery(function(){
$(this).css("background-color","yellow");
});
[Code]....
So am I totally mis-understanding the point of live, or just mis-using it?
I'm doing it this way rather than mess with the uploader code as he's updating the code all the time, and the more I can stay away from code code the better I think.
View 4 Replies
View Related
Jul 29, 2010
as you can tell by the following statements, i'm new to jQueryI'm trying to do the following (in plain english) without too much success.. ) when document ready.. 2) find the element with id 'next'.3) pull / take all 'li' elements, and perform so and so, all whilst excluding 'last' element.
$(document).ready(function() {
$('#next').click(function() {
$('li').each(function() { //for each li ..
[code]....
View 4 Replies
View Related
Feb 11, 2011
As this forum has been so helpful before, this time it's a JS question:I have a list of checkboxes from which the user can select 1 or more to check and perform an action upon.Thus, all checkboxes have the same "name" (in ASP code, since it's DB-related):
response.write "<input type=checkbox name=""FieldName"" value="&obj("OrderID").value&">"
I call JS using a button:
<img src="images/TrashBin.png" border=0 onclick="Delete(document.FormName.FieldName)">
[code]....
View 3 Replies
View Related
Sep 28, 2010
My problem is that it takes ages to perform the element.focus() function. This is not a function I have written myself but is part of the Javascript language itself. There are probably a lot of reasons why this might be slow but I cannot find the right one. Let me describe my problem. We have a product which was created around 2004 and has been developed on since. The HTML and Javascript used for the product was based on a prototype which we then converted into a server based solution (we use Servlets/JSP).
Due to the nature of the prototype (and also the graphical layout) the major page consists of one huge HTML page which a lot of hidden DIV tags. These DIV tags are then toggled visible/invisible to make it look like we have a kind of tab functionality. We also do not load all tabs when we load the mail page, instead each tab is loaded into a hidden iframe and then with Javascript we grab the resulting HTML content and paste it into the main page, making that one tab visible while hiding all other tabs.
In one of these tabs we also do some more magic. The layout is as follows; we have sets of three columns each and then a lot of rows. Each set of three columns contains one text field per column. The last text field contains a percentage value and when edited, we check if the value is lower then before the edit and if it is, then we split the column, creating another set of three columns.
When we load the page the first time, there exists only one set of columns with the last column having the value 100. There can however easily be 100 rows as well. For the larger pages we can have (at load time) three columns which makes it 900 text fields. I do not know if this is much or not.So, with the above info, to my problem. First off, when I try to move the marker and click on a given field (so that the marker starts blinking on the selected field) it takes maybe 2-3 second (although not always, seems to be more the first time). If I then tab to the next field it goes very fast (like one would expect).When I try to edit a value (by simply adding or removing values) it again takes a very long time (the first time).
When I then try to tab, it takes ages (this happens always, not only the first time).My Javascript then. I have two events, onchange and onkeydown. onkeydown checks if a variable is set to true or not. If it is set to true, the method does nothing. If set to false it does a bunch of tests and sets the variable to true. onkeydown is what I think causes my first lag but the code is not really that advanced (no loops or anything). onchange does the same checks plus all the magic (with the split etc). One of the last things it does is try to set focus on the next text field and this goes extremely slow all the time.
We use IE8. We (sadly) have a lot of IE specific stuff so the site doesn't even work in Firefox. I have used IE8 Developer Tools and used the Profiler which basically gives a list of Javascript calls and their execution times. My own functions take basically zero time, but there are A LOT of calls to functions that are not named, or anonymous, according to the Profiler.
How do I find what the anonymous function calls are?Why is it the focus() function that takes time, can it (or is it) still some of our own Javascript that makes that function go slow, even though it is part of the Javascript language?Can it be the amount of elements on the page (900 text fields)? Is that much?Can it be IE8? Are there known issues with this?
View 1 Replies
View Related
Oct 10, 2011
In Classic ASP, create a For to enumerate various fields, which perform multiple operations in a JavaScript script, my question is:According to the line that the user selected, run this script
Code:
function pagodir(renglon)
{
[code]....
View 2 Replies
View Related