Hi; Okay, prove me wrong on this one! I wrote a short Python script that I call like this: <p tal:replace="structure python:here.templateImageJS(here.size(),'sauder_tv',280,280)" /> which renders to the page like this: <a href='#' onClick="popWindow('sauder_tv')"><img src='images_1024/sauder_tv_1024.jpg' width='166' height='103' alt='' style='' border='0' /></a> The page also contains code that looks like this: <script language="javascript"> <!-- var broyhill_office = new String(); var sauder_tv = new String(); broyhill_office.src = "popUp.dtml?popper=broyhill_office" sauder_tv.src = "popUp.dtml?popper=sauder_tv" function popWindow(image){ pic = eval(image + ".src") newWindow = window.open(pic,"","toolbar=0,menubar=0,width=550,height=550,scrollbars=0,status=0,location=0,directories=0,left=100,top=100"); } --> </script> Now: This code WORKS JUST FINE throughout the ENTIRE site EXCEPT on one certain page where it only works in the *entertainment* section. The rest of the time it throws this error: Cannot locate object at: http://web.vi/best_furniture/1024/s/c/x/en-us/undefined Why??? Here's a URL to it: http://web.vi/best_furniture/1024/s/c/x/en-us/Living_Room_frame.pt TIA, beno
This is no zope problem, but since I'm looking at mozillas javascript debugger anyway ... It is very nice btw. took me 2 minutes to find what seems to be the failure here. You define instanciate some strings at the beginning: .. var sauder_ent = new String(); var sauder_ent2 = new String(); ... And later on you write ... sauder_ent.src = "popUp.dtml?popper=sauder_ent" sauder_ent1.src = "popUp.dtml?popper=sauder_ent1" sauder_ent2.src = "popUp.dtml?popper=sauder_ent2" .... But sauder_ent1 doesn't exist, and all the definitions after sauder_ent1.src seem to fail because of that, so I guess this is the failure, since then your popup always gets called with pic = eval(image + ".src") # pic is undefined if eval(string) isn't defined newWindow = window.open(pic,...); HTH, oliver
At 12:48 PM 2/26/2003 +0100, you wrote:
This is no zope problem, but since I'm looking at mozillas javascript debugger anyway ... It is very nice btw. took me 2 minutes to find what seems to be the failure here.
You define instanciate some strings at the beginning:
.. var sauder_ent = new String(); var sauder_ent2 = new String(); ...
And later on you write
... sauder_ent.src = "popUp.dtml?popper=sauder_ent" sauder_ent1.src = "popUp.dtml?popper=sauder_ent1" sauder_ent2.src = "popUp.dtml?popper=sauder_ent2" ....
But sauder_ent1 doesn't exist, and all the definitions after sauder_ent1.src seem to fail because of that, so I guess this is the failure,
Bingo! Good detective work! Thanks!! beno
b> Now: This code WORKS JUST FINE throughout the ENTIRE site EXCEPT on one b> certain page where it only works in the *entertainment* section. The rest b> of the time it throws this error: It would be nice if you told us on *which* cerain page ;) b> Cannot locate object at: b> http://web.vi/best_furniture/1024/s/c/x/en-us/undefined b> Why??? Here's a URL to it: b> http://web.vi/best_furniture/1024/s/c/x/en-us/Living_Room_frame.pt well.. to me http://web.vi/best_furniture/1024/s/c/x/en-us/undefined is a different link from http://web.vi/best_furniture/1024/s/c/x/en-us/Living_Room_frame.pt , so i wouldnt jump to blame a zope goblin... "undefined" is a common javascipt way of printing an undefined object, so i suggest you first look in the direction of the javascript.. seems to me like at least some of your javascipt errors come from a nested-frameset targeting error in the living-room-section-link at: http://web.vi/best_furniture/best_furniture/1280/s/c/x/en-us/Furniture.pt try adding a target="_top" or something to it and see if it helps... it currently puts your entire frameset inside itself.. :) -- Geir Bækholt
participants (3)
-
beno -
Geir Bækholt -
Oliver Bleutgen