When you write html or css then the validation proces is a good way of
finding errors. I get some syntax error / code: 0 errors in IE, how can
I figure out what the problem is. The thing is - it works - but it does
not look good when IE says the page is done with errors...
Is there any way to debug javascript in a web application? When I develop JSP pages, and it has the javascript code in it. The problem is the debugger in Java IDE (WSAD in my case) can only debug Java code but not Javascript code.
I am trying to make a canvas element display an image with some text on using canvas.drawImage and canvas.fillText. Only problem is my code is generating a very odd and hard to debug error.
I have six checkboxes. once u choose checkboxes and click submit, those checkboxes which are checked will be posted and inserted into database. How can I write the javascript?
I know this has to be easy, but I can't seem to figure it out. I'm debuggin' someone elses code...
x="hello"; +x+"world"
....and I don't get it! What does the "+x+"world" do? If I alert(x) the only thing that comes out is "hello". I also wondered why it doesn't error without the ";" at the end of the line.
I keep getting a syntax error on line 3 and 4 of this very simple script. Normally firebug would give me enough info to fix this but jQuery escapes me. I can see no reason for the errors. <script type="text/javascript"> $(".shipping-switch[name='shipping_switch']").click(function(){ var selector = "div#sub-address"; if($(this).val() === "1"){ $(selector).slideDown("fast"); } else { $(selector).slideUp("fast"); }}); </script>
I have to debug the error for eleave system for a company. when i do the testing i define that having an extra day for the service length at the system. i don't want you to settle the problem for me, just tell me where can i find the source to know where is the problem? at least i know where the souce it, so i can repair it.
I have a couple of problems with my site related to javascript
These areas of the site use jquery and they work fine in Firefox and Chrome but not in IE
First problem is related to tablesorter and pager (jquery plugins) that give a properly paginated list of members in Firefox but gives all the returned members in one big list using IE (and usually a complaint that 'this script is taking too long' as well)
The other problem is related to the member search age, it has these expandable areas where the user can select further search criteria - they use jquery 'slider' to reveal the collapsed areas, again this works fine in Firefox or Chrome but looks messy in IE
To compound the problem the only javascript debugger I have is a plugin for Firefox called Venkman which I find pretty useful to find problems with AJAX etc, but seeing as the jquery/javascript stuff works OK in Firefox it's difficult to fix what isn't wrong there!
So really, how do I go about even beginning to understand these problems so I can fix them?
what i want this to do is take the x_cityid and add it to teh hidden field with the id of citiesid (I will do an ajax call before this but my simple javascript is not working)what am i doing wrong?
function addtocitylist() { var x_cityid = document.getElementById('x_cityid'); var x_areaid = document.getElementById('x_areaid');
I have a piece of code that I dynamically load using globalEval(). But I am not able to debug this piece of code, specifically in IE, even when I place a "debugger;" statement.
I must be missing something, is there not an easy way to validate inline?
For example, I have a required text input that is given focus on page load, I would like for it to throw an error if the user moves to the next field w/o entering any data.
im loading data via json dynamical from the server. Now i try to optimate the speed of my application and so i want to disable the validate of the fields during the data loading from the server.Is there a simple solution to this? like validate = false
I have a form (form1) to register with the fields: user, email, password being validated normally.
Have a second form (Form2) to the user update the data registered in form1, and the fields user, email, password is already populated with data from the database, the email field I use the remote validation, and as the field already has been completed and read always says that this email already exists, how do I create a rule or method so that when the field is already filled it not do so validating and validate if it is filled with a new email. Email2 have a hidden field in order to do a test type.
I'm working under certain constraints wherein,at a certain point outside my direct control,validate is called with no arguments, but after that I want to set a custom validation function on a form field. I figure there's got to be a way to manipulate validate's internal data structure to add the function, but I don't have a clue as to how.
I have a section of a form containing elements that are not visible, currently just in a hidden div. Some of these elements have validation on them so when the form is submitted it fails on this validation.What I am after is a way to stop the validation firing for any hidden elements. I have tried setting them to 'display: none' and 'visibility: hidden' but this does not have any affect.
I have an MVC application and I am trying to do some validation but the Validate doesn't seem to fire. I can get it working in a basic html page but for some reason it is not working in my aspx page and I am not sure why. I have all the js files included that I need and the CSS classes defined exactly as they are in the basic example in the jQuery documentation. Here is my code:
I need to validate three textboxes and it will validate for numbers. How should I change my code to validate three textboxes?
<!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]....
I need to use Javascript to validate 3 textboxes, whereby the users can only key in numbers (because they are phone numbers related fields). If any of the textbox is empty, display an alert message to show which textbox is empty. I do not want to show many alert messages to show that, for example, text1 and text2 are empty, it will show two alert messages. I would need to show one "summarized" alert message instead.
I'm working on some code and am running into brick walls. I'm trying to write out Javascript with Javascript and I've read the clj Meta FAQ and didn't see the answer, read many similar posts (with no luck though), and searched through the IRT.ORG Faqs (www.irt.org/script/script.htm).
The Javascript is designed to open an popup window and then inside that window call another script which will resize that window. There may be another way around this but the reason I tried this approach initially was that I wanted to call the onload handler in the popup window to resize the image only after the image had completely loaded. I've had some code in the primary Javascript file (showimage.js) before that works if the image has been cached but on the first load, it doesn't resize properly which tells me it is probably because it is trying to resize the window based on the image size but it isn't completely known at that point. So I removed that code and tried placing the resizing code in the second Javascript file (resizewindow.js). BTW I've tried other code to open a popup image and automatically size it ie Q1443 at irt.org but that doesn't do exactly what we need.
Even if there is another way to do this with one file, I still want to figure out why this isn't working in case I run into it in the future.
I thought what I would need to do to use document.writeln to write Javascript would be to escape any special characters and to break apart the script tag ie
document.writeln('</SCRIPT>');
would become
document.writeln('</SCR' + 'IPT>');
I have a HTML page and 2 Javascript files. All files are in the same directory and have permissions set correctly.
Here are the 3 files (keep in mind wordwrap has jacked up the formatting):
index.html ---------- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Test</title> <SCRIPT type="text/javascript" LANGUAGE="JavaScript1.1" SRC="showimage.js"> </SCRIPT> </head>
<body> Click the house<BR> <A ONCLICK="newWindow1('house1.jpg','Nice House')"><IMG SRC="house1thumb.jpg"></A> </body> </html>
showimage.js ------------ function newWindow1(pic,sitename) {
resizewindow.js --------------- function resizewindow() { // Do resizing here. // Right now this isn't being executed alert("resizing window"); }
Can anyone provide some pointers as to why this javascript is failing? I'm using IE6 on Win2k and when I click on the image to open the popup window, it does open the window but it is white with no content and the system immediately goes from about 4% CPU usage to 100% and consistently stays there until I kill that window with the task manager.