Link to home
Start Free TrialLog in
Avatar of tim_ferris
tim_ferris

asked on

Iframe and SRC

Hi

I have an iframe on a main page which will load a different page depending on who logged on. Which is where I assign the below session variable

<Iframe src="<% Session("subform") %>" .......</iframe>

But it doesn't seem to pick it up

Thanks

Avatar of hongjun
hongjun
Flag of Singapore image

Try this
<Iframe src='<%=Session("subform")%>' .......</iframe>

hongjun
Avatar of DirkVe
DirkVe

If the above doesn't work, this means your session variable is empty or not a valid url
Avatar of tim_ferris

ASKER

No, it doesn't do anything. It just loads a blank iframe
Try doing this to see its value. Rest assured that the my iframe coding is correct. The only problem now is the Session("subform") may be empty.


<%
Response.Write Session("subform")
%>

hongjun
Even if I set my session variable on the page that loads....

Session("subform") = "subentertainment.asp"

<html>
<iframe src="<% Session("subform")%>" <iframe>
</html>

If i write the variable to the page it comes up, so its not empty
ASKER CERTIFIED SOLUTION
Avatar of hongjun
hongjun
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hongjun

Sorry I had actually written my code up before, you added your comment.

It works.....good skills

Thanks

Tim