User Profile

Collapse

Profile Sidebar

Collapse
holisticnetworking
holisticnetworking
Last Activity: Oct 24 '08, 01:37 PM
Joined: Oct 10 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Well, Gits, you've done a whole lot more than most would have, so I appreciate the effort.

    One last thing, since you mention timing: the images I'm gathering up are actually being dynamically rendered from XML in the following line:
    Code:
    	k.getImages();
    Is it possible that the problem is that the code is happening before the XmlHttpRequest has gone through? If so, what do I do to arrest code execution...
    See more | Go to post

    Leave a comment:


  • The answer seems to be a big, fat "no." Which makes sense, since it really has nothing to do with the getElementsByCl assName function. Dangit....
    See more | Go to post

    Leave a comment:


  • Wait, wait, wait. . .

    Maybe the problem is that I'm using a getElementsByCl assName function that was created outside of Mozilla's support? Could it be that if I change the function name, it might work? Hmm. . .
    See more | Go to post

    Leave a comment:


  • Here is the getElementsByCl assName function:
    Code:
    // getElementsByClassName
    document.getElementsByClassName = function(clsName){
        var retVal = new Array();
        var elements = document.getElementsByTagName("*");
        for(var i = 0;i < elements.length;i++){
            if(elements[i].className.indexOf(" ") >= 0){
                var classes = elements[i].className.split("
    ...
    See more | Go to post

    Leave a comment:


  • OK, gits. Here goes. Thanks again for all the help:
    Code:
    function launchKiosk() {
    	k.getImages();
    	var demo_container = document.getElementById('demo_container');
    	var divs = demo_container.childNodes;
    	for (var x = 0; x<divs.length; x++) {
    		if(divs[x].tagName == 'DIV') {
    			if (divs[x].getAttribute('id') == 'designs_button') {
    				k.designs_button = divs[x];
    				k.designs_panel
    ...
    See more | Go to post

    Leave a comment:


  • Same thing. And I know that it should work. The trouble is that it doesn't work. I'm trying to figure out why that would be. Any guesses? Should I post the entire function to see how it goes together? That's looking like it might be necessary.

    I'll have to post the entire function tomorrow when I'm back at work....
    See more | Go to post

    Leave a comment:


  • Perhaps we've gone off on a tangent. I take your point about using the enclosure (and I've never seen a closure created in that way, so it's definitely a function to study and absorb, thank you!). But I'm left with the same problem: it works fine in IE but not in FireFox. By adding in the alert() message, it suddenly works in both versions. THIS is primarily what brought me to your awesome forums today. Do you have any idea why this would be...
    See more | Go to post

    Leave a comment:


  • I'm not sure I understand what that "(img_buttn z[z]);" text is doing there after the closed curly brace?...
    See more | Go to post

    Leave a comment:


  • The addEvent function:
    Code:
    function addEvent(elm, evType, fn, useCapture) {
    	elm["on"+evType]=fn;return;
    }
    The code originally posted is added to the page with the same addEvent function, loading on window load. What I expected was to add a function to the images which would happen onClick, but what I got was nothing at all.

    I've also added an alert() inside the conditional to see...
    See more | Go to post

    Leave a comment:


  • Thanks again, Clint. I don't get what's going on with this one. Any ideas what *might* be causing a problem? The code is about as basic as it gets, yet it doesn't want to work.

    It may also help to note that this seems to be an issue for FF and not for IE....
    See more | Go to post

    Leave a comment:


  • holisticnetworking
    started a topic I Have to alert() the Object?

    I Have to alert() the Object?

    I don't get it:

    Code:
    	var img_buttnz = document.getElementsByTagName('IMG');
    	for (var z = 0; z<img_buttnz.length; z++) {
    		alert(img_buttnz[z].id);
    		if(img_buttnz[z].id) {
    			addEvent(img_buttnz[z], 'click', function() { k.changeFile(this); });
    		}
    	}
    That works.

    Code:
    	var img_buttnz = document.getElementsByTagName('IMG');
    	for (var z
    ...
    See more | Go to post

  • iam_clint, thanks very much for the quick reply, that helped!...
    See more | Go to post

    Leave a comment:


  • holisticnetworking
    started a topic appendChild objects not recognized?

    appendChild objects not recognized?

    I'm using the xmlHttpRequest object to gather images and place them on a page. Later in the script, I need to add a function to their onClick property so they can do the business I need them for. However, after having placed them on the page, I cannot then snatch them up again to add the onClick.

    I'll readily accept the premise that I'm doing something backwards, but because a) the function I want to add to the onClick property...
    See more | Go to post
No activity results to display
Show More
Working...