Log in

View Full Version : Help with Target Frames



william james
11-29-2010, 09:02 PM
<iframe id=player name=player frameBorder=0 allowtransparency=true src=defaultContent.html></iframe>

<FORM action="http://www.google.ca/search?q=table+generator" target="player"><INPUT type=submit value="GO" class="btn"></FORM>

http://www.google.ca/search?q=table+generator <<that is the format of url wherein I want to target inside an iframe.

But the problem is that it only shows the homepage which is http://www.google.ca/.

I tried to use a normal url like http://www.dynamicdrive.com/forums/ and it works perfect.

The problem Im seeing is that a url with (?q=) wont show inside the frame.

Is there anyway to fix this?

Thank you in advance and more power!

Beverleyh
11-30-2010, 06:14 AM
Not entirely sure what this is supposed to do - please give us a link to the page so we can see it in context.

william james
11-30-2010, 05:27 PM
I finally figured how to do it!
Just wanna share.

What I really want to do is to target an iframe and this is my iframe:


<iframe id="player" name="player" frameBorder="0" allowtransparency="true" src="http://myDefaultPage.html"></iframe>

-----------------------------------------------------


<FORM>
<INPUT TYPE="button" value='GO' class='btn' onClick="player.location='http://www.google.ca/search?q=table+generator'">
</FORM>

If I click GO button, the content(http://www.google.ca/search?q=table+generator) will show inside the above iframe.

With a normal button code, you cant able to do that.
--------------------------------------------

The name of my iframe is "player"

"player.location" <<<the "player" is the key on the button code.

"parent.location" <<<"parent" targets self window.

-------------------------------------
that button code is perfect for url with a (?) mark.



--------------------------------------------
my css for the button
--------------------------------------------

input.btn {
color:#29447e;
font: bold 80% 'arial',helvetica,sans-serif;
background-color:#ffffff;
border: 0px solid;
border-color: #29447e;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0,StartColorStr='#ffffffff',EndColorStr='#ffeeddaa');
}
-------------------------------------------