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

LVL 2
tim_ferrisAsked:
Who is Participating?
 
hongjunCommented:
tim_ferris, use my iframe coding. I repeat again.

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


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

hongjun
0
 
DirkVeCommented:
If the above doesn't work, this means your session variable is empty or not a valid url
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
tim_ferrisAuthor Commented:
No, it doesn't do anything. It just loads a blank iframe
0
 
hongjunCommented:
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
0
 
tim_ferrisAuthor Commented:
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
0
 
tim_ferrisAuthor Commented:
Hongjun

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

It works.....good skills

Thanks

Tim
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.