IE Suggest Bug But No Code Is Reported In The Debugger?
Oct 14, 2010Javascript issue: IE suggest bug but no code is reported in the debugger. Any ideas why IE doesnt find the broken code / or line
View 1 RepliesJavascript issue: IE suggest bug but no code is reported in the debugger. Any ideas why IE doesnt find the broken code / or line
View 1 RepliesWhat I Need:An auto-suggest feature(1) so that when a person types in an address and presses go it automatically brings down a menu to show a list of relevant addresses (for example someone types romford road, it will bring down the different "romford roads" that it can find), upon clicking the desired "romford road" it is then automatically marked on the map.
How will it be used?Im using Google maps(2) with a FROM and TO text boxes, that when valid postcode/road names etc are typed in, it calculates the price based on distance. Adding an autosuggest will speed up the process.
(1) [URL]... This is the page I am currently using, when the customer fills in and presses calculate price, the price is shown along with the route plotted on the map. The calculate price button is then hidden and a "click here to book" is made visble which then passes on the various variables to a booking page.
(2)[URL]... The autosuggest feature on this page is EXACTLY what I need although I have no idea how to merge it with my one
please take a look at the test.txt attached file.
View 2 Replies View RelatedIs there a free JavaScript debugger available?
View 5 Replies View Relatedwhat I want to do is have an auto suggest of words as a user types, the code that I have works only once.For example: if you type.. hel, it will suggest hello but once you press space and type hel, again it doesn't suggest hello, I need it to suggest words even after you press space.
HTML
Code:
<div>
<h3>Auto Suggest</h3>
<input type="text" size="30" value="" id="inputString" onkeyup="lookup(this.value);" onblur="fill();" />[code]....
I have a site setup that uses ajax to create a suggest popup like google suggest. As the user types in each letter, it pops up a div that lists the possible suggestions that the user can select to populate the text field. It works fine, but in order to select a suggestion, I have to select the suggestion with the mouse. However, I would like the ability to use the arrow keys to select the suggestions....
View 1 Replies View RelatedIs there any way in Javascript or Jquery to disable the suggest list of previously inputed values in a textfield under it when you start input anything in it??
View 4 Replies View RelatedWhat debugger would let me see the HTML in a div after I've added HTML
to the div using its innerHTML? That is:
var someInputHtml = prompt("input html");
var referenceToSomeDiv = document.getElementById("someDiv");
referenceToSomeDiv.innerHTML = someInputHtml;
When debugging, how do I now see what HTML is in the div "someDiv"?
Maybe there is a FireFox extension for this? Firebug?
I would like to download debugger for javascript.
Since I works only with IE I thought of trying using the Microsoft Script
Debugger.
I found the following URL
http://msdn.microsoft.com/library/d...tml/sdbug_1.asp
My problem is that I can't find the URL to download the debugger.
Any other JS debugger that works well for IE ?
I'm looking for a good javascript debugger.
View 3 Replies View RelatedI finally got tired of doing:
alert('myVar: ' + myVar);
and
str='' for(i in someObject) str+=i+': '+someObject[i]+'' alert(str);
and put together a little debugger to take care of that.
I bet I'm not the first one, but when it comes to JS my motto is "If you want to do it right.
Anyhow here is the demo, you are welcome to view and use the source, just leave the credits...
This is a script that frequently keeps me from using bad words.
It loops through an object and returns its properties in text (for alert) or html format.
Usage:
_viewObj(obj[,instanceName[,type[,levels]]]);
Ex:
var obj = {id:3,arr:[2,3,"str",{prop1:2,prop2:""}],nr:3}
alert(_viewObj(obj));
document.write(_viewObj(obj,"obj","html"));
Parameters:
pValue: The object
pName: Instance name of the object. Default: "input"
pType: Which type to be return (text or html). Default: "text"
pLevels: The max amount of levels. Useful if an object references a parent. Default: infinite
Returns:
A string with the properties
function _viewObj(pValue,pName,pType,pLevels,pObj) {
function objExists(pCurr) {
for (var i=0; i<pObj.length; i++) {
if (pObj[i]==pCurr) {
return true;
}
}
return false;
}
pType = new String(pType).toLowerCase();
if (new String(pName) == "undefined")
pName = "input";
if (new String(pType).search(/html|text/i) == -1)
pType = "text";
if (pLevels == "undefined")
pLevels = -1; /* Infinite */
if (typeof pObj == "undefined")
pObj = [];
var str="";
if (typeof pValue != "function") { // No functions / methods - just values
var br=(pType == "text"? "
" : (pType == "html" ? "<br>" : ""));
if ((typeof pValue == "object" && !!pValue) && (pValue.length) && (!pValue.substring)) { // An array
try {
for (var i=0;i<pValue.length;i++) {
if (pLevels==0) {
str+=br+pName+"["+i+"]: "+pValue;
}else{
str+=""+_viewObj(pValue[ i ],pName+"["+i+"]",pType,pLevels-1,pObj);
}
}
} catch (e) {
str+=br+pName+": "+pValue+" (Not an array)";
}
} else if (typeof pValue == "object" && !!pValue && (!pValue.substring)){ // An object
try {
for (var prop in pValue) {
if (pLevels==0) {
str+=br+pName+"."+prop+": "+pValue;
}else{
if (typeof pValue[prop] == "object" && objExists(pValue[prop])) {
str+=br+pName+"."+prop+": [Parent Object]";
}else{
pObj.push(pValue);
str+=""+_viewObj(pValue[prop],pName+"."+prop,pType,pLevels-1,pObj);
}
}
}
} catch (e) {
str+=br+pName+": "+pValue+" (Not an object)";
}
} else{// if (typeof pValue != "object") { // Simple value
str+=br+pName+": "+pValue;
}
}
return str;
}
edit:
Avoiding never-ending loops by checking for parent objects.
Ex:
var parentObj={id: 2};
var test={id: 1,par: parentObj};
parentObj.tst=test;
According to the Sitepoint FAQs, most serious programmers debug their scripts by hand, but when my javascripts don't work , I like to be told why, the more explicitly the better.
I used to have NN4 and its debugging was fantastic (certainly more helpful than IE and Opera, although theirs aren't too bad). I was just wondering what other people think is the best browser/resource for debugging javascript. If it's Netscape, does this mean I have to download the whole browser, and does the debugging vary with version number? Which would be the best to get? (Note: I'm only interested in its debugging capabilities, not its quality as a web browser).
Whenever I stop the IE script debugger it closes the browser window as well.
View 2 Replies View RelatedI recently learned about a new Javascript Debugger called FireBug. From what I've heard, it's pretty good. Here's the link: Code:
View 4 Replies View RelatedI have both firebug and venkman debuggers installed. Both seem to function yet neither works. I use firefox3.5.3., windows xp.
View 2 Replies View RelatedSo I have a nice little hand rolled Ajax call to my server pulling a list from the database and displaying it in a drop down list dependant on the user input. Aka Google suggest. I am wondering if the quickest way to do this is to call the database each time with Ajax and search the results with the input, or to write an xml from the database and search that. Then when the Database is updated rewrite the xml file.
Am I underestimating MYSQL again? Or not, and I feel it would be good practice to write the xml file because it will essentially mean a lot less database calls. But I don�t know how fast searching an xml file would be in comparison to a db call. The results from the database are say 500 entries anywhere between 10 - 100 characters each. I want to know A. The best way to do this B. Lets say the site will have pretty high traffic so I am looking for it to be as tweeked as possible. I can test but thought at the end of my week it was worth seeing what peoples advice is.
I'm pretty new to JS, used to be back-end guy with strong front-end skills (HTML, CSS), learning JS now and I have a huge problem.
I'm using Windows 7, coding mostly in NuSphere PhpED, but I see it doesn't work so well for JavaScript.
What's the best tool for JavaScript coding in Windows, maybe with built-in debugger (I hope there's something else than Firebug, Dragonfly etc.) with syntax coloring, and perfectly with a feature like this one
Maybe you do know the best syntax-help Windows editor for PHP too? (PhpED is not perfect IMO). Eclipse?
BTW - if there are any OSX based front/back-end webdevs - put screens of your editors features (JavaScript & PHP preferably). I'm thinking about switching to MAC, but haven't got cash for that at this moment (and I'm kind of Apple hater, however I believe in front-end field they have no contest).
How to write a program that will auto suggest or auto complete a search word from a MSAccess database using PHP and Ajax.
View 1 Replies View RelatedI have a javascript program that works fine under Firefox and on IE
when running XP, but is having a problem with IE running under Windows
2000 Pro.
On my personal XP development machine I have the Microsoft Script
Editor and I can set a breakpoint, step through code, inspect
variables, etc... with no problem.
On a machine where I am trying to debug this problem I am running
Windows 2000 Pro with IE 6. I installed the Microsoft Script Debugger.
When the program hits the exception the script debugger will come up
and show me the line where the error occurred.
I need to be able to inspect the variables to determine the problem.
However, from what I can tell, there isn't anywhere to inspect or watch
the variables in MSD?
I want to have a simple code such that some data is stored in array. When we create a search box it has to give suggestions from the data stored in array.
View 4 Replies View Relatedhere is the page I'm working onhere is the jQuery in use
$(document).ready(function() { $('.error,.success').hide(); $("#send").click(function (){ $('.error,.success').hide("slow"); $.ajax({ url: 'add.php?lnk='+$.URLEncode($('[name=lnk]').val())+'&
[code]....
and in this code, it works, the call is made and text is added. in the other code I don't get a change at all. Not even in the database that add.php manipulates.
I am trying to make a gui for clients to edit a php page that displays html and javascript.
I want the user to be able to move html elements around and even edit it like add effects like fade in and out etc.
Then after all the changes I want to overwrite the existing php file that does this for that user. how can you make such changes and then save it to a file?
It's an html / javascript editor but using a gui instead of allowing them to directly touch the code. It would be a security risk if I allow such a thing. So I need to program a interface that would make such changes and save them to file.
Like how can you delete and add new javascript code to the file?
I am a novice, almost to an intermediate-level JavaScript guy, so much of this is new to me. I appreciate your patience reading this.
I have a routine that creates some HTML on the fly (updateFilters() function) and after the HTML is created, I attempt to access some fields (elements) on the form itself.
I works fine if I place an alert() statement after the HTML is created, but when I remove, the code errors out.
I have tried the setTimeout() statement, but I cannot grab the element --- undefined or null is returned. It seems that the form is the only element I can get a handle on --- everything else is undefined or null...
Here is the code:
function editQuery() {
var f;
var x;
var myForm = document.forms[0];
// Get the row filters that were used in the last query..
for (f = 1; f < 16; f++) {
var filter = eval("myForm.FilterList_" + f);
if (filter.selectedIndex > 0) {
var methodElement = element("FilterMethod_" + f);
var methodIndex = methodElement.selectedIndex;
var savedFilterMethodValue = methodElement.options[methodIndex].text;
var choicesElement = element("FilterChoices_" + f);
var choicesIndex = choicesElement.selectedIndex;
if (isNaN(choicesIndex)) {
var savedFitlerValues = choicesElement.value;
}
else {
var savedFitlerValues = choicesElement.options[choicesIndex].text;
}
updateFilters(filter); // update the filters
// take the saved methods and values and then update the selections
// Alert here makes the code work..
// alert("Try this");
// Wait for HTML..
setTimeout("completeEdit()", 1000);
function completeEdit() {
// Since the object was updated, get the object again..
var methodElement = element("FilterMethod_" + f);
for (x = 0; x < methodElement.options.length; x++) {
if (methodElement.options[x].text == savedFilterMethodValue) {
methodElement.options[x].selected = true;
break;
}
else {
methodElement.options[x].selected = false;
}
}
// Since the object was updated, get the object again..
var choicesElement = element("FilterChoices_" + f);
for (x = 0; x < choicesElement.options.length; x++) {
if (choicesElement.options[x].text == savedFitlerValues) {
choicesElement.options[x].selected = true;
break;
}
else {
choicesElement.options[x].selected = false;
}
}
// Only display next row if f = 2..
// If only one row was used, no reason display the next row..
if (f == 2) {
displayNextFilter(f - 1); // display it
}
}
clearTimeout(timeOut);
}
}
}
Do I have to pass the object (the form, the elements) to the completeEdit() function in the setTimeout() statement?
I am trying to hide this code:
HTML Code:
using this code
HTML Code:
This works fine when I place this code under the html in the main source, but if I try to add this Jquery code to an external js sheet it doesnt seem to work?
Currently my js sheet is called in the header, when I move this link to the footer of my page the code works again, so Im guessing this has something to do with where the jquery code is placed in relation to the code Im trying to hide?
How I can keep my js in the header but still make the content disappear on click?
I'm trying to get my Client Side Firefox DHTML app to display a list of eBooks. For this, i have the following files
F:Textbooks.html
F:eBooks.txt
F:FirstBook.txt
F:SecondBook.txt
F:ThirdBook.txt
[Code].....
i'm using FireFox 3.5 to develop this App. So obviously this will not work with anything other than Gecko Based browsers.
here is my HTML code:
<html>
<head>
<script language="JavaScript">
var eBookLibrary = "eBooks.txt";
[Code]....