Loading Page That Contains Two IFrames?

Jan 24, 2011

I have a problem because I don't know nothing about Java Scripts. In the [URL] I have load a page that contains two iframes, the first (left) is the menu and the second (right)is the explanation for each one of the menu tabs. No problem so far. The problem is that I need that the menu tab keeps highlighted while you see the relative information on the right side.

View 5 Replies


ADVERTISEMENT

Keeping Iframes From Loading

May 19, 2005

<pre>
<html>
<head>
<title>Snapitup Script</title>
<style type="text/css">
*{margin:0;padding:0;}
</style>
<script type="text/javascript">
/* script made by gmn17@hotmail.com &copy; 2005 free to use */
/* keep this script credit intact,thanx, a script to show/hide */
/* any html in IE Safari and Firefox, if you wish to preload */
/* just put it in the target, stripped out table and eval */
/* statements from 2 scripts and combined them, then altered */
/* part of a www.shawnolson.net script took eval statement out */
function snapitup(target,statement){
string = 'theTarget = document.getElementById("'+target+'");'
if(theTarget != null){
theTarget.innerHTML = statement;
}
var el=document.getElementById(target);
var theTarget=document.getElementById(target);
if(el.style.display!="none"){
el.style.display="none";
}else{
el.style.display="";
theTarget.innerHTML = statement;
}
}
/* use this to preload content */
function hideShow(target){
theTarget = 'document.getElementById("'+target+'");'
var el=document.getElementById(target);
var theTarget=document.getElementById(target);
if(el.style.display!="none"){
el.style.display="none";
}else{
el.style.display="";
}
}
</script>
</head>
<body>
<a href="#null" onclick="snapitup('row22','<iframe src=http://www.yahoo.com width=100% height=500px frameborder=none style=border:0></iframe>')">Category 1</a><br>
<a href="javascript:void(0);" onclick="hideShow(&#3933;')">Category 2</a><br>
<div id="33" width="100%" style="display:none;"><img src="tn_1_books.gif"></div>
<p id="row22" width="100%" style="display:none;"></p>
<a href="javascript:void(0);" onclick="snapitup('row11','<table id=nTable border=2 width=500 height=400 cellpadding=0 cellspacing=0><tr><td>Data One</td><td>Data Two</td><td>Data Three</td><td><a href=# class=button>More</a></td></tr></table>');">Category 3</a><br>
<div id="row11" width="100%" bgcolor="#b9b9b9" style="display:none;position:absolute;left:100px;top:100px;"></div>
</body>
</html>
</pre>

Ok first the bad, it will not work from a stylesheet, you have to use style="display:none" all over the place, I will try to fix that without adding more than 2 lines to the script somehow, I hope. you can not have line breaks in the innerHtml statements in your links(I think that's normal anyway). javascript:void(0); will not work for an iframe, you have to use #(or #null to keep from clicking up to the top of the page) for the hrefs, I don't know if that is a bad thing or not, there has to be something better than both of those options. now the good, if you do not have access to the head of a page, everything works from the body of a page. it is good for making ul/ol tags for a vertical menu without that complicated scripting having to differentiate ul/ol text and li links in those scripts for just a simple menu, the ecmascriptmenu is the only one that makes sense to me, hope he gets his server fixed. the script seems to work with or without a doctype in IE6 firefox and safari. people always wonder why I try to make these type of scripts, I usually maintain long lists of links so I like to provide small previews(iframes that do not load until clicked) for each link, the best part is that IE firefox and safari react to it flawlessly unlike most other types of scripting, one script had an eval statement that gave me tons of trouble taking it out and the other script I took out a server sql proprietary call to a rowid for a table and made almost any html element be a target(a p tag for instance).
here at :

View 9 Replies View Related

Jquery :: Avoid Loading JS File In IFrames

Nov 17, 2010

Is there any method to avoid loading js files of iframe. For example, if I loaded jquery from the main (parent) page, and don't want to load an 'extra' jquery of iframe. How could it possible? Generally, it is about calling javascript functions in iframes, which is already loaded from parents.

View 4 Replies View Related

IFRAMEs Show The Same Page

Jan 6, 2006

I am using struts frame work and in one of the jsp pages I have a bunch of IFRAMES like this.(This is in logic iterate and the recordId is incremented with that iteration) ....

View 3 Replies View Related

IFrames - Change SRC To Display New Page

Nov 24, 2010

I have an Iframe and some links to different pages. I have the code set up so that it changes the "src" to display the new page. The reason I have it set this was is because I want to be able to manipulate the content in the Iframe. I want to be able to hidden a portion of the new page once it is rendered in the iframe. This is what i have so far. Basically I need my intoIframe function to execute only after the has fully executed. How I accomplish this

Code:
function completeView(){
var tds = document.getElementById("alinks");
var link = tds.getElementsByTagName("a");
for ( i=0; i<link.length - 1; i++){
if ( i > 0){
link[i].onclick = function(){
showDoc(this);
return false;
}}}}
addLoadEvent(completeView);

function showDoc(whichDoc){
if (!document.getElementById || !document.getElementsByTagName || !document.getElementById("viewer"))return false;
var source = whichDoc.getAttribute("href");
var placeholder = document.getElementById("viewer");
placeholder.setAttribute("src",source);
}

function intoIframeUP(){
if (window.frames[0] != null){ alert('Frame is here');}
var mine = window.frames[0].document.getElementsByTagName("body")[0].innerHTML;
var sharepoint = window.frames[0].document.body.innerHTML;
alert(sharepoint);
}

View 2 Replies View Related

Refresh Parent Page With Iframes On Any Click?

Jan 28, 2009

I have a PHP page with an iframe where I load PERL/CGI content. Now of course when I click anything on the parent page the iframe refreshes with it.

But what I really want is to have the parent page refresh when anything inside the iframe is clicked. Of course the iframe should not refresh and go to initial view then. So basically I am looking for a way to have ONLY the parent page refresh every time something in the frame is clicked or to have the parent page and the iframe refresh but with the iframe retaining the last user position.

View 4 Replies View Related

Set Background-color On Page Load When Using Iframes?

Jan 27, 2011

I've tried the following:

<script type="text/javascript" language="javascript" charset="utf-8">
// <![CDATA[[code]......

I've tested the if statement and the set background code, using a button. I'm guessing it fails since there is no background when the script runs.

View 2 Replies View Related

Linking Index Page To Load Up With Two IFrames

Mar 4, 2011

I need guideline with a script I am using for a link on my index page to load up a different page with two iFrames on it and at the same time load up different pages in each of these iFrames. I have achieved this with only one iFrame so far with this script:

1. <script type="text/javascript">
2. <!--
3.
4. function loadIframe(){
5. if (location.search.length > 0){
6. url = unescape(location.search.substring(1))
7.
8. window.frames["main"].location=url
9. }
10. }
11.
12. onload=loadIframe
13. //-->
14. </script>
15.
16. <a href="mainpage.html?about.htm"</a>

So basically when I click on Link1 on Page1 it takes me to Page2 with iFrame1 with a page loaded and iFrame2 with nothing loaded whereas I would like Link1 on Page1 to load up Page 2 with two different pages loaded in the iFrames all at the same time.

View 1 Replies View Related

JQuery :: Basic Page Loading DIV - Full Window DIV That Sits Above All The Content With A Loading Icon

Oct 21, 2009

I have a site that is very jQuery and image heavy. The main sections of the site link to sections that are built with several Tabs, and as it loads, you briefly see all the content load and then it is hidden by the Tabs code.

The plan is to have a full window DIV that sits above all the content with a loading icon that plays until the entire page loads, and then it fades down.

After some hair pulling and research I have code in place that does exactly as I ask, however it does not seem to work in IE6+7. It works in all other browsers.

The current code is:

CSS for the loading DIV is:

A working link is [url]

View 1 Replies View Related

Iframe :: Each Browser Shows The Loading Icon, As If A Page Was Loading?

Mar 19, 2010

I have a lot of javascript functions that request information from an iframe hidden on the page. I see other sites do this, but their browser does not do the loading action (like the processing circle in Firefox). When I do it on my site, each browser shows the loading icon, as if a page was loading. Is it possible to not have this?

http://bit.ly/cv1YqN

That is a sample link. Go down right side of page where you see three buttons: Trailers Featurettes Clips.Those return iframe information to work.

View 4 Replies View Related

Pre-loading A Page With Loading Image?

Oct 13, 2009

I have created a party-events website. Which displays a lot of dates of events. As you might understand this page takes some time to load. Therefor I want some of loading image to be displayed while the page is loading. Anybody has an idea how to pull this of? I don't know how.

In detail: People come to my website. They click on "events" and a loading.gif pops up and and makes the background darker. After the page has completely loaded the loading image disappears and the website shows.

View 3 Replies View Related

Changing Elements In Page "onclick" With IFrames?

Jul 19, 2010

I'm new to this forum and am trying to find answers to a few issues I've been having. I'm building a website for my music (I'm a novice with web design so bear with me) and I'm having trouble with this page - [URL]...

As you can see, when you click on the "Filter By" buttons, the relevant gallery opens in the iFrame and the Titles (such as Latest Photos and Live Photos) are altered onclick by using the changeText function. The problem with this is that when I use the browser "Back" button, the iFrame goes back, but the "changeText" doesn't go with it.

So I've been trying to find solutions to this. Someone on another forum suggested hiding the album titles in a hidden element on each gallery page, and the title in when you click on the Filter By buttons. They suggested first putting some code such as: <input type="hidden" name="AlbumTitle" value="Live Photos">

[Code]...

View 9 Replies View Related

Cross-browser / Multi-browser "Loading Page" When Page Is Loading

Apr 29, 2009

Like title says, I'm looking "Loading page" -notice when page is loading - made by Javascript. If you know Cross-browser/multi-browser example

View 1 Replies View Related

Loading External JS Before Page Page Load (specific Span Element)

Jul 19, 2010

My goal is to load the JS for a specific element before displaying that element. I integrated a third part script, and it works well. I set the timer here:

The JS is in my heading as <script type="text/javascript" src="countdownpro.js"></script>

About mid-body I have: <span id="countdown1">2010-07-20 00:00:00 GMT+00:00</span> which allows for the setting of a target date to countdown to.

When the page first loads it shows the above long format target time, until the js/meta tags kick in to modify it to just show the actual countdown as 00:00:00.

I have attached countdownpro.js to this post. I tried shifting the function CD_Init() to the top of the script, and also appended it inline with the .html. I tried setting the big external script to "defer", but neither arrangement worked. I also tried placing the src file right at the top.

View 2 Replies View Related

JQuery :: Make Iframe Page That Loading A Page From Other Site?

Oct 11, 2009

i want to make a iframe page that loading a page from other site. I have try "jQuery iFrame Sizing" to set auto height in iframe... but it is failed.

This is my code :
-------------
on Head
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/iframe.js"></script>
on Body

[Code]....

View 1 Replies View Related

Loading The Menu Item Page In The Center Of Main Page?

Mar 22, 2009

I'm designing a web page, Having a banner on top, then a search option following it.There is a menu item list below it on to the left.And the content of the links of those menu item should get loaded in the center of the page.And a footer having some copyright info.All these are in div tags. The problem is when i click on any menu item it should be loaded in the center div tag.Ive tried using Iframes but there is a scrollbar coming only in that area of center div tag.I don't wan't this to happen.Based on the size of the html page to be loaded the div tag size should increase, and so the whole page.Have tried using Ajax but not working.

View 1 Replies View Related

JQuery :: Use A Single Copy Of JQuery On The "top" Page In An Application With Multiple, Child IFrames

Mar 31, 2011

We have a verylarge web application that has a top page with multiple, childIFrames living "above" it. We are beginning to use JQuery and wonder if it might be possible to have a single copy of JQuery residing on the top page and reference it from multiple IFrame child pages. The goal is to reduce the memory footprint by avoiding the need for a copy of JQuery in each child IFrame.

View 1 Replies View Related

JQuery :: Load A Page In DIV Of Loading Page Using It?

Oct 10, 2011

I am loading Default2.aspx from MainPage.aspx. i need to display the condense of Default2.aspx in the Div(maincontent) which i declared in Default2.aspx.

with the below code iam getting the DIV object of Default2.aspx from MainPage.aspx.

but the Default2.aspx is not showing ,can any one correct the below code. code...

View 2 Replies View Related

Loading Image : Page Is Not Redirect To Next Page?

Aug 21, 2011

i had a loading image that appears while i submit the form but the problem is that my page is not redirect to next page.here is my code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>[code]............

View 1 Replies View Related

Page Loading!

May 2, 2007

is there any way to control the page while it loading? for example first i want to load firstly the body next, header , last footer !!which i will use it in portal big site?

View 2 Replies View Related

Page Looks Like It Is Still Loading / What To Do?

Aug 27, 2011

I have an entirely javascript page that once it is done it still looks like it is loading. This is more of an annoyance than anything harmful. The page can be viewed at http://mikedombrowski.com/mRNA.html

View 4 Replies View Related

Loading Another Page Via An OnClick()

Jul 23, 2005

I would like to use an onClick() event handler to load another page but
I am not sure if it can be done, and if it can, how to do it;

<li onclick="loadMyPage('http://209.204.172.137/)">
</li>

I need to use the onClick rather than using an "<a>" tag.

View 2 Replies View Related

Page Not Loading In Open Pop Up

Jul 23, 2005

I am opening pop up windows from a hint button on several pages in my
site. If the user leaves the pop up window open from a previous page, I
would like the new hint to open in that window.

I thought that by giving the pop-ups the same name it should work (see
code below) but it isnt. Every time a user clicks on the hint button
the popup opens in a new window regardless of the fact that a previous
hint window is open .

here is my code that calls the function from an html page (there is
also some rollover code in it):

View 4 Replies View Related

How Do I Change A URL W/o Loading A Page?

Jul 23, 2005

Is there a way I can change the URL address in JavaScript without
loading the page? I can't use document.URL or window.location because
they force the browser to reload after the URL is changed.

I want to do the equivalent of manually typing in a URL without
hitting the enter key.

View 1 Replies View Related

Delay While Page Is Loading

Jul 20, 2005

I've got a script that caches 52 card images and displays the
appropriate card based on user input. It works fine, except when the
page loads for the first time the results are unpredictable until a
few seconds elapse. My guess is that it's taking time to cache the 52
images. Is there any way to delay the loading of the page until all 52
images are cached?

View 1 Replies View Related

Loading Multiple On The Same Page?

Jul 26, 2010

I have a total of three different JavaScripts that need to be loaded when the user opens the page; let's call them script_a.js, script_b.js, and script_c.js

script_a.js and script_b.js each need to be loaded on every page; however, they do very different things (one displays text, the other creates buttons), and in the interest of readability and ease of editing later, I want to keep them separate.

script_c.js only needs to be loaded on one page; there will be a few variants (script_c2, script_c3, etc), but again, each of them only needs to be loaded on a single page.

The scripts are also too large and unwieldy for me to put them directly into the HTML (basically because I have to do a lot of different switches, and conditionals, and output formatting).

At present, the only way I know how to load a JavaScript is to use window.onload, so obviously I'm getting into the issue of competing onLoads.

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved