Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Apr 2003
    Posts
    5
    Member #
    1066
    i have created a site in asp/vbscript/dhtml with iframe as the content location and a dynamically generated menu. the big problem is: i was required to use a base target for referral information and to point all links to the iframe. unfortunately, as hard as i tried to opimize the site for 800X600 i was unable to fit the content....so i went a little large on the size, simply thwarting the bottom contents of the page....no big deal. so....after the page is loaded and a visitor click an internal link (oviously targeting the iframe) the page scrolls to center the iframe in the window, causing the header of the page to be "cut-off". this happens, again, when loaded with 800X600 (scriptlets will also show the problem) and i have even tried body onload="this.focus()". nothing seems to work.....

    any suggestions??

    the site is http://www.ose2.com

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    Try the following: [Minicode]<BODY onLoad="top.focus()">[/minicode] in the BODY tag of each of your IFramed pages. instead of "this.focus()".

    The other thing you may wish to consider is abandoning iFrames completely (since they're death to search engines and for a myriad of other reasons transio will probably spend half a year of his life going into ), and going with tables to split your content. This is easily accomplished with your content.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Senior Member rjahrman's Avatar
    Join Date
    Feb 2003
    Posts
    180
    Member #
    705
    If you're using IFrames to avoid modifying every page when you change your layout, look into using SSI.

  5. #4
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    You can scale the iframe vertically in all browsers by doing this:
    Code:
    <html>
    <head>
    <script>
    function redraw() {
      var width = document.all ? document.body.clientWidth : window.innerWidth;
      var height = document.all ? document.body.clientHeight : window.innerHeight;
      document.getElementById('fraMenu').height = height;
      document.getElementById('fraMain').height = height;
    }
    </script>
    </head>
    <body onload="redraw()" onresize="redraw()">
    </body>
    </html>
    You should also consider making the sub-navigation on the left an iframe (as you can see in the script above). That way, when you click a link in the main navigation, it won't have to reload the whole page.

  6. #5
    Junior Member
    Join Date
    Apr 2003
    Posts
    5
    Member #
    1066
    i have tried the above suggestions....unfortunately, none worked. it seems that when a link is clicked, the page automatically refreshes the iframe and centers the iframe in the window.....i should have added in my first post, that the way i dynamically created the site is a combination of ssi, iframes, and bookmarks (<a name=""> etc) when an internal link is clicked, the ssi searches through my menu, which references the page and bookmark location.......i wonder if my problem is solely the use of the bookmarks causing the problem??

    rebuilding the page without iframe would pretty well render over 60 hours of coding completely useless, further, using the div feature with ssi will cause the page to need a reload every time in this graphics intensive site; that was the whole reason behind the iframe (my client uses dial-up!). so, i guess, is there a script that will preform a secondary refresh after loading to point to a bookmark at the top of the parent page?? ...is this a good idea...

    p.s. - i really appreciate the responses so far....a very pro-active message board indeed....thanks

  7. #6
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    what you could do is have each link have something like this:
    Code:
    <a href="page.asp" target="frame" onclick="top.location.href='#';">Link Name</a>
    That way, even though you're pushing the iframe to the desired content, the top frame will shift back up afterwards.

  8. #7
    Junior Member
    Join Date
    Apr 2003
    Posts
    5
    Member #
    1066
    the above was unsuccessful.....thanks, though.

    here is what my ssi page init looks like:

    <BASE url="?REF=<%= SESSION("OSE2_REF") %>" TARGET="IM_BUTTONS_BODYFRAME">

    here is what my links look like:

    <a href=""/OSE2_Pages/About.asp#IM_BUTTONS_Whatisose2"">What is OSE2</a>

    and here is what my iframe looks like:

    <iframe name="IM_BUTTONS_BODYFRAME" marginheight="0" marginwidth="0" height="100%" width="600" frameborder="0" scrolling="no" src="/ose2_pages/home.asp">

    in trying to be dynamically generated and prevent the need to target each individual link, i set a base target, incidentally to forward any referal links within.

  9. #8
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    It seems to me that you're making your life a lot harder than it needs to be. One of the major reasons for using a server-side include is to allow for a consistent website template without having to resort to frames, inline frames, etc.

    So why not abandon the whole concept of iframes and just go with tables instead? Your site will be search-engine-friendlier (officially registered trademark of The GAME Corporation, all rights reserved), you don't have to worry about the top of your page getting "cut off", and you still maintain the ease of layout updates you get with frames. Just put your top, middle left, and bottom portions into your SSI, use your middle right portion for the content, and you're good to go.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

asp vbscript iframe focus
,
in vbscript make iframe scroll with page
,
read iframe content in vbscript
,
vb script focus iframe
,

vbscript focus iframe

,

vbscript focus iframe content

,
vbscript for iframes
,
vbscript iframe set focus
,
vbscript to bring iframe infocus
Click on a term to search for related topics.
All times are GMT -6. The time now is 09:02 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com