473,396 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 5934
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...
0
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,...

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.