Forum Moderators: open

Message Too Old, No Replies

iframes problem

session variables dont seem to work in IE

         

Scally_Ally

2:15 pm on Aug 15, 2005 (gmt 0)

10+ Year Member



Hi All,
I have just been searching the forum for a post on a problem with iframes and IE. Found one but cant post a reply so here goes.
I have a page that displays another page within an iframe.
The page that is being displayed is the login page that takes the users details and queeries it against my password database using asp.

The problem arises when you submit your user name and password, the page is just sent back as if the name and password are not in the database, even though they are.
I have tried it in fire fox and it works perfectly, same with safari but not on IE.

Before this was put in an iframe this worked perfectly on all browsers.

I am using session variables to store the users administration state if that makes any difference?
(i have also set the option in ie to display iframes).

Any help on this would be greatly appreciated as i am tearing my hair out.
Thanks
Ally

encyclo

2:57 pm on Aug 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It could be a problem with the default IE security setting, which can sometimes cause problems with framed pages. Are the two pages on the same server?

In IE, go to Tools > Internet Options, and under the Security tab, set the level (temporarily!) for the internet zone to "low" (this is assuming you are testing a live page on a remote server). Does the page work then?

Scally_Ally

7:55 am on Aug 16, 2005 (gmt 0)

10+ Year Member



The page that holds the iframe is on one server and the page that is being displayed is on another server.

The only reason i have done this is because i did not have much space left on the first server (and the providers where rubbish) and i wanted to have a large download section. The problem arose with the address bar as I did not want my client to see the long adress of the new server and for it not to coincide with their original one.

I have turning the security level down but that does not seem to work and i am testing this on a live server.

The new server is a dedicated server so i have access to do pretty much whatever. Originally i thought that there was some php or asp code that could do it but alas no.

Thanks again.

Ally

Iguana

8:12 am on Aug 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How are you sending the entered username and password? as post variables? Obviously you're not using Session variables because they are specific to each server.

Scally_Ally

8:39 am on Aug 16, 2005 (gmt 0)

10+ Year Member



i have a default.asp page where the user inputs their user_name and password..

this is then sent to password_check.asp where the DB is queeried and a session variable is set to say if the user is allowed in, if not then make them login.

I know it should work as it works within firefox and safari on both the mac and the PC, just not in IE on the PC which, lets face it, means that it doesnt work full stop.

the page that the iframe is on is not sending any session vaiables, all from the new server.

Ally

Iguana

10:00 am on Aug 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How are user_name and password sent to the page in the iFrame?

If it's in Javascript then Firefox and IE use different syntax to get at the document within an iFrame (plus different versions of IE need different synatx!).

Scally_Ally

11:40 am on Aug 16, 2005 (gmt 0)

10+ Year Member



was a bit wierd.. I changed cookie security to low in the options of IE and it worked perfectly!?

Oh well, I always thought that session variables where stored on the server and not on the clients machine.

Is this something to do with the IFrame setup and the fact that the two pages where on different servers? I will remember this one for the future.

Thanks for all your help guys

Ally