Monday, April 20, 2009
I was getting the above error in my firebug output. It was coming from an included template that I use elsewhere on the website and I couldn't figure it out. Turns out that the page from where the cfwindow is called had a form without a name and id on it. Once I gave the cfform a name and id the problem went away and it works now.
Monday, April 13, 2009
I got hungup for several hours this afternoon on a couple of stupid issues. The first, I was getting a memory leak error and my browser was freezing up so that sometimes I had to restart. Turns out I did something I do alot in coldfusion, I included the end tag of a javascript tag in the emain tag like this:
I don't know why this is but I am sure there is an easy explanation that should make sense to me, but It didn't.
The other thing that took alot longer to figure out was a cfwindow that wasn't findinng the above attached .js file. I played around with the path and all sorts of stuff and couldn't figure out why it wasn't working. Because that script tag above has to be on the parent page that calls the cfwindow, not on the page that comes up inside the cfwindow.
Tuesday, May 08, 2007
Found this here: http://psacake.com/web/iw.asp
Wednesday, December 13, 2006
function
checkValue(){if (document.getElementById('valuation ').value >= 1000000){
if (confirm("This value is over $1,000,000. Are you sure you meant to enter such a large value?")){
}
else {
document.getElementById('valuation').focus();
}
return false;
}
}
I was able to set focus to any field, except the one I just came from. The only hack I was able to find was to set focus first to another field, then the field I came from and then use the follwing in my <input> statement.
onFocus="this.select()"
Here is the javascript function I had to use:
function
checkValuation(){if (document.getElementById('valuation').value >= 1000000){
if (confirm("This value is over $1,000,000. Are you sure you meant to enter such a large value?")){
}
else {
document.getElementById('otherfield').focus();
document.getElementById('valuation').focus();
}
return false;
}
}
David Mineer
Friday, November 03, 2006
alert(document.title);
alert(document.body.tagName);
alert(document.location);
Here is the with Statement:
with (document) {
alert(title);
alert(body.tagname);
alert(location);
}
"It is another scope. When you use the with statement, you are forcing the interpreter to not only look up the scope tree for local variables, but you are also forcing it to test each variable against the object specified to see if it's a property" - "Professional Javascript for Web Developers, Nicholas C Zakas, p 581
Friday, October 27, 2006
Include the following element into the head part of your document:
/script type="text/javascript"/
function noenter() {
return !(window.event && window.event.keyCode == 13); }
/script/
Add the following attribute into each input type="text" tag(s) in your form:
onkeypress="return noenter()"
The function has to go in the header on the page. It didn't work for me putting it in an included .js file.