Help with IFRAME and grabbing URL

This is a discussion on "Help with IFRAME and grabbing URL" within the JavaScript Forum section. This forum, and the thread "Help with IFRAME and grabbing URL are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Feb 27th, 2008, 22:13
New Member
Join Date: Feb 2008
Location: Edinburgh
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Help with IFRAME and grabbing URL

Hi all,

I need help with a iframe question.

I have a forum that loads in an iframe of another page. It all works great as it is and i don't want to change the way its setup up.

however when someone tries to bookmark a they can only book mark the page than contains the iframe and not the page they are looking at.

So i'm trying to create a permalink on the page that contains the iframe and have this dynamically updated using the onclick event of a button on the parent page.

So far i have managed to get the current url of the iframe and display it in an alert box, the next stage and the stage i can't figure out is to change that so that when the iframe is loaded the current url is saved to a variable on the parent page. Does that make sense.

So the code for the onclick event is:
Code: Select all
onclick="alert(document.getElementById('forum').contentWindow.location)"
So how do i get this to be saved a variable that i can use. it would be better if i could be a onload event of the iframe but i believe that its not supported in IE.

Any help greatly appreciated!!

Thanks

Tom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Feb 28th, 2008, 06:38
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,192
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
Re: Help with IFRAME and grabbing URL

I would highly doubt there is a need to use frames in this instance. If you are trying to surround your forum with a higher level of navigation or some border, or whatever else really, then there's no need.

This is just one of the many problems you face.

Most forum softwares have a header and footer template you can edit, so therefore you can theoretically surround your forum with anything.

If you really really do have to keep frames, then could you give us a url, or build a really crude demo so we can look at something?

I imagine a javascript to get this going would be very simple and should be aimed at the frames parent.
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Feb 28th, 2008, 08:38
New Member
Join Date: Feb 2008
Location: Edinburgh
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help with IFRAME and grabbing URL

the reason we have used iframes for this is that the forum software doesn't integrate into the page at all. We've edited the headers and footers but the software still doesn't integrate into the page. Something about how the page is processed is stopping or overwriting the rest of the pages. it doesn't happen to every page which makes it stranger.

So we've put it in a iframe to make life simpler, and also we don't have the time to site and debug the whole application, we've already spent 2 days trying to get it to work.

I can't give a url as its in a members only section of the website, but i can build a crude demo tonight and post it up, if you bear with me i'll do it tonight and post a url.

Thanks in advance

Tom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Feb 28th, 2008, 09:27
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,192
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
Re: Help with IFRAME and grabbing URL

Why not pm me the url...

I've used almost every forum software and might know away around this.
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Feb 28th, 2008, 09:37
New Member
Join Date: Feb 2008
Location: Edinburgh
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help with IFRAME and grabbing URL

I'm sorry i can't the forum is inthe members section of the site which is live.

The forum software is snitz forum. Like i said two of us haven spent two days trying to figure it out, but any help would be appreciated.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Feb 28th, 2008, 09:48
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,192
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
Re: Help with IFRAME and grabbing URL

luckily for you I know snitz and ASP like the back of my hand...........

I will PM you.
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Feb 28th, 2008, 10:17
New Member
Join Date: Feb 2008
Location: Edinburgh
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help with IFRAME and grabbing URL

that would be great!!

Thanks very much
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] refresh a different iframe once an iframe elsewhere has loaded cosmicbdog JavaScript Forum 1 Jan 25th, 2008 01:50
grabbing still images from wmv for PHP? Raynia PHP Forum 3 Sep 21st, 2007 06:24
Can a jsp file in an IFrame calls a javascript function outside of the IFrame jadeite100 JavaScript Forum 0 May 31st, 2007 14:29
Grabbing the first paragraph karinne PHP Forum 12 Mar 19th, 2007 20:58
Screen-grabbing from a DVD James-Clarke Graphics and 3D 18 Jan 31st, 2007 15:14


All times are GMT. The time now is 03:38.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42