Sleek Interactive
4159 Enquist Rd
Campbell River, BC V9H 1A4OFFICE: 778 420 3918
MOBILE: 250 204 6475
*content_window*Reserved words in Javascript "Content_Window" is not the only match in this case....
September 19th, 2011
scrollup(),scrolldown() is not a functionOdd Javascript behaviour scrollup(),scrolldown() is not a function - possible reserved words...
August 31st, 2011
CSS !importantUsing !important with inline styles
August 28th, 2011
Custom CSS CursorsLearn how to add custom cursors to any CSS element in your website....
August 23rd, 2011
Social Networking Timestamp OperatorLearn to create a Timestamp Operator in PHP using the PHP Date function...
August 23rd, 2011
BLOG CATEGORY: Javascript | Posted on: September 19th, 2011 |
Another stump today - a simple javascript function - or is it?
Well technically it was a very simple function - something like:
function set_content_window(url){
document.getElementById('iframe_o_mine').src = url;
}
Simple enough right? Well not so. I got no errors just nothing at all - the worst kind of error is one that does not tell you it is there.
So I though the function name looked a bit system-like, so I changed it to:
function update_content_window(url){
document.getElementById('iframe_o_mine').src = url;
}
Same thing - turns out the reserved name must be a wildcard match because just having the instance of "content_window" has no effect when defining a function with such a name. Odd! Updated once more to something silly like the one below and it worked as expected.
function any_other_function_name(url){
document.getElementById('iframe_o_mine').src = url;
}
