Search found 31 matches

by avivm3
Wed Aug 11, 2010 9:30 pm
Forum: Javascript
Topic: Hidden Loops and maybe crashing the server?
Replies: 1
Views: 552

Hidden Loops and maybe crashing the server?

So, I've got a web application that is mostly driven by AJAX and PHP. I'm very happy with how things are looking, except for symptoms that might add up to the same problem, I'm hoping... If I'm watching the FireBug debugger window, I can see my page making multiple AJAX calls sometimes, when it shou...
by avivm3
Wed Aug 11, 2010 6:33 pm
Forum: Javascript
Topic: Javascript timing, and launching in responseText
Replies: 10
Views: 2097

Re: Javascript timing, and launching in responseText

Nothing I can make public at the moment. For now, I've lessened the symptoms by clearing the innerHTML of the elements I am hiding. So, if they re-display too soon, at least they are empty.

But now I have a new problem...I'll have to make a new post once I've surrounded the issue :?
by avivm3
Tue Aug 10, 2010 7:43 pm
Forum: PHP - Code
Topic: Variable is a String or an Array
Replies: 2
Views: 60

Re: Variable is a String or an Array

Perfect. Thanks!
by avivm3
Tue Aug 10, 2010 5:07 pm
Forum: PHP - Code
Topic: Variable is a String or an Array
Replies: 2
Views: 60

Variable is a String or an Array

This seems like a really obvious question, but I'm tired of struggling for the answer. I have an IF statement that I want to trigger ONLY if the variable I provide is a single value (Number or String). I DON'T want it running if the variable is an Array. What statement should I use to check if it's ...
by avivm3
Sun Aug 08, 2010 3:08 pm
Forum: Javascript
Topic: Javascript timing, and launching in responseText
Replies: 10
Views: 2097

Re: Javascript timing, and launching in responseText

jquery 1.4.2. And I'm using the slideUp and slideDown methods.
by avivm3
Sat Aug 07, 2010 10:21 pm
Forum: Javascript
Topic: Javascript timing, and launching in responseText
Replies: 10
Views: 2097

Re: Javascript timing, and launching in responseText

I do believe that JavaScript execution will not proceed until the innerHTML has been set. Perhaps there are images or some other external resource that needs to load, and that may well extend past the call to innerHTML. Yes, there are pictures. But after the first time I run the script, the picture...
by avivm3
Sat Aug 07, 2010 11:19 am
Forum: Javascript
Topic: Javascript timing, and launching in responseText
Replies: 10
Views: 2097

Re: Javascript timing, and launching in responseText

PHP Horizons, you are right. I mean, the reason for wanting to check on the innerHTML, like you said, is for display. I need to affect the display of my form, and I can't do it until it has populated. So my innerHTML comparison was just an attempt at creating some sort of check (which is silly, when...
by avivm3
Sat Aug 07, 2010 12:52 am
Forum: Javascript
Topic: Javascript timing, and launching in responseText
Replies: 10
Views: 2097

Re: Javascript timing, and launching in responseText

Hmm. So if I understood you correctly, I could feed the responseText into [something] that will extract the JS and then run it. If that's correct, I might have some follow-up questions when I research those options you mentioned for parsing out the script. But even if I'm able to extract the scripts...
by avivm3
Thu Aug 05, 2010 9:00 pm
Forum: Javascript
Topic: Javascript timing, and launching in responseText
Replies: 10
Views: 2097

Javascript timing, and launching in responseText

I have two JS questions (forgive me if you think I should have these on separate posts): 1) I want to trigger an event after the line before it FINISHES filling the innerHTML of an element. Right now, the display function is called on my element before all its content is populated, making for a slop...
by avivm3
Thu Aug 05, 2010 4:44 pm
Forum: PHP - Code
Topic: Replace variables within a string
Replies: 2
Views: 305

Re: Replace variables within a string

Beautiful. Much thanks!
by avivm3
Thu Aug 05, 2010 3:09 pm
Forum: PHP - Code
Topic: Replace variables within a string
Replies: 2
Views: 305

Replace variables within a string

I thought I had read about a PHP function that takes a string, and any number of variables, and when outputting the string, each time it encounters a $name, it replaces it with [the next] variable provided through its parameters.

Am I dreaming or does such a function exist?
by avivm3
Wed Aug 04, 2010 10:31 pm
Forum: Javascript
Topic: AJAX callback functions
Replies: 14
Views: 2017

Re: AJAX callback functions

That's how it's working now. It's hidden. I load the responseText HTML into it, then I show the DIV. The problem is that it moves on to the "show" portion before the heavier sections have a chance to load fully. So I'm thinking some sort of listener that waits to see when if it's all done....
by avivm3
Wed Aug 04, 2010 9:39 pm
Forum: Javascript
Topic: AJAX callback functions
Replies: 14
Views: 2017

Re: AJAX callback functions

Ok, it works, in that the function launches. But I'm still not achieving my goal. I want the responseText to finish loading into the element before I display it, so that my smooth display animation isn't ruined by the content loading half way through it. I added a time delay before the AJAX function...
by avivm3
Wed Aug 04, 2010 8:57 pm
Forum: Javascript
Topic: AJAX callback functions
Replies: 14
Views: 2017

Re: AJAX callback functions

Right on man, exactly what I was looking for. That did it...Thanks!!
by avivm3
Wed Aug 04, 2010 8:20 pm
Forum: Javascript
Topic: AJAX callback functions
Replies: 14
Views: 2017

Re: AJAX callback functions

The current function also changes the CSS Display property of the element, because I pass it that object. So I get the concept. But, in general, I've never passed a function before, so how do I do it? Do I have to nest it inside this-> function(){ } Can I just use the name of the function? How do I ...