corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » IFrame experts needed !


New Topic

New Poll
  <<  1    2  >> Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author IFrame experts needed !
Joff
Member

Registered: 17th Oct 00
Location: Cambridgeshire
User status: Offline
31st Jan 04 at 12:45   View User's Profile U2U Member Reply With Quote

menu.html
code:

<html>
<head>
<title>menu.html</title>
</head>
<body>
<a href="cherry.html" target="leisurepage" onClick="window.open('holder.html','holder','');">Cherry</a>
<a href="Banana.html" target="leisurepage" onClick="window.open('holder.html','holder','');">Banana</a>
<a href="orange.html" target="leisurepage" onClick="window.open('holder.html','holder','');">orange</a>
</body>
</html>




holder.html
code:

<html>
<head>
<title>holder.html</title>
</head>
<body>


<iframe name="leisurepage" id="leisurepage" marginwidth="0" marginheight="0"
src=""></iframe>
</body>
</html>

Mikeboy
Member

Registered: 12th Jun 02
Location: Wiltshire             Drives: SXi DTi
User status: Offline
31st Jan 04 at 12:46   View User's Profile U2U Member Reply With Quote

Well its my uni project. It is a disk to promote the local council's leisure facilities.

I want say page1.html , with menu.html as the source of the iframe. The menu will list a load of leisure facilities. I want each one to open in the same 'holder', but in the same window

Hope that makes sense !
Mikeboy
Member

Registered: 12th Jun 02
Location: Wiltshire             Drives: SXi DTi
User status: Offline
31st Jan 04 at 12:47   View User's Profile U2U Member Reply With Quote

That looks promising Joff, trying it now.

Thanks
groom
Member

Registered: 19th Apr 03
Location: In front of my pc
User status: Offline
31st Jan 04 at 12:47   View User's Profile U2U Member Reply With Quote

oooh well the first svript joff made did the job ok to me
Joff
Member

Registered: 17th Oct 00
Location: Cambridgeshire
User status: Offline
31st Jan 04 at 12:48   View User's Profile U2U Member Reply With Quote

I agree with groom - the first example would be a lot cleaner to navigate rather than have x number of popup windows with content.
Mikeboy
Member

Registered: 12th Jun 02
Location: Wiltshire             Drives: SXi DTi
User status: Offline
31st Jan 04 at 12:52   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Joff
menu.html
code:

<html>
<head>
<title>menu.html</title>
</head>
<body>
<a href="cherry.html" target="leisurepage" onClick="window.open('holder.html','holder','');">Cherry</a>
<a href="Banana.html" target="leisurepage" onClick="window.open('holder.html','holder','');">Banana</a>
<a href="orange.html" target="leisurepage" onClick="window.open('holder.html','holder','');">orange</a>
</body>
</html>




holder.html
code:

<html>
<head>
<title>holder.html</title>
</head>
<body>


<iframe name="leisurepage" id="leisurepage" marginwidth="0" marginheight="0"
src=""></iframe>
</body>
</html>




Joff, thanks !

That is pretty much exactly what I want ! Yes, certainly is. That's brilliant

Sorry, just one more question ! -- Is there any way to have it open in the exact same way, but in the same window ? Then I'll have forward and back navigation buttons, so that the links don't need to be displayed on the same page as the iframe.
Joff
Member

Registered: 17th Oct 00
Location: Cambridgeshire
User status: Offline
31st Jan 04 at 12:59   View User's Profile U2U Member Reply With Quote

Mike, what do you mean "in the same window"?

The second example loads all the fruit pages within holder.html which is it's own window...

The first example keeps everything on one page - you could take the links out of "menu.html" and put those straight onto holder.html:

holder.html
code:
<html>
<head>
<title>holder.html</title>
</head>
<body>
<h3>Fruits</h3>
<a href="cherry.html" target="leisurepage">Cherry</a>
<a href="banana.html" target="leisurepage">Banana</a>
<a href="orange.html" target="leisurepage">Orange</a>

<hr>

<iframe name="leisurepage" id="leisurepage" marginwidth="0" marginheight="0" src=""></iframe>
</body>
</html>

Mikeboy
Member

Registered: 12th Jun 02
Location: Wiltshire             Drives: SXi DTi
User status: Offline
31st Jan 04 at 13:00   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Joff
I agree with groom - the first example would be a lot cleaner to navigate rather than have x number of popup windows with content.


Cheers

The first one works nicely, but I dont really want the two iframes showing on the same page !
Joff
Member

Registered: 17th Oct 00
Location: Cambridgeshire
User status: Offline
31st Jan 04 at 13:05   View User's Profile U2U Member Reply With Quote

Try the last example Mike.
Mikeboy
Member

Registered: 12th Jun 02
Location: Wiltshire             Drives: SXi DTi
User status: Offline
31st Jan 04 at 13:08   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Joff
Mike, what do you mean "in the same window"?

The second example loads all the fruit pages within holder.html which is it's own window...

The first example keeps everything on one page - you could take the links out of "menu.html" and put those straight onto holder.html:

holder.html
code:
<html>
<head>
<title>holder.html</title>
</head>
<body>
<h3>Fruits</h3>
<a href="cherry.html" target="leisurepage">Cherry</a>
<a href="banana.html" target="leisurepage">Banana</a>
<a href="orange.html" target="leisurepage">Orange</a>

<hr>

<iframe name="leisurepage" id="leisurepage" marginwidth="0" marginheight="0" src=""></iframe>
</body>
</html>





The solution you posted at 1245 seems to open a complete new window, with the floating iframe, and the correct page as the source. This is great, but I'd like it to open in the same window, but a complete new page. i.e. a different page to the links.

The first solution is great also, but again I'd like the links on a different page, but same window.

The final solution is so close too. If only when you click one of the fruits, it could open the source within the iframe on a new page (but not a new popup window!), so that the fruit links arn't there !



[Edited on 31-01-2004 by Mikeboy]
Joff
Member

Registered: 17th Oct 00
Location: Cambridgeshire
User status: Offline
31st Jan 04 at 13:22   View User's Profile U2U Member Reply With Quote

Well we've got you close, so I'm sure you'd rather do the rest yourself

How is the new page going to be opened?
Your life will be so much easier if there's a popup window involved as the DOM doesn't need to be told too much about the other window (better for cross-browser compatability).
Mikeboy
Member

Registered: 12th Jun 02
Location: Wiltshire             Drives: SXi DTi
User status: Offline
31st Jan 04 at 13:35   View User's Profile U2U Member Reply With Quote

lol ok then, Thanks for everything

And well the thing is, it's a CD to promote the council's leisure facilities. Just a mini uni project.

I want a welcome page to autorun, then the user will click to enter, which will open a full full screen browser window, with no menu or toolbars etc.

I'd like everything to happen in this main application window. The user will be able have forward, back, and Quit buttons on the bottom of the page. So that's why I'd rather not have any new pages popping up here and there !
Joff
Member

Registered: 17th Oct 00
Location: Cambridgeshire
User status: Offline
31st Jan 04 at 13:38   View User's Profile U2U Member Reply With Quote

Yeah, I understand now why you don't want any additional windows...

Surely the 12.59pm example is what you'd need??
Without any scripting language, it would be quicker to simply make numerous holder.html pages (eg holder_cherry, holder_banana, etc) rather than spend hours in Javascript working out the current page then generating the links for the previous and next pages for your fwd/back buttons.
Joff
Member

Registered: 17th Oct 00
Location: Cambridgeshire
User status: Offline
31st Jan 04 at 13:40   View User's Profile U2U Member Reply With Quote

Oh, back is easy btw.

code:

<a href="javscript:history.back(-1);"> < back </a>



So it's only the "forward" link you need to worry about
Mikeboy
Member

Registered: 12th Jun 02
Location: Wiltshire             Drives: SXi DTi
User status: Offline
31st Jan 04 at 13:44   View User's Profile U2U Member Reply With Quote

Joff yeh, I think the 1259 example is probably the closest. It is 99% perfect! Maybe I will just follow that idea and have the links in the same page.

If not then yeh, I'll just make a new holder for each source like you say !

Thank you so much for all your time & help. I wouldn't have had a clue otherwise.

Joff
Member

Registered: 17th Oct 00
Location: Cambridgeshire
User status: Offline
31st Jan 04 at 14:09   View User's Profile U2U Member Reply With Quote

No worries dude, I'll have to invoice ya for the work of course...

Mikeboy
Member

Registered: 12th Jun 02
Location: Wiltshire             Drives: SXi DTi
User status: Offline
31st Jan 04 at 14:55   View User's Profile U2U Member Reply With Quote



Joff
Member

Registered: 17th Oct 00
Location: Cambridgeshire
User status: Offline
31st Jan 04 at 14:58   View User's Profile U2U Member Reply With Quote

*SERIOUS*



Mikeboy
Member

Registered: 12th Jun 02
Location: Wiltshire             Drives: SXi DTi
User status: Offline
31st Jan 04 at 15:07   View User's Profile U2U Member Reply With Quote



<gingerly leaves the thread>



  <<  1    2  >>
New Topic

New Poll

Corsa Sport » Message Board » Off Day » IFrame experts needed ! 23 database queries in 0.0121150 seconds