Is There An Onload Script for Automatic Page Positioning In Frame (Full Version)

All Forums >> [Web Development] >> General Web Development



Message


Creemo -> Is There An Onload Script for Automatic Page Positioning In Frame (1/30/2007 4:30:41)

I am using an IFrame in a page to access another page that has 4 IFrames in a vertical column. When my page finishes loading the page that contains the 4 frames doesn't end up in its top-most position.

Is there any onLoad javascript or otherwise that could be used to command the page to return to the top or maybe an auto navigation script to return page to #bookmark1 once its finished loading?

I've already tried using the bookmark in the URL that the main frame calls out...it didn't help.

The URL is:
http://www.michaelwryan.com/profile_tmp.html
You may need to hit the refresh button a few times to get the navigation buttons to finally come into view. Once you click on one of the buttons then the page orients correctly.

I'd truly appreciate any help available...(and, I know that many are dead set against the use of frames but I've got my heart set on that format).




rubyaim -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (1/30/2007 18:06:48)

Hi Creemo, I've had a look at your page and I'm not too sure that Javascript will fix the issue.

A fix would be to have the actual menu on the main page, and only call the appropriate file with the text into the iFrame (you can target your iFrame on the links).

ie - rather than have the iFrame calling in other iFrames with menus, include the menu on profile_tmp.html. Place your iFrame under this and only call in the pages with the text (health_story.html for example).

You could do away with the 'insert_holder' page totally. A side benefit of this would be you only have to maintain the links on one page.

I hope this makes sense [:)]




Creemo -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (1/30/2007 18:53:20)

Hi Sally,
Thank you so much for your reply.
Being a brand new member to this forum I wasn't sure if I'd get any immediate responses.
I had previously considered the solution that you suggested but my only drawback was that I wanted the navigation menu bar to change appearances as well, you know...like showing the tab for the appropriate page that is being viewed. Is there another way to accomplish that as well?
Creemo




rubyaim -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (1/30/2007 19:38:31)

Hi Creemo, Welcome (forgot to say that in my first reply) [:)]

I understand about the menu. Am not too sure if it would work as you have now, but I'd be inclined to sacrifice the look of it to use the one frame, rather than several.

I've used css (id on body) to highlight the current page for users, but have never tried it on one page that pulls content in from frames.

If it were my site, I'd probably do the rebuild, and then look at the menu. Once things are working as you want, you can start looking at the menu options.

Maybe someone reading this will see how you can get your initial page loaded with the menu at top.

I think it's got something to do with all the fixed positioning and z-index use, but would take a long time for someone unfamiliar with the site to pull apart, so perhaps you could try playing with that.




Creemo -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (1/30/2007 19:54:41)

Sally,
Thank you so much for the most kind "Welcome" greeting as well.

A couple other items that I hadn't mentioned is:
That particular page is being constructed to replace a temporary page that I just threw together to occupy until the permanent page was done. The puzzling thing about it is...the temporary page is set-up the exact same way, except for the fancy navigation buttons, but the temporary page works just fine! I'm not sure if the buttons have something to do with it or not.

The other thing I wanted to mention is the reason I chose to go with the multiple IFrame format is for the ease and efficiently quick page changing advantages.
I personally always liked it when a page change responds immediately to my mouse click, and that's kinda what I was shooting for with this.

Here is the URL for the page that is currently being used:
http://www.michaelwryan.com/profile.html




rubyaim -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (1/30/2007 20:31:01)

Hmmm, in FireFox that page does not load at top either (fine in IE), so I think it does have something to do with the fixed positions and stacks, but am unable to determine exactly what as I'm afraid I don't use them so would only be taking really wild guesses (sorry, hopefully someone else will have a clue).

iFrames have their place and I do use them when I'm pulling content in from another server [:)]. It is far more efficient though to just call a page into the iFrame rather than calling iFrames into iFrames. Far easier to trouble shoot as well [:D]. My personal choice for things like this when the pages are all on the one server is to use includes - you can get a nice "iFramey" effect by using a div with a scroll - basically it all works pretty much like you have now.

If you want to stick with your current iFrame set-up (and that is fair enough as it's your site), then it would be well worth going through the code to see what is preventing the page from loading at the top, rather than down a bit.




Creemo -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (1/30/2007 20:41:54)

Thanks Sally,

I've truly appreciated your cordial replies.

I had no indication that the current page did not load correctly in Firefox either. So I am really glad that you've informed me of that.

I will most likely take your suggestions, especially since finding out about the currect page issues in other browsers.

You've been most helpful and I hope we can discuss other topics in the future!

JR




rubyaim -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (1/30/2007 20:50:03)

I'm afraid I've not been a great help to you [:o]

These site might help you sort the stack (if that is the actual problem)

http://css-discuss.incutio.com/?page=OverlappingAndZIndex

http://support.microsoft.com/kb/177378

http://developer.mozilla.org/en/docs/Understanding_CSS_z-index

http://segment7.net/projects/web/z-index.html


If you do decide to go with the one iFrame, I'm pretty sure we can get the menu sorted for you somehow or another [:)] Let us know what you come up with.





Creemo -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (1/30/2007 20:56:43)

You've been awesome!!! and helpful as well.
[:)]




Creemo -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (2/13/2007 10:54:01)

Sally,

I don't know if you've been back to see the page lately but I think for now this maybe a good temporary fix.
http://www.michaelwryan.com/profile.html

Unfortunately I don't currently have another web browser, besides IE, to view the page with. So, if there is a chance, do you think you could take another look at it and let me know if the page now loads at the top?

I am still looking into the "Z" index thing as well as layering.

Take care and thank you in advance.

JR




rubyaim -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (2/15/2007 20:11:13)

Hi JR, sorry for the late replay, I've been on long shifts.

You have obviously been hard at work - that looks nice in FireFox and IE6 [:)]

Have not got a copy of Opera on this machine to check in that.





Creemo -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (2/16/2007 2:52:16)

Hi Sally,

Good to see your reply.
I'm relieved to know that page now loads correctly.
http://www.michaelwryan.com/profile.html

Thank you for checking it out again.

JR




Creemo -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (2/16/2007 16:31:45)

In continuance with this topic...if anyone has the Opera Browser installed on their computer, would you like to check out the following page link to make sure the pages in the IFrame load correctly (at the top of the contained pages, instead of in the middle as before)?!
http://www.michaelwryan.com/profile.html

I'd really appreciate it if someone could do that!!!

Thanks,
JR




kali -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (4/16/2007 22:25:50)

I've got almost the same issue and am looking for a solution. I have a site that is design to be dropped into different headers so that it appears to be different sites. The idea is that the lower content is rearranged depending on who's storefront matches the header. There are only two stores now but I'm adding more.

The problem is that as products are added some pages have become very long, When going from the bottom of a long page to a short page, with both loaded into the same iframe, you end up at the bottom of a screen that looks blank because the actual content is 2000 pixels up!

I'm an artist really, not a great coder, these sites are to sell my products through the people I design them for. I need to either

1.) be able to set the page size from within the child page (the page loaded into the iframe). I can set it close. It doesn't have to auto adjust to the exact size.

2.) make my pages load at the top of the screen.

Any help wopuld be greatly appreciated.

<edit user request>





kali -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (4/16/2007 23:06:15)

I just realized I could solve this be rearchitecting the site to have the headers use webbot bot="Include" to include the pages I was putting in frames, then just call the renamed header pages in the same way I was calling the pages that were previously in the frames. This way for each new site, I can just build the headers and use includes to include the code from the other site, I think?? There's probably a reason this won't work... or is there... It's not what I wanted but it solves the page scroll and page resizing problems that have been dogging me for days now. I would still much rather have the other solution.....




kali -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (4/17/2007 8:35:47)

OK - somehow posting here seems to have given me an awakening - but I've just decided FRAMES BLOW! I redid the portion of this site that was having so many frame issues. I used includes. Every problem is now gone. It took 30 minutes. I've spent at least 4 hours trying to find ways to autosize or page position to make up for the shortcomings of frames to come to the realization that everyone using them is having problems. There are also other issues with unwanted scrolling within frames when you use a margin and phantom cursors, at least in IE. And everything I could do with a frame I can do with includes and a few other tricks. And look frames even has me joining forums and talking to myself! My god!

Kali....




rubyaim -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (4/17/2007 18:51:45)

Welcome to the forums Kali - pleased you got it sorted.

Includes are generally much, much better than using Frames - even if it does mean talking to yourself [:)]




Creemo -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (4/17/2007 20:55:35)

quote:

ORIGINAL: ... And look frames even has me joining forums and talking to myself! My god!

Kali....


Hi Kali,

No...if anything you're definitely not talking to yourself in a forum!
By the way, I thought your website was very creative and the name...well, what can I say...clever to say the least.

This recent enlightment you've received regarding "includes" sounds like a great solution. I may have to tap into your resources sometime (no pun intended regarding busch liquors).

Obviously, I've been otherwise occupied with various things and haven't made the time to get back and finish Mike's profile page. I really should make it greater priority, especially since he has passed on and can now probably see everything I waste my time on.[8|]

Take care,
JR




kali -> RE: Is There An Onload Script for Automatic Page Positioning In Frame (5/4/2007 2:44:31)

It get's better than talking to myself. According to MSN the only place the website exists is in this forum! Thanks for the welcomes! The site officially opens next week probably May 9th. About 2 days later than expected due to a delay in getting credit card processing up and running. Be sure to check out the store. - K




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.09375