Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 639
  • Last Modified:

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

0
tim_ferris
Asked:
tim_ferris
  • 3
  • 3
1 Solution
 
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
 
tim_ferrisAuthor Commented:
No, it doesn't do anything. It just loads a blank iframe
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
hongjunCommented:
tim_ferris, use my iframe coding. I repeat again.

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


hongjun
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now