Lots Of Booleans
Jul 23, 2005
I have a situation where I have many (more than 32) boolean flags:
var foo=true;
var bar=false;
var baz=false;
// etc.
At various points in the script, these flags may be set or unset.
There is a point where an action is to be taken only if all the flags
are false. I also need to debug this check of all flags - i.e., print
out the value of all 32+ of these flags. I'd like to find something
besides a monstrous conditional - for example, using an integer and
storing these flags as bits in it, except that since there are more
than 32 of these flags an integer will not contain all of them.
View 5 Replies
Aug 12, 2011
I attempting to set attributes for all tags of a particular type....
I have a bunch of thumbnails <img> tags; when I wand over them I would like to show the corresponding large image with a script but the tags require onMouseOver events. I really don't feel like adding a bunch of onMouseOver="myShowScript" attributes to every img tag manually...
my scripts aren't working. I'm sure there is some fundamental concept about java and html I don't get...
here's ONE of the versions that doesn't work.. I've tried a few things but I'm open to scrapping everything for a better way...
function addAtts(){
var numberOf = document.getElementsByTagName("img");
for(i = 0; i < numberOf.length; i++){
numberOf[i].onMouseOver="myShowScript()";
}
}
View 9 Replies
View Related
Jun 18, 2009
OK so I've been searching for a week now for an example of pagination of data using jquery, ColdFusion and SQL server. I'm finding tons of examples using PHP and MySQL. Have any of you successfully got pagination working with Fusion and SQL Server? I am trying to run a report that could end up having thousands of results that I would like to paginate using jquery. Most of the pagination plugins though rely on you returning ALL of the results to the client first whether in JSON, XML or just straight to the browser as a table and then it paginates them. So if there are thousands of results this is not optimal. I'd like to try and get something working where as it paginates it goes to the database using Fusion and just grabs the next X records to display.
[Code]...
View 3 Replies
View Related
Sep 4, 2011
Here's a demo of the work I have at the moment: [url]
Basically if you click on "Blog" in the main navigation column, a second column next to it will Ajax loads "blog.html" that contains a list of "posts." If you click on one of the posts in the second column, a third column will load in with the content of the post.
While that's working fine, if you click "Blog" again, this is where the script goes haywire. Firebug shows over 20 GET requests on the second column. And then when you click on a link in the second column after that, an equal amount of GET requests is sent. You can even see the animations going crazy. I have no idea why this is happening.
It started to occur when I added the following lines to mainnav.js:
The reason why I added this was because I wanted to show the full slide out animation before the script Ajax loads another blog.html when "Blog" is clicked for the second time. Before I implemented the code above and loadContent function, the problem was that the slide out animation was cut off by the loading of the page. To prevent this, I thought using a callback function would work since callbacks occur after the animation is completed.
The only issue with this is that if you first load the page #listnav has no child elements. Therefore if you try using the following code:
...the callback function is never executed since there are no nav li elements until you click "Blog." That's why I tried to implement an if statement which checks if there are elements within #listnav, and it works fine on the first click, but any clicks after the script just bugs out.
View 2 Replies
View Related
Aug 2, 2010
After realizing that htc files only work with Internet Explorer, I have needed to have JavaScript code to suit the two lots of css code below. Please help, I need the code pretty urgently. The code must work with most versions of browsers.
[Code]...
View 1 Replies
View Related