Hi, I have been using lytebox for a while now, but noticed that it has some issues with IE8. When I went to see if he had any updates he said it was dead and recomended you. So far I am very impressed. I really like the improvements available over lytebox. However I am having one issue.
When I click on the image floatbox seems to work prefectly. The problem is that when the click happens a request is sent back to my server. Becuase of this request variables are reset so my server state acts as if a new page has been requested.
Is there a way to stop this request being sent when a click happens. Below are the steps to reproduce. I will email you my site if you need to take a look.
1. Browse to the site.
2. Close the first image.
3. Select a differnt date (April 3rd).
4. View and image.
5. Close an image.
6. Click the next button bellow the images.
here you will notice it swithes days. This is because my state was lost from the request sent by the onclick event.
Thanks for the help.
PS. I don't know if this helps but the request happens as soon as the floatbox is finished animating.
Request sent to server during onclick event
Page: 1
Author | Post |
---|---|
shantz1
|
#1 Thu Apr 09, 2009 7:00 am
|
Guest | |
#2 Thu Apr 09, 2009 3:17 pm
|
|
Administrator
Registered: Aug 2008
Posts: 3382
|
You can't turn off a browser sending a get request for images it is displaying. (You can't display an image without getting it.) Your state management strategy is going to have to handle the fact that those gets will occur. (Maybe keep the currently selected date in a session var???)
|
shantz1
|
#3 Thu Apr 09, 2009 4:09 pm
|
Guest |
Sorry I wasn't very clear. I realize a request must be sent for the image. The issue is that a request is being sent for Default.aspx. This request is what is messing with my state.
I don't know if it helps but this site has been working correctly with lytebox for almost a year. If you would like to see an example of that try. www dot amyandtodd dot net Thanks for the help. |
#4 Thu Apr 09, 2009 4:25 pm
|
|
Administrator
Registered: Aug 2008
Posts: 3382
|
Your site is currently using lytebox, not floatbox, so there's no much I can do by looking at it.
But there's nothing in floatbox which would cause a re-get of the host page when displaying an image. I wonder though about the target attributes on your anchors. For example, target="SaveFileAs.aspx?Image=Photos\_0_2008\_12_December\date-2008-12-17\12-17-2008%2006-48-06%20PM.JPG" I'm not familiar with any syntax or use for the target attribute that would look like yours, but maybe that is causing the document fetch??? |
sirgwain
|
#5 Thu Apr 09, 2009 5:56 pm
|
Guest |
Hi,
I am seeing the same behavior when transitioning from lytebox to floatbox. I am running my webserver in python using cherrypy. When I click on an image in a group it shows me the image, then sends a request back to the app. This isn't a static image request to fetch the image. Here is the log of the request:
The anchor causing this is formatted like so:
I've put in some debugging and the onclick event appears to be returning false: It's definitely getting to this return false below: (line 381: floatbox.js)
|
shantz1
|
#6 Thu Apr 09, 2009 6:15 pm
|
Guest |
I sent you an email last night with my live site in it that is using floatbox. The site in the last post was just to demonstrate that lytebox was working correctly. The target attribute is something I added to lytebox. I added a save button that linked to the full size image to be saved for printing. I have removed that attribute from my floatbox site because I was worried it might be causing the problem.
If I can get float box working I was planning on adding the save feature. I can pass it back to you at the time if you like. |
#7 Thu Apr 09, 2009 6:17 pm
|
|
Administrator
Registered: Aug 2008
Posts: 3382
|
I'm seeing a similar unexpected get request on my test site. So far I'm completely baffled about where it might be coming from, but stay tuned. I'll slice and dice until I sort it out.
|
#8 Thu Apr 09, 2009 6:32 pm
|
|
Administrator
Registered: Aug 2008
Posts: 3382
|
Found it. It's a real bone-head coding mistake on my part.
In floatbox.js, (line 2005?) find: that.fbZoomImg.src = ''; Delete (or rem out) that line. (framebox.js too if you use that.) Thanks for your persistence in reporting this and help in finding it. |
sirgwain
|
#9 Thu Apr 09, 2009 6:49 pm
|
Guest |
Great! That worked for me. Thanks for looking into it so quickly. Floatbox is very deluxe. The sheer amount of flexibility and cool features is amazing.
btw, 'rem out'? I haven't heard that term since writing DOS batch files. |
Page: 1