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


ADVERTISEMENT

Linking To Iframes And Change Content?

Aug 20, 2010

I'm rather new to java scripting and trying to get this done for over a week now. I'm building a complete new site (not online yet) which is done for 99,9% The site consists of:

Index - No frames - Just an entrance of the site with links
main menu
Section1 - 1 iframe ("iframe1") - default src=iframe1defaultsection1content
main menu submenu section1
Section2 - 2 iframes ("iframe1","iframe2") - default src = iframe1defaultsection2content - frame2 contains images that change

[Code]...

View 1 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

Load A Different Index.html Page For Each Different Screen Size?

May 13, 2011

I am trying to load a different index.html page for each different screen size that the browser has. So the page looks best at different resolutions.I am not really able to test it since I haven't finished building all the different resolution index pages yet. I am just wondering if anyone sees any glaring errors in my coding.This is my script:

<script src="javascript/stndlibrary.js">
var screendim=getWindowSize();
var screenwidth=screendim[0];[code]......

View 2 Replies View Related

Link To Page Using Target Blank & Linking Page's Window Location?

Feb 16, 2011

Basically, I have a link that should open the targeted link in a blank page, and upon the link being clicked, the original page's URL should be changed. The reason for this is that the user has to browse information on another website, and then pass the information on to me via a contact form, so rather than make them click back on my tab in the browser, and then find the "Contact" page link to fill in the form, I thought it would a good feature to simply go ahead and load the "Contact" page upon them clicking the link to the external page (which of course loads in a new tab). Here is the code I have in place:

Code JavaScript:
<a href="http://www.othersite.com/" target="_blank" onclick="window.location.href='http://www.mysite.com/contactus.php';">Other Site</a>

This all works fine on my computer, regardless of the browser that I use. One of my partners on this project called me this morning and said that the link was taking him directly to the "Contact" page without opening the "Other Site." This is strange because after I put this in place, I showed it to him and it worked fine. Now, a few days later, and it does not work. He said that he cleared his browser cache, history, cookies, etc. and the problem did not go away. He uses IE8. After he told me it was no longer working, I went to test it myself, and it works fine for me no matter which browser I use (IE8 or 9, Firefox 3 or 4 Beta).

why this might have worked one day and not the next? Is it simply a problem on his computer, or could it be an issue where based on what type of browser you are using, this won't work. Also, I know this is the JavaScript forum, but is there a way to do this in PHP without using the JavaScript onclick event? Obviously, I can't use the header() function since this functionality needs to be present on a link within text of a page.

View 2 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

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 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

Page Linking Trouble

Jul 20, 2005

How can I use Javascript to look at variables passed from another page
using the GET method( a website address) and load that website?

View 1 Replies View Related

Linking Into An Iframe On Another Page?

Aug 2, 2010

I have a simple script that will get the NWS forecast for any zip code and it opens it in a new tab. I would like it to open in an iframe on another page with in my website. I have come close, but not quite all the way yet. This will enter the forecast in an iframe on the same page as the input form. [URL]

How can it load onto this page from the form on the menubar? This menu is common on all the sites pages.

I have seen solutions posted around the internet using javascript for similar issues, but I haven't been able to get any to work in my situation. My javascript skills are - none.

View 9 Replies View Related

Linking To An Iframe In Another Page

Apr 29, 2006

i know how to use javascript to make a specific page load into an iframe but not how to make the page load into the iframe on another page. all i need to know is how to do it for one page then i think i can build the decision structure around it to make it work for more than one link (hopefully).

View 24 Replies View Related

Linking To A Page Section

Jan 26, 2011

I need the following link to automatically scroll to the top of the page when it is clicked.

[Code]....

View 5 Replies View Related

AJAX :: Linking In With PHP In One Page

Aug 11, 2010

I have 3 bits of code, 2 of which I'm pretty sure are right [i know the php works, and the ajax looks fine], but one i'm having trouble with. Basically what I'm trying to do is use a link to call php function [calls a piece of text from a database]. Which worked fine. But then I tried to incorporate AJAX into the script to make change dynamically on the page, and I'm a little confused with it all. I've got the AJAX and PHP, [and an attempted page with a link on to try and call the function with AJAX] but so far it's not doing as it should. Wondered if anyone could show me where I'm going wrong with the whole 'linking together' thing? So far everything I've tried hasn't worked. [hope this doesn't violate the forums 'don't dump your code' rule. But it's kind of all necessary]

[Code]...

View 6 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

Jquery :: Linking To Tab From External Page

Oct 4, 2011

I'm trying to link to a jQuery tab (the second tab) from an external source and havent had much luck so far. I found this on the jQuery UI demo's page:
...select a tab from a text link instead of clicking a tab itselfvar $tabs = $('#example').tabs(); // first tab selected $('#my-text-link').click(function() { // bind click event to link $tabs.tabs('select', 2); // switch to third tab return false;
});

But cant figure out what I should be putting in "#my-text-link
", what is itreferringtoo?
My second tab is called '#tabs-2' so I assume that's what I place into'#example'
?

View 5 Replies View Related

Linking To Function Script In Another Page

Oct 11, 2009

I have a website for tanning salon services. Salon A's page has links for 4 possible equipment choices - (diamond, platinum, gold, bronze levels) on the [I]Sunbeds page. Sunbeds page has 2 iFrames, top and bottom, that are changed by 4 functions - changediamond(), changebronze(), etc. based on the selection. I need to be able to click a link on the Salon page that will take me to the corresponding function on the Sunbeds page...

Here's what I have so far:
Salon A page
<a href="sunbeds.htm?javascript:changediamond()"><img src="images/nr_diam_sm2.jpg" alt="Diamond Level Sunbeds" /></a>
(thru)
<a href="sunbeds.htm?javascript:changebronze()"><img src="images/nr_brnz_sm2.jpg" alt="Bronze Level Sunbeds" /></a>

Sunbeds page
<SCRIPT language="JavaScript">
function changediamond() {
parent.FRAME1.location="sb_top_ct1.htm";
parent.FRAME2.location="sb_bot_ct1.htm";
}
(thru)
function changebronze()
{
parent.FRAME1.location="sb_top_ct4.htm";
parent.FRAME2.location="sb_bot_ct4.htm";
}
</script>
.
..
...
..
.
<a href="javascript:changediamond()"><img src="images/diamond_sm2.jpg" alt="Diamond Level Sunbeds" /></a>
(thru)
<a href="javascript:changebronze()"><img src="images/bronze_sm2.jpg" alt="Bronze Level Sunbeds" /></a>

The links take me to the correct page but not the function. Once I'm there I can select the functions and the iFrame change works great. I'm just at a loss for passing along the data string i.e., sunbeds.htm?javascript"changediamond()

View 3 Replies View Related

Submit Button Linking To Another Page?

Nov 15, 2009

How would I go about creating the coding for a submit button that links to another page? And I would I go about creating the coding for the reset button that resets the page? I go about creating a code to do so, but it never works. Here is the coding I have for the submit button:

<p id="pbuttons"><center>
<input type="reset" value="Reset" />
<input type="submit" value="Submit Order">
</center></p>

View 1 Replies View Related

Resolved Linking An Highlighting Text To A Page?

Jan 24, 2010

i've followed this javascript and i'd like to link the text to one of my page.How do i place the ahref tag in the script.[URL]...

View 2 Replies View Related

Linking To An Image In An Array On An External Page?

Sep 5, 2011

I have put together an image gallery that contains links to each individual image, however, I would like to link to individual images on a separate html document and cannot for the life of me determine how to go about doing this.
rnmix

Code:
<html>
<head>
<script type="text/javascript">

[Code]....

View 1 Replies View Related

Which Method Will Make The Page Load Faster - Calling Code From A .js File 50 Times Slow Down Page Load?

May 12, 2011

I have a single webpage that contains information on all 50 U.S. states. There are 50 links at the top to jump down to the state you want, and at the bottom of the information for each state a Back to Top link.

I'm making the Back to Top link into something more complex, and it will require three or four lines of code.

So that I don't have to repeat the code 50 times, and create a burden when I need to edit it, I want to place it in a .js file and call it x. Then below the information for each state I'll simply have:

Does calling code from a .js file 50 times slow down the page load? Which method would load faster?

View 3 Replies View Related

Jquery :: Linking Directly To Nested Tab From External Page

Oct 17, 2010

I am trying to link to a specific nested tab fromanother page. So let's say I'm on the home page, and I want to link to: productspage > Widgets (parent tab #2) > Large Widgets (Parent tab #2's child tab #3). In other words; Directly to a non-default nested tab, from acompletely different page. Linking to the parent tabs works fine (with a standard anchor link e.g.; [URL]), but I can't figure out how to link to one of their child tabs (besides what is set as default)

Here is a stripped down version of the setup I have (I just typed most of it out, so forgive any obvious syntax errors, my pages on the site all validate):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL]">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Site Title</title> .....

View 6 Replies View Related

Linking Template Page To Open A File In Another Window?

Sep 16, 2011

I am building a static website, and I have images in my index page each image has a title name, how do I make an image clicked to open in a different window if clicked, I have a template page designed to be used for opening an image in a different window if clicked but I don`t know how to configure everything. Secondly, I would want the image to be placed in a particular section in the template page.

View 2 Replies View Related

Load Before Page Loads - Slow Down The Actual Page Load Of The Website

Jan 30, 2009

I have some javascript code that does some GET and POST requests that are required. Sometimes it doesn't fully execute for the user because they close or click onto another page before the javascript is completely done. Is there anyway I can let all of the javascript load first and slow down the actual page load of the website.

View 3 Replies View Related

Using Modules And Call Each Page In Index Page?

Mar 28, 2009

I have developed a new site in PHP.Its done using modules and call each page in index page :[URL]... But my client want a color change on the current page select. So how can I do it using JS ?

View 2 Replies View Related

Link Xml To My Index Page?

May 31, 2009

Can someone direct me to a tutorial that will give me step by step instructions on how to link xml to my index page. I don't quit understand the concept around xml. and how it work with an index page

View 1 Replies View Related

Inserting Pop Up In Index Page

Apr 9, 2004

how to add pop up window in my home page.

View 1 Replies View Related







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