473,624 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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 5966
Death Slaught
1,137 Top Contributor
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 Recognized Expert Expert
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 Recognized Expert Moderator MVP
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
41196
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 enable or disable my submit button in my parent form without using any refresh/reload or submit button in my form. Looks realy simple but i don't know how to get it work. actualy, i've been able to populate listbox,text boxes in my parent with...
2
1848
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 as a form submit) cause the look and feel of the containing HTML to change, such as I want some table elements in the parent (that contains the iframe) to change or disappear. For example, a HTML file has a table with 3 rows, the first and...
2
2405
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 form fields which contain the results of a database query. I need to be able to submit the form and have the fields in the IFRAME submitted along with it. Is there a way to do this with javascript?
1
2665
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 page's form and into the iframes' datagrids and then press a save button on the parent page. My question is: from the parent's Save_Click event in the code-behind, how do I call the SaveGrid procedures I've written on each of the iframe pages...
2
17073
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 file in one action and have it work with both IE and other browsers. So far, i have not had any luck. Form name "fmUpload", frame name, "progframe".
2
2955
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 url page
1
3060
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 ID" onClick="javascript:submitPer();"> <iframe name="form11" src="perSearch.php" frameborder="0" width="680" height="150"></IFRAME><br> this is javascript function which should submit the form inside iframe function submitPer(){ ...
0
7767
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 explorer but not on firefox. I dont want it to scroll sideways. in index.htm the iframe is at the bottom of the code. index.htm <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">...
0
8236
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8621
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8475
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7159
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2606
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.