PDA

View Full Version : Using FrogJS Image Gallery with DHTML Window Widget v1.1



akshaye
12-20-2008, 01:01 AM
1) Script Title: FrogJS Image Gallery

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/frogjs/index.htm

3) Describe problem:

I created a link on my webpage using DHTML Window Widget v1.1 (http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm) that launches a DHTML window. In that window I call a page containing FrogJS Image Gallery (http://www.dynamicdrive.com/dynamicindex4/frogjs/index.htm
).
However, the gallery doesn't work as it should. All I get is one thumbnail and one picture. Clicking these just gives me the source jpg images.
If I call the page with the FrogJS gallery directly through the browser it works fine.
Is there a way to make this work?
Thanks!

jscheuer1
12-20-2008, 02:18 PM
I'm imagining that you are using the AJAX method of widget. But Frog isn't AJAX friendly. If that's the problem, use the iframe method of widget, it should work out as long as there's room for Frog in the widget window.

akshaye
12-21-2008, 04:12 AM
Thanks! That works now. But I do have one more problem.
The iframe loads automatically when i go to that webpage. I don't want it to load automatically. What I want to be able to do is load the iframe only when the user selects a particular website to open as shown below (cssdrive or yahoo).
How can I do this?
Thanks!



<script type="text/javascript">

var googlewin=dhtmlwindow.open("googlebox", "iframe", "http://images.google.com/", "#1: Google Web site", "width=800px,height=350px,resize=1,scrolling=1,center=1", "recal")

googlewin.onclose=function(){ //Run custom code when window is being closed (return false to cancel action):
return window.confirm("Close window 1?")
}

</script>

a href="#" onClick="googlewin.load('iframe', 'http://www.cssdrive.com', 'CSS Drive'); return false">CSS Drive</a>

a href="#" onClick="googlewin.load('iframe', 'http://www.yahoo.com', 'CSS Drive'); return false">Yahoo</a>

jscheuer1
12-21-2008, 12:17 PM
If you don't want the widget to open on page load, don't do this:


<script type="text/javascript">

var googlewin=dhtmlwindow.open("googlebox", "iframe", "http://images.google.com/", "#1: Google Web site", "width=800px,height=350px,resize=1,scrolling=1,center=1", "recal")

googlewin.onclose=function(){ //Run custom code when window is being closed (return false to cancel action):
return window.confirm("Close window 1?")
}

</script>

You may instead do:


<a href="#"
onclick="googlewin=dhtmlwindow.open('googlebox', 'iframe', 'http://images.google.com/', '#1: Google Web site', 'width=800px,height=350px,resize=1,scrolling=1,center=1');return false;"
>Create/Open Google Window</a>