Solved

Iframe and SRC

Posted on 2001-08-02
7
633 Views
Last Modified: 2010-05-18
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
Comment
Question by:tim_ferris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 33

Expert Comment

by:hongjun
ID: 6344029
Try this
<Iframe src='<%=Session("subform")%>' .......</iframe>

hongjun
0
 
LVL 2

Expert Comment

by:DirkVe
ID: 6344045
If the above doesn't work, this means your session variable is empty or not a valid url
0
 
LVL 2

Author Comment

by:tim_ferris
ID: 6344049
No, it doesn't do anything. It just loads a blank iframe
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 33

Expert Comment

by:hongjun
ID: 6344058
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
 
LVL 2

Author Comment

by:tim_ferris
ID: 6344064
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
 
LVL 33

Accepted Solution

by:
hongjun earned 50 total points
ID: 6344074
tim_ferris, use my iframe coding. I repeat again.

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


hongjun
0
 
LVL 2

Author Comment

by:tim_ferris
ID: 6344094
Hongjun

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

It works.....good skills

Thanks

Tim
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Writing comments on <p></P> or paragraph 2 23
My Do While is Not Producing Anything 15 81
Validating Date 4 38
Replace value 2 53
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question