I have an iframe that displays thumbnail images from Flickr in my web application. The problem, I see is when I reload the page, sometimes, I see the same set of images being appended to the earlier set of images. So I get two sets of every image and on a subsequent reload, I get 3 sets of images.
The images are part of a form. So I see multiple submit and cancel buttons as well. Any suggestions on what might be causing this and how I can avoid this from happening?
Pardon my ignorance. I was not resetting my server side variable after the fetch and hence I was seeing the above weirdness. Firebug helped me debug this.
Related
So I've recently been converting an old project to Angularjs, but there's a bigger section that I can't convert right now, but still need to work inside Angular.
To solve this I used an Iframe. The problem now is when I switch to a different page, the view and by association the iFrame is getting destroyed. This means when I switch back it will reload the iFrame and will lose the user's spot and any data they didn't save on the form. Usually I solve this by storing everything inside a service, but it won't work for this since its an iFrame.
Is there anyway to create the iFrame outside of the context of the template so when I switch back to the page I can call the iFrame to display, rather than reloading it, then I can manually destroy it when I want?
Or is there a better way to go about doing this?
Thanks!
for anyone interested, what I ended up doing is putting the iFrame in a parent template inside an ng-if. When I go to the route I want the iframe in, I set the ng-if to true and leave it as true when I'm selecting different tabs and want it to persist, when I want it to switch or not persist I set the ng-if back to false and everything seems to be working as expected.
So I have a website featuring a stock management system, this contains a table that displays various stock and inventory information.
When an "images" link is clicked, the Session variable for images is switched between "show" and "hide" and the page is then reloaded with the updated variable and either showing or hidden images for each product.
This works perfectly in Chrome, Firefox and Opera (all tested thoroughly) but does not work at all in IE8.
Normally I would blame my code but clearly this is a pure browser compatibility issue which is really throwing me as i didn't realise ASP and VBScript really needed to be altered to work on different browsers.
I have attached the code that toggles the session variable below anyway but I doubt it is linked to the issue.
images = Request.QueryString("images")
If images <> "" Then
If images = "show" Then
Session("images") = "Show"
ElseIf images = "hide" Then
Session("images") = "Hide"
End If
End If
An example of the problem goes as follows:
I display some items and click "hide images", the images then hide..
I then reload the page and the images are showing again and the Session variable has changed back to "show" despite there being NOWHERE in the code that specifies to return back to the previous value (checked with Ctrl + F for keyword "images")
Has anyone else encountered a similar problem where Session variables act in unusual ways specifically in IE, or can suggest a solution?
Thanks, Josh
Many thanks, Josh - here you go.
You can use the Server.URLEncode() (classicasp.aspfaq.com/general/…) method to counter this problem.
The server side code of Classic ASP is browser independent. What's more likely to be a problem is the way you make the section show or hide.
Check your code and pay special attention to the method you've used to actually do the showing and hiding. Check out the styles for the block that contains your product using the developer tools in IE8.
After further research I have found why my page is not working correctly via a Microsoft support page.
http://support.microsoft.com/kb/316112
The fact that my page URL had an underscore in it caused Session variables and Cookies to not be saved.
Hope this helps others in the future
Josh
Are you trying to retrieve/show session values within same page that you are assigning session values? I'm asking just to be sure because it takes one round trip to the server to save those session values.
I have been googling this for a while and can't find any solution... I am wondering if it is possible to keep a navigation menu in the browser cache eventhough there is an active element that changes from on page to the other (highlighted menu item when on it's page). I m pretty sure browser cache menus to avoid the user to always download the same menu but it doesn4t seem to work on the website I am working on : http://2degreesproject.com.au/Connection
Thanks for you help !
You could consider loading all your other content with ajax. That way you never have to reload the menu. Otherwise, you'll need to pass a bit of information from one page to the next using your server side language or an ajax post. You could always set a cookie and change the value of it on each page to keep track of what the last page was. That's probably the standard way of doing this. Look into how to set cookies, and how to change their values (usually you just unset and reset with a different value, I believe).
I've run into this problem twice in all the site's I've designed and I can't figure out how to fix it. (The flash compiler has not given me any errors for this.)
Here is the link first of all
http://rollingsquare.com/AKJ/akj.html
Once you're in the site click on portfolio and then click on "the excelsior" what happens is that for the first 4-5 clicks it won't do what it's supposed to do and it'll start randomly either stopping at a frame or playing a from a frame. Once it's done it's randomness it all works perfect again, but those initial clicks do not take you anywhere.
This is an externally loaded SWF and I've loaded it with 2 different techniques hoping it was that but that didn't fix it.
I've tried simply placing a UiLoader and linking it and what it is now, a var myLoader.
Anyone run into something like this before?
You should try to be more specific in asking programming questions. I almost took it as a spam link.
Anyway's if I am getting you correct, the initial thumbnail clicks don't load the image.You should probably use individual loader for each of those large images.
i have written classes in as3... my swf works fine locally but at live link, images do not load or shown first time but when you refresh the browser again they are loaded and shown.. i know they comes in cache but what is happening first time..
you can clear your browser cache and check the problem happens each time when it is not in cache...
all images are less than 1 mb..
here is the link
http://web.s4spk.com/irfan/loadtest1/project.html
Without seeing your code, it's difficult to know what the problem is.
It is likely that you have a race condition where the code you use to display the images is executing before the images have finished loaded. Once the images are in cache, they obviously load a lot quicker.
If you are using a Loader to load the images in, make sure you are handling the Complete event of the loader and taking appropriate actions there to ready the images for display.