Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How to adjust the height of an iFrame dynamically

Avatar of JordanBlackler
JordanBlackler asked on
JavaScriptMicrosoft SharePoint
20 Comments1 Solution902 ViewsLast Modified:
Hello All -

I'm using javascript and my site is inside a sharepoint environment. I'm able to adjust the height of the iframe onload with a function so that there are no scroll bars on the iFrame.

Inside the iFrame is a search webpart. When the "Search" button is pressed it uses AJAX to load the results right below. Which in turn lengthens the iFrame and adds scroll bars. I called the function from a button i created to test if it works after the results have displayed. It does, iFrame height adjusted, scroll bars gone.

But i don't wan't it to work by manually pressing a button, I would like it to somehow run the same function after the results have be displayed. I'm unable to modify the AJAX. I've tried sticking the function at the end of the OnClick event of the "Search" button, but it doesn't work.

I think i explained it well enough, if not let me know and i can try to do a better job. Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of JordanBlackler
JordanBlackler

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 20 Comments.
See Answers