The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

psomma (4) [Avatar] Offline
#1
Hi,
I have try planets.html example in the ch05 but the planets menu don't display the image, only the text (mercury, venus, etc.) appears.

The generated html is
<div class="planetbar" id="planetbar">
<div id="p1" class="planetbutton"><img  ></div>

.......
all the src attribute in the img tags are set to undefined.

What's the problem ? Can you help ?

Regards

Paolo Sommaruga
adutrajr (2) [Avatar] Offline
#2
Re: missing images in ch05 planets example
In the line number 75 in the "planets.js", you must correct the source, change "this.img" for "this.image".
The planets will appear, but the popup divs with the info about the planets will not work yet, if you find a way to work around this problem please tell me.
adutrajr (2) [Avatar] Offline
#3
Re: missing images in ch05 planets example
I fixed it now, the other problem was happening cause of a comma before the last spec in the Planet spec definition in line 62 (planet.js)
delete it and everything will work fine
Pascarello (208) [Avatar] Offline
#4
Re: missing images in ch05 planets example
Thanks for solving the problem!

Is there any other issues in that for me to look at or did you tackle them all?

Eric
psomma (4) [Avatar] Offline
#5
Re: missing images in ch05 planets example
thanks for your hints, now it works but I think yet there are some problem in the code because the Firefox Console Java Script reports some exception error like

Errore: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://localhost:8083/ch05/net.js :: anonymous :: line 56" data: no]
File sorgente: http://localhost:8083/ch05/net.js
Riga: 56

Regards

Paolo
Pascarello (208) [Avatar] Offline
#6
Re: missing images in ch05 planets example