Hello i need some help to figure out what to do .
您好我需要一些帮助来弄清楚该做什么。
I am trying to create a page that has a list of events and each time I click one of the list's elements a different photo gallery should load. I did this by loading each gallery in a different iframe.
我正在尝试创建一个包含事件列表的页面,每次单击其中一个列表的元素时,应加载不同的照片库。我通过在不同的iframe中加载每个图库来完成此操作。
The problem is that right now the only thing it dose is loading the first galery and the other ones don't seem to manage loading any pictures (if I refresh each frame than they work fine)
问题是,现在唯一的事情是加载第一个galery而其他的似乎没有管理加载任何图片(如果我刷新每个帧比他们工作正常)
What should i do?
我该怎么办?
This is the script I used in the webpage
这是我在网页中使用的脚本
You can find the page source here http://www.avantsolutions.ro/exp.txt
您可以在http://www.avantsolutions.ro/exp.txt找到页面源代码
2 个解决方案
#1
0
You can try with jQuery UI Plugin instead of iFrame. On clicking of list item(West pane), you can load center pane div with corresponding images. Check the examples here.
您可以尝试使用jQuery UI插件而不是iFrame。单击列表项(西窗格)时,可以加载具有相应图像的中心窗格div。在这里查看示例。
#2
0
You can use jQuery's load
function to load a gallery via ajax.
您可以使用jQuery的加载函数通过ajax加载库。
$(selectorForYourGalleryDisplayDiv).load( url, [ data ], [ complete(responseText, textStatus, XMLHttpRequest) ] )
$(selectorForYourGalleryDisplayDiv).load(url,[data],[complete(responseText,textStatus,XMLHttpRequest)])
Load will take the result from url
, if you need to pass it data
it will use a HTTP POST, and replace the inner html of the wrapped set it is called on.
Load将从url获取结果,如果你需要传递数据,它将使用HTTP POST,并替换它被调用的包装集的内部html。
I don't know the internals of your architecture, but the main process is giving your galleries Ids, pass them to the server using the JSON format, your code will use that id to get what's needed for the gallery, render the html and return it.
我不知道你的架构的内部,但主要的过程是给你的画廊ID,使用JSON格式将它们传递给服务器,你的代码将使用该id来获取库所需的内容,渲染html并返回它。
load
will drop that html into the elements that match selectorForYourGalleryDisplayDiv
.
load会将html放入与selectorForYourGalleryDisplayDiv匹配的元素中。
#1
0
You can try with jQuery UI Plugin instead of iFrame. On clicking of list item(West pane), you can load center pane div with corresponding images. Check the examples here.
您可以尝试使用jQuery UI插件而不是iFrame。单击列表项(西窗格)时,可以加载具有相应图像的中心窗格div。在这里查看示例。
#2
0
You can use jQuery's load
function to load a gallery via ajax.
您可以使用jQuery的加载函数通过ajax加载库。
$(selectorForYourGalleryDisplayDiv).load( url, [ data ], [ complete(responseText, textStatus, XMLHttpRequest) ] )
$(selectorForYourGalleryDisplayDiv).load(url,[data],[complete(responseText,textStatus,XMLHttpRequest)])
Load will take the result from url
, if you need to pass it data
it will use a HTTP POST, and replace the inner html of the wrapped set it is called on.
Load将从url获取结果,如果你需要传递数据,它将使用HTTP POST,并替换它被调用的包装集的内部html。
I don't know the internals of your architecture, but the main process is giving your galleries Ids, pass them to the server using the JSON format, your code will use that id to get what's needed for the gallery, render the html and return it.
我不知道你的架构的内部,但主要的过程是给你的画廊ID,使用JSON格式将它们传递给服务器,你的代码将使用该id来获取库所需的内容,渲染html并返回它。
load
will drop that html into the elements that match selectorForYourGalleryDisplayDiv
.
load会将html放入与selectorForYourGalleryDisplayDiv匹配的元素中。