Link to home
Start Free TrialLog in
Avatar of MAVERICK
MAVERICKFlag for United States of America

asked on

[MGFRANZ] Some HTML Frame Questions

How do you do borderless frames in HTML for IE4?? can do it ok in netscape...

How do you set so when a user visits certain HTML pages from within a frame... the frame disapears so they get it as a full page without the frames following...

Thanks
BTW After my last experience.. I figured I'd give you first right of reply

Avatar of Member_2_242582
Member_2_242582

To start with your first question:

All you need to add in your frameset definition is:
<frame name="..." src="..." border=0>

make sure the border=0 part is added to all frames...

the second question;
when you have a link on your page, which needs to be shown in the entire browser, you need to add a target attribute, like this:

<a href="mylink.html" target="_top">open my link</a>

Arjan.
Avatar of Mark Franz
Thanks aarie...  I didn't know you were filling in for me.  How about you fill in for me on my next audit.

Back to the question though, aside from the 'border=0' statement, there are other tags to think of when laying out framesets, like 'marginwidth' and 'marginheight'.  And in IE, it's 'frameborder' not border, although border will work in some browsers.  It is better to use 'frameborder=no' and 'marginxxx=0' for cross browser compatability.

For the second question, the answer as you requested is a 'target' issue, but do you want to open a new window or just pop out of a frameset?  _top will break out of frames, _blank will create a new window, _parent will use the existing frame the document belongs to and _self will load in the current frame window.

And Mav, thanks for being an honest person.
Avatar of MAVERICK

ASKER

I want the target to be in the same window.... thanks

aarie.... the reason why I gave mgfranz  "first right of reply " is on a recent difficult question... I rejected his answer (which was basically correct) and accepted a different one because it looked correct... but had browser compadibilty problems!!!

Sorry about that....
btw, it should indeed be frameborder...
my mistake there...

Mav, if you want you can give the points to mgfranz.. after all, he had first right and even needed to correct my mistake on the border thingie...

Arjan.
ASKER CERTIFIED SOLUTION
Avatar of Mark Franz
Mark Franz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oh, and dont forget the other frameset options;

bordercolor (IE, NN)
cols (IE, NN) (% or pixels)
rows (IE, NN) (% or pixels)
framespacing (IE)
H1, H2, H3, H4, H5, H6 (IE)

the <FRAME> element can be expanded also;

bordercolor (NN, IE)
datafield (IE)
datasrc (IE)
height, width (IE)
marginwidth, marginheight (IE)
noresize, scrolling (NN, IE)
src (NN, IE)

Did you get this working?
basically....not really... in IE3 I still have a border its just thinner...
here's the current code...

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//3.2">

<HTML>
<HEAD>
      <TITLE>project18a</TITLE>
</HEAD>
<FRAMESET ROWS="22%,*,17%"  FRAMEBORDER="no"  >
      <FRAME NAME="header" SRC="project17e.htm" SCROLLING="No" FRAMEBORDER="NO" MARGINHEIGHT="0" MARGINWIDTH="0">
      <FRAME NAME="FRAME2" SRC="project13c.htm" SCROLLING="AUTO" FRAMEBORDER="NO" MARGINHEIGHT="0" MARGINWIDTH="0">
      <FRAME NAME="footer" SRC="project17f.htm" SCROLLING="NO" FRAMEBORDER="NO" MARGINHEIGHT="0" MARGINWIDTH="0" >
</FRAMESET>

</HTML>

There is going to be a border no matter what, you are going to have to play with the border colors of the specific frame tags.  For a black border on Project17e.htm;

<FRAME NAME="header" SRC="project17e.htm" SCROLLING="No" FRAMEBORDER="NO" MARGINHEIGHT="0" MARGINWIDTH="0" BORDERCOLOR="#000000">
mgfranz ... do you know much about perl??
A bit... why?

mgfranz@pe.net
I still end up with a grey border... BTW for testing I'm using IE3.0
This could be an inherent function of 3.0, try it with NN3.0 and the 4.0 browsers.  I don't have my books with me here at home, but I'll check them tomorrow.  I'll let you know in my email reply.

Mark
ok...here's a clue...

Netscape and IE use different tags for this and they both don't watch the others, to really get no frameborders, add the following...

FRAMEBORDER="no" BORDER="0" FRAMESPACING="0"

All of these combined will kill Your frame borders...

maybe that helps?
oh...and to open the page in the same frame..You don't need to use a target attribute....default is the same frame...
I see... DreamMaster... I'll check it out...
As I mentioned previously, the frameborder is IE only, Border is fine for IE4> and NN3>, Framespacing is IE3> only.  Even so, you should still assign a border color to your framesets that matches backgrounds.

Anyway, here is the fix;

<HTML>
<HEAD>
<TITLE>project18a</TITLE>
</HEAD>
<FRAMESET ROWS="22%,*,17%"  FRAMEBORDER="no" border="0" > 
<FRAME NAME="header" SRC="project17e.htm" SCROLLING="No" MARGINHEIGHT="0" MARGINWIDTH="0">
<FRAME NAME="FRAME2" SRC="project13c.htm" SCROLLING="AUTO" MARGINHEIGHT="0" MARGINWIDTH="0">
<FRAME NAME="footer" SRC="project17f.htm" SCROLLING="NO" MARGINHEIGHT="0" MARGINWIDTH="0" > 
</FRAMESET>

</HTML>

The trick was to put the frameborder and border in the <frameset> tag.

Mark