Question: I have just uploaded my first 'website' (html+js) to a web server, and my images that are loaded via JavaScript are suddenly broken. (They worked on my local computer.)

I used relative paths (no path at all, since the images are in the same folder as .html and .js files). Static images that are encoded directly in html file are showing, but those loaded dynamically, via JavaScript do not show up. Any ideas why?

---

Sorry, I thought this could be something general, independent of JS. My very simplified piece of code for showing images:

```
$("#show_image").click(function(){
            $('#test1').append('<img src="a.jpg">');
        });

```

'show\_image' is a button, #test1 is a div

Answer: 
The `CTCallCenter` object has a `currentCalls` property which is an `NSSet` of the current calls. If there is a call then the `currentCalls` property should be != nil.

If you want to know if any of the calls is actually connected, then you'll have to iterate through the current calls and check the `callState` to determine if it is `CTCallStateConnected` or not.
```
#import <CoreTelephony/CTCallCenter.h>
#import <CoreTelephony/CTCall.h>

-(bool)isOnPhoneCall {
    /*

     Returns TRUE/YES if the user is currently on a phone call

     */

    CTCallCenter *callCenter = [[[CTCallCenter alloc] init] autorelease];
    for (CTCall *call in callCenter.currentCalls)  {
        if (call.callState == CTCallStateConnected) {
            return YES;
        }
    }
    return NO;
}

```