Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to resize an iframe window or find another solution

Status
Not open for further replies.

Aro2220

Technical User
Aug 3, 2010
1
CA
Hi!

I have a mysql database with a bunch of quotations in it. I created a blog at
At the top of the blog is an iframe window that directs to
On that page it uses php to pull out a random quote from the database. The iframe window displays that quote onto the blog.

It works great except that the height is not automatically resizing.

Is there a way I can use javascript to do this instead? Here is some pseudo-code of what I'd like to be able to do: (p.s. I do not know javascript or much of anything so I am looking for people to tell me how to ACTUALLY do this)

var stringvariable =
int stringlength = stringlength(stringvariable);

int autosize = 200 + stringlength * 5;

<iframe width="100%" frameborder="0" src=" height=$autosize scrolling="no"></iframe>

Obviously these are not real functions or proper syntax but hopefully it will paint a clear picture on what I am trying to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top