472,989 Members | 3,047 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,989 software developers and data experts.

Scrolling to the top of an iframe's parent on form submit

Hi all,

I have a webpage with an IFRAME in it.

But some of the pages on my IFRAME which has forms which are really long. So, I want a script or a html code whereby I can scroll to the top of the page once the user finishes with a certain page.

Also, the IFRAME does not have a scroller, but the parent page does.

So basically, putting my question more specifically, is it possible to use a submit button in the IFRAME to scroll to the top of the parent page (i.e, automatically scroll up with the parent page scroller) ?

Also, do i have to put the code in the parent page code? or in the link which the IFRAME points to?

Below is my code:
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <title>68 Classifieds</title>
  5. <meta name="Keywords" content="keywords, go, here" />
  6. <meta name="Description" content="Your site description" />
  7. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  8. <meta http-equiv="Content-Script-Type" content="text/javascript"> 
  9. <base href="http://collectible.net/trufina/" />
  10. <link rel="stylesheet" href="templates/default/style.css" type="text/css" />
  11.     <script type="text/JavaScript">
  12.  
  13.     <!--
  14.     function MM_openBrWindow(theURL,winName,features) { //v2.0
  15.       window.open(theURL,winName,features);
  16.     }
  17.  
  18.  
  19.  
  20.  
  21.  
  22.     </script>
  23. </head>
  24.  
  25.  
  26. <body>
  27.  
  28.  
  29.  
  30.  
  31.  
  32. <div id="wrapper">
  33.     <!-- // Header // -->
  34.     <div id="header"><a href="index.php"><img src="templates/default/images/header.gif" width="633" height="93" border="0" alt="68 Classifieds" /></a></div>
  35.         <!-- // Header // -->
  36.         <!-- // Top Bar // -->
  37.     <div class="topbar">
  38.             <div id="menu"><strong>
  39.  
  40.             </strong></div>
  41.     </div>
  42.     <!-- // Top Bar // -->
  43.  
  44.  
  45. <iframe  src="http://qa.trufina.com/PartnerLogin/Login/3" id="myFrame"  frameborder="0"  vspace="0"  hspace="0"  marginwidth="0"  marginheight="0"
  46.                   width="893"  scrolling="no"  height="1500"  style="BORDER-RIGHT: black 0px solid; BORDER-TOP: black 0px solid; Z-INDEX: 999; LEFT: 20px; BORDER-LEFT: black 0px solid; BORDER-BOTTOM: black 0px solid; POSITION: absolute; TOP: 150px; LEFT: 54px; visibility:visible;">
  47.             </iframe>
  48.  
  49. .
  50. .
  51. .
  52. </div>
  53.  
  54. </body></html>
I am fairly new to the concept of IFRAMES, so any help would be grateful.

Thanks.
Sep 5 '07 #1
3 5906
Death Slaught
1,137 1GB
Hi all,

I have a webpage with an IFRAME in it.

But some of the pages on my IFRAME which has forms which are really long. So, I want a script or a html code whereby I can scroll to the top of the page once the user finishes with a certain page.

Also, the IFRAME does not have a scroller, but the parent page does.

So basically, putting my question more specifically, is it possible to use a submit button in the IFRAME to scroll to the top of the parent page (i.e, automatically scroll up with the parent page scroller) ?

Also, do i have to put the code in the parent page code? or in the link which the IFRAME points to?

Below is my code:
...
I am fairly new to the concept of IFRAMES, so any help would be grateful.

Thanks.
Well I have know idea what the problem is but I would like to point something out since your using XHTML.

In XHTML every "tag" must be ended including empty tags in this case its your <br> tags. To end it you do this <br /> if you have any questions about XHTML go here its a tutorial on XHTML you should find every thing you need there.

Thanks, Death
Sep 5 '07 #2
pbmods
5,821 Expert 4TB
Heya, Jagann. Welcome to TSDN!

Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.
Sep 5 '07 #3
acoder
16,027 Expert Mod 8TB
See this link on iframes.
Sep 6 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: HolaGoogle | last post by:
Hi, Sorrryy to ask such basic question but i do need your help! Here's what i'm trying to do: In my parent form i'm calling a my Iframe form to get certain value, then depending on that value...
2
by: google | last post by:
I have a HTML file that contains an iframe. The HTML file is served by one server. The iframe contains a link to a completely different server. My question is, can any action in the iframe (such...
2
by: Targa | last post by:
Not sure if this is the correct group for this but I assume this can be done with javascript. Basically, I have a page with a form on it. There is also an IFRAME on the page that has several...
1
by: user | last post by:
I have a parent aspx page with a few iframes. Each of the iframes show an aspx page with a datagrid whose rows all show editable entry fields at all times. The user can enter values into the parent...
2
by: superfreaker | last post by:
Ok, I've been at this two days now and have scoured the group for help to no avail. I have a main web page that contains a form and an iframe. I need to submit the form and set the iframe source...
2
by: P2P | last post by:
Hi I am wondering if someone know of a free cross-browsers vertical scrolling script that - is cross cross-browsers - will call the scrolling content from an external html page or from a...
1
by: Anderh | last post by:
hi all, I have using iframe for call php file called , I wnat submit this form inside iframe from parent form in main page but I codnt make it. <input type="button" id="s" name="s" value="submit...
0
by: tequilamala | last post by:
I have an Iframe in one of the pages i am developing... the iframe is suppose to scroll up and down and the links target the iframe. the problem is that the iframe scrolls side to side on internet...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.