03-03-2009, 09:33 PM | #1 |
Nade Whore
Server Owner
Beta Tester Join Date: Sep 2007
Location: Oklahoma
Class/Position: Scout/Soldier Gametype: CTF/TDM Affiliations: blunt. Moto Posts Rated Helpful 128 Times
|
Show title within an iframe? - HTML
I've been using html for many years now, and just came upon an issue where we need certain pages within iframes to have titles, but when I've got the page open within the iframe, it only shows the title for the actual iframe container.
Is there a way to bypass the title for the iframe so I can use the one on the page within the iframe? |
|
03-03-2009, 10:51 PM | #2 |
Retired FF Staff
Join Date: Jul 2007
Class/Position: D Eng Gametype: Griefing/Spawn Camping Posts Rated Helpful 5 Times
|
Code:
<SCRIPT LANGUAGE="JAVASCRIPT"> <!-- function UpdateTitle() { document.title = "penis"; } </SCRIPT> Code:
<HTML> <HEAD><TITLE>Penis here</TITLE></HEAD> <BODY> <FORM action="" method=POST name="SampleForm"> <B>Enter Title for the window:</B> <TEXTAREA NAME=WindowTitle ROWS=1 COLS=50></TEXTAREA> <INPUT TYPE=BUTTON VALUE="Change Title" ONCLICK="javascript:UpdateTitle()"> </FORM> <SCRIPT LANGUAGE="JAVASCRIPT"> <!-- function UpdateTitle() { document.title = document.SampleForm.WindowTitle.value; } </SCRIPT> </BODY> </HTML> |
|
03-04-2009, 01:53 AM | #3 |
Nade Whore
Server Owner
Beta Tester Join Date: Sep 2007
Location: Oklahoma
Class/Position: Scout/Soldier Gametype: CTF/TDM Affiliations: blunt. Moto Posts Rated Helpful 128 Times
|
im glad i skipped javascript in school...
|
|
03-04-2009, 07:48 AM | #4 |
if(0>1){printf("broked");}
Beta Tester
Join Date: Mar 2007
Location: Amerika
Class/Position: O Posts Rated Helpful 3 Times
|
iframes. Please no
|
|
03-04-2009, 03:50 PM | #5 |
Nade Whore
Server Owner
Beta Tester Join Date: Sep 2007
Location: Oklahoma
Class/Position: Scout/Soldier Gametype: CTF/TDM Affiliations: blunt. Moto Posts Rated Helpful 128 Times
|
What else do you suggest? I mean, at least I don't use tables...
|
|
03-04-2009, 04:48 PM | #6 |
Retired FF Staff
Join Date: Jul 2007
Class/Position: D Eng Gametype: Griefing/Spawn Camping Posts Rated Helpful 5 Times
|
php + ajax .. or just php and use a simple content include engine
what are you trying to do |
|
03-04-2009, 05:05 PM | #7 |
Nade Whore
Server Owner
Beta Tester Join Date: Sep 2007
Location: Oklahoma
Class/Position: Scout/Soldier Gametype: CTF/TDM Affiliations: blunt. Moto Posts Rated Helpful 128 Times
|
I was replying to Pixel's post about iframes. The js pretty much took care of my initial problem.
|
|
03-05-2009, 03:03 PM | #8 |
Wiki Standards Team
Wiki Team
Join Date: Mar 2007
Location: Geokill's closet
Class/Position: Sniper/Demoman Gametype: CTF Affiliations: :e0: Co-leader Posts Rated Helpful 6 Times
|
Yeah if you don't want to use iframes you should use AJAX to pull in the page, find its title tag, and stick into a div or something. It's an iframe but not.
But which is simpler? iframes are simpler. I'm generally a fan of simple. There's no need to go busting out AJAX and DOM parsing if you don't need to. It all depends on the needs of the situation. |
|
03-05-2009, 04:42 PM | #9 |
Nade Whore
Server Owner
Beta Tester Join Date: Sep 2007
Location: Oklahoma
Class/Position: Scout/Soldier Gametype: CTF/TDM Affiliations: blunt. Moto Posts Rated Helpful 128 Times
|
Yeah plus I don't know AJAX, so unless I find I need it for something, I'm sticking with the basic languages.
|
|
03-05-2009, 05:15 PM | #10 |
Wiki Standards Team
Wiki Team
Join Date: Mar 2007
Location: Geokill's closet
Class/Position: Sniper/Demoman Gametype: CTF Affiliations: :e0: Co-leader Posts Rated Helpful 6 Times
|
AJAX is a technique; not a language.
http://www.w3schools.com/Ajax/ajax_source.asp That's a full code example. AJAX is quite simple actually... but sometimes it's hard to wrap your head around. Many people also usually use libraries to perform AJAX requests. |
|
03-05-2009, 09:11 PM | #11 |
Retired FF Staff
Join Date: Jul 2007
Class/Position: D Eng Gametype: Griefing/Spawn Camping Posts Rated Helpful 5 Times
|
many people are idiots.
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|