Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » Linking iFrame


Linking iFrame

Reply
  #31 (permalink)  
Old 06-14-05, 07:36 PM
KingSky's Avatar
KingSky KingSky is offline
Newbie Coder
 
Join Date: Jun 2003
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Hey phoenixhr,

That will work for normal frames, and is the normal way they work.

However, if you call a completely different page with an iframe inside it, and want to specify different iframe pages to load in that new page via the link, it won't work, and the javascript is needed.
Reply With Quote
  #32 (permalink)  
Old 02-10-06, 01:58 AM
aspen aspen is offline
New Member
 
Join Date: Feb 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
You're a celebrity in my books KingSky!

Hey KingSky,

Not being any great JavaScript guru, I have been looking for a method of doing this for over a year now, wasting hour after hour scouring forums like ProgrammingTalk!!! Being quite partial to 'iframing', particularly for low-bandwidth apps, iframe external linking was one of those 'too hard basket' things for too long!

Then along came our mate Torito with the same need - gotta love you guys!

Just one small issue I have using your code on an index.htm file with a single iframe (name="main") that is loaded with content requested from index's menu options and hyperlinks. I added your JavaScript to index.html and added the onLoad to the <body> tag. All worked fine under the /test directory but as soon as I updated the live index.html (obviously in the root), everything went pear-shaped - just stops working completely. Copy them to another folder, and all works fine again.

Unlike Torito, my primary need is to externally link from newsletters using standard URL-based hyperlinks to specific pages loaded within index.html's iframe.

I can't afford to procrastinate any longer KingSky so your valued advice on this one will be forever remembered!!!
Reply With Quote
  #33 (permalink)  
Old 03-13-06, 07:12 AM
kuraiza kuraiza is offline
New Member
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy problem if linking from a completely different website??

Wow KingSky, way to go. I searched all over and you're the only person who (a) understood the problem and (b) could provide an answer.

I've followed through your advice to the letter, and it was working perfectly on my harddrive until I uploaded page a (with the links) to one web server and page b (the one with the iframe) to a completely different web server.

It sounds like a daft thing to do, but I was forced into it by weird hosting service.

You can see the code in action at: http://www.jeremywest.net.

Some (not yet all) of the links on the left side (are supposed to) open up in an iframe on a different site.

As you can see, a javascript error occurs: parent.ifrm.location is null or not an object.

Do you have any information on how to fix this?

Thanks for the hard work.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! I facing trouble by linking access database Kenyiew ASP 1 01-25-04 08:52 PM
linking to iframe not working :( j0d JavaScript 5 01-19-04 08:14 PM
Help with scrolling iframe pongo Script Requests 3 01-15-04 10:04 PM
BidOutHosting.com Needs Linking Partners iBold Traffic Exchange 1 12-15-03 07:24 PM
Iframe browser problems Ryukuchan HTML/XHTML/XML 1 11-11-03 12:44 PM


All times are GMT -5. The time now is 09:24 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.