473,372 Members | 863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

Iframe Src change on form loading

I'm trying to create a dynamic link to different sources when a page loads
(I want a set of buttons at the top before the IFrame) but the content of
the IFrame will be dynamic but know when the page is loaded.

How can I either generate the HTML on the fly as the form is loading or set
the Src value of the IFrame tag as the page is loading?

Thanks

Ric
May 30 '06 #1
3 2410
Page:
<form id="Form1" method="post" runat="server">
<iframe id="frm" runat="server"></iframe>
</form>

Codebehind:

protected HtmlGenericControl frm;
private void Page_Load(object sender, System.EventArgs e)
{
frm.Attributes["src"]="http://www.yahoo.com";
}

--Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Namshub" wrote:
I'm trying to create a dynamic link to different sources when a page loads
(I want a set of buttons at the top before the IFrame) but the content of
the IFrame will be dynamic but know when the page is loaded.

How can I either generate the HTML on the fly as the form is loading or set
the Src value of the IFrame tag as the page is loading?

Thanks

Ric

May 30 '06 #2
http://www.hellobasic.com/download/d...einnerhtml.txt

"Namshub" <Ri*************@Southend.nhs.uk.RemoveMyspam> schreef in bericht
news:e0**************@TK2MSFTNGP04.phx.gbl...
I'm trying to create a dynamic link to different sources when a page loads
(I want a set of buttons at the top before the IFrame) but the content of
the IFrame will be dynamic but know when the page is loaded.

How can I either generate the HTML on the fly as the form is loading or
set the Src value of the IFrame tag as the page is loading?

Thanks

Ric

May 30 '06 #3
Ok, side-effect it that you'll need a round-trip.
handy to know this asp.net trick as well.
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> schreef in bericht
news:C6**********************************@microsof t.com...
Page:
<form id="Form1" method="post" runat="server">
<iframe id="frm" runat="server"></iframe>
</form>

Codebehind:

protected HtmlGenericControl frm;
private void Page_Load(object sender, System.EventArgs e)
{
frm.Attributes["src"]="http://www.yahoo.com";
}

--Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Namshub" wrote:
I'm trying to create a dynamic link to different sources when a page
loads
(I want a set of buttons at the top before the IFrame) but the content of
the IFrame will be dynamic but know when the page is loaded.

How can I either generate the HTML on the fly as the form is loading or
set
the Src value of the IFrame tag as the page is loading?

Thanks

Ric

May 30 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: HolaGoogle | last post by:
Hi, Sorrryy to ask such basic question but i do need your help! Here's what i'm trying to do: In my parent form i'm calling a my Iframe form to get certain value, then depending on that value...
5
by: Jim Marquardson | last post by:
Hi, I've struggled with this for a while now, so I'm asking for help. I am trying to click on a link in one page, have that link open up in a new window, and set that newly opened window's...
6
by: ok | last post by:
<img src="http://www.6park.com/enter2/av.gif" onload="document.write('an iframe obj');"> First of all, it destroy the HTML page. Secondly even if it does not destroy it, the iframe object will...
6
by: fniyogi | last post by:
Does anyone know how to suppress the "busy"/hourglass cursor that appears when a frame/iframe is loading, as in the g() functon below: <SCRIPT> function g() { if ( Math.floor(Math.random()*2)...
3
by: PCgeek | last post by:
sorry moved this over to javascript forum, didn't mean to post 2x! Hi guys, I'm trying to put the finishing touches on my website and could really use some help on this particular issue. My page...
3
by: synergy_711 | last post by:
I feel like this should be fairly easy but I have been struggling with this for sometime. I have not been able to find someone who's had the same problem as mine yet. ...
0
by: tequilamala | last post by:
I have an Iframe in one of the pages i am developing... the iframe is suppose to scroll up and down and the links target the iframe. the problem is that the iframe scrolls side to side on internet...
3
by: whatever0 | last post by:
Hi, I'm fairly new to javascript and was hoping i could have a little help... I have a page containing a form and an iframe. The iframe is initially empty (src="about:blank"). The target of...
1
by: epower | last post by:
Hello, I am working on an ASP .NET application in Visual Studio 2005 and running IE7. This application has a page that contains an iframe which loads an .aspx page and hyperlinks that...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.