views:

58

answers:

1

I am trying to create a frameset and I am doing this using Rails. Basically my view looks like this

<html>
<head></head>
<body>

<frameset>
    <frame src="http://www.nba.com" />
</frameset>

</head>
</html>

And my controller looks like

  def basket
      respond_to do |format|
        format.html { render 'basket.html.erb', :layout => false }
      end
  end

But when I go to

http://localhost:3000/stores/basket

I get this for html source

<html>
<head></head>
<body>

<frameset>
    <frame src="http://www.nba.com" />
</frameset>

</head>
</html>

but firebug gives me

<html>
<head></head>
<body></body>
</html>

and the window does not display the nba.com frame. Does anyone know why this is happening?

+1  A: 

This is not a Rails question, but a html question.

Framesets don't belong in the body tag. Try this:

<html>
<head></head>

<frameset>
    <frame src="http://www.nba.com" />
</frameset>

</html>
captaintokyo
=P thank yous!!
denniss
You're welcome!
captaintokyo
+1 for correctness and an imaginary -1 to question for framesets. Framesets make me (and I'm sure the entire internets) cry.
Darko Z
If you really need the body tag you should consider iframes. But I would generally not use any form of frames except for very rare and special, arguable purposes.
hurikhan77