PDA

View Full Version : DHTML Window Widget~multiple links Ajax content



kbz
06-03-2007, 12:35 AM
1) Script Title: DHTML Window Widget

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/

3) Describe problem:

Im far from knowing much about "ajax" fundamentally, and Im having an issue which probably has a very simple answer that Im just not seeing...thanks for any input upfront btw!
OK...here is a test page link...
http://www.airbrushdiecast.com/sinistir5/appl/indexWIPajax.html
The problem is that I am seeing a difference in functions after page is loaded online, as opposed to how it works offline in IE 6 AND FF 1.5 browsers.
OFFLINE...works fine
ONLINE....not so good!
Ive got four total links to open windows...and change the content accordingly. These links are on the small Tee images and should open the window when clicked, plus change the content if window is already open. Alternately, Ive got links in the external pages to change the content from within the open window as well.
OFFLINE...all works great including the links within the external pages.
ONLINE....only the WHITE Tee links work correctly. If a black tee link is clicked, the window opens with blank content, however, if a WHITE tee link is clicked with or without a window already opened, the appropriate content loads and inner links work too.
I need to have multiple calls (or something similar) to change the window content for each design/item. And this needs to be somewhat easy to expand with future items. I believe the ajax method can accomplish this better overall than the Iframe and certainly with less coding on the main page as would be needed with DIV or Inline.
Ive included a screenshot of the file structure, just incase Ive got something astray, but, believe it should all work as is whether on or off line.
THANKS!!!!

mburt
06-03-2007, 06:59 PM
I noticed that the white-t's actually do work, but the black don't. Make sure the source images for the window are correct.

kbz
06-03-2007, 10:32 PM
Yes, thats correct...and thats what is confusing me...lol
The source images are fine..plus, even if the image wasnt uploaded, the window should still display the text and links contained in the external page, shouldnt it? As it looks to me...the black tees result in a totally blank window, devoid of any content at all.
And as mentioned, these same pages all work fine when tested offline...its only when they are uploaded that the problem presents itself and then as you noticed, the white ones work great, black ones result in the blank window.

Here is the source code for two of the external pages...one for black, one for white.
First black tee external page :

<div> <img src="mensStyles/men_black_Tee_01full.gif" width="381" height="399" style="float: left; margin: 0 10px 10px 0" />Sinistir
logo on Black Tee! <br />
This is the FRONT design, Click on the links below for more about this
item.
<ul>
<li><a href="#" onClick="ajaxwin.load('ajax', 'windowfiles/blkTee01_back.htm', 'SINISTIR Black Tee~#01~BACK'); return false">See
BACK design</a></li>
<li><a href="#">Place Order</a></li>
<li><a href="#" onClick="ajaxwin.hide(); return false">Close Window</a></li>
</ul>
</div>

First White tee external page :

<div> <img src="mensStyles/men_white_Tee_01full.gif" width="386" height="405" style="float: left; margin: 0 10px 10px 0" />Sinistir
logo on White Tee! <br />
<u>This is the <strong>FRONT</strong> design,</u> Click on the links below for
more about this item.
<ul>
<li><a href="#" onClick="ajaxwin.load('ajax', 'windowfiles/whtTee01_back.htm', 'SINISTIR White Tee~#W-01~BACK'); return false">See
BACK design</a></li>
<li><a href="#">Place Order</a></li>
<li><a href="#" onClick="ajaxwin.hide(); return false">Close Window</a></li>
</ul>
</div>

thetestingsite
06-03-2007, 10:40 PM
Case sensative. In your source code, you point to the black T like so:



ajaxwin=dhtmlwindow.open("ajaxbox", "ajax", "windowfiles/blktee01_back.htm", "SINISTIR Black Tee~#01~BACK", "width=550px,height=400px,resize=1,scrolling=1,center=1")


When it should be like so:



ajaxwin=dhtmlwindow.open("ajaxbox", "ajax", "windowfiles/blkTee01_back.htm", "SINISTIR Black Tee~#01~BACK", "width=550px,height=400px,resize=1,scrolling=1,center=1")


Change this and it will work.
Hope this helps.

kbz
06-04-2007, 01:27 AM
THANK YOU THANK YOU THANK YOU!!!!!!! :) :o

I knew it had to be "something" simple that I had overlooked!!!
(insert Homer Simpson "DOH" ..here)

I must say that Im now wondering why that typo didnt similarly affect the performance while viewed "offline" as well tho? :confused:

No matter.....it works now like a charm!!!
THANKS AGAIN for the help!!! You guys ROCK!!!!

kbz
06-04-2007, 01:43 AM
BTW....I thought that maybe for help to others who may see a similar condition in the future, that I would leave the original file (from my initial post above) AS IS, without the correction to the source code. And the CORRECTED file I have uploaded to the following link, so that the difference can be "experienced" in the future.
http://www.airbrushdiecast.com/sinistir5/appl/index_ajaxCORRECTED.html

THANKS AGAIN!!!!!!