• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 214
  • Last Modified:

From inside a frame scroll parent document to top.

I need a way to click a button inside an iframe to scroll parent the document to top.
0
mnb93
Asked:
mnb93
  • 7
  • 3
1 Solution
 
b0lsc0ttIT ManagerCommented:
mnb93,

Does the page have a named anchor?  If so you can try ...

parent.window.location.href="#name";

Let me know if you have any questions or need more information.

b0lsc0tt
0
 
mnb93Author Commented:
no, but how can I make one?
0
 
mnb93Author Commented:
<a name="asdadas"></a>

?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
mnb93Author Commented:
parent.window.location.href="#name";
 that is like a framebreaker, sorry not what I want.
0
 
mnb93Author Commented:
parent.document.getElementById('name').scrollIntoView(true);
0
 
mnb93Author Commented:
That is the answer
0
 
b0lsc0ttIT ManagerCommented:
mnb93,

If that is the answer then you should not have closed this by accepting my comment, even with a C grade.  I will post to Community Support and ask them to correct this.  They can refund your points and either close it by accepting the answer you posted or delete the question.  Let me know if you have any questions.

bol
0
 
mnb93Author Commented:
But you helped me figure out the answer.
0
 
mnb93Author Commented:
Without your idea, I still wouldn't have the answer.
0
 
b0lsc0ttIT ManagerCommented:
OK, I can respect that.  The C grade made me think I wasn't any help.  I'm glad that I was able to help you and the problem is fixed.  Thanks for the fun question.

bol
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 7
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now