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


ADVERTISEMENT

Delay Display Of Multiple Iframes?

Jan 7, 2010

I found this script on this forum and I'm trying to modify it so it will open one iframe after so many seconds then open a second iframe after a few more seconds. How would you do that?

<script type="text/javascript">
window.onload = function() {
setTimeout(loadfunction,20000)

[code].....

View 2 Replies View Related

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

Replace / Change Links Within Iframes?

Jul 2, 2010

I've got an iframe on my page that displays my affiliate's webpages (located on their domain).

Two concerns: First, all links within the iframe reveal their domain name in the status bar and in the page source, i.e. <a href="affiliate.com/buy.htm">.

Second, the links in the iframe have target="_blank" which opens new tabs/windows, also exposing their domain to my customers.

Would it be possible to replace all instances of "affiliate.com" inside the iframe to "mysite.com"; whereas, "mysite.com" will be a proxy forwarding requests to "affiliate.com"? Keep in mind that these elements do not have ID or Class.

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

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

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

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

Change (value) Display On Button?

Sep 27, 2010

I'm trying to get button to change word + triangle.This ▼ or ▲ is Hex for triangle.I hard code this

<input name="b" value="More▼"

page loads, the value shown on button is

"More and a triangle" (as I would like) but when I then do

document.getElementById("moreBtn").value="Less▲"

the button displays "Less▲"; (ie no triangle) why? Is this possible?

View 7 Replies View Related

Change The Display Properties Of A Class

Jul 28, 2006

can u change the display properties of elements in a certain class?

View 1 Replies View Related

JQuery :: First Change Img Attr Src And Then Display?

Nov 2, 2011

I have two img tags and a jquery script which changes the value of the src attribute of each one picked from an array of images and alternatively set the display to block and assign a decreasing z-index.

The problem is that when the hidden image pops up, it seems as if, at first, set the css display to block and then change the source of the file as, for a second, it hangs to the previous loaded picture. Well I thought it was easy to manage by setting a delay but instead seems not to do anything. And then with a setTimeout but it doesn't work as expected..

[Code]...

View 1 Replies View Related

JQuery :: Change DatePicker Display Changes?

Sep 27, 2011

I am working with the Jquery datepicker it works fine.But i need a some changes.For eg this is my datepicker:it works fine but changes i need like this previous month dates also should combine and show me like this.which i have rounded by black box.how to implement this and also i need to differentiate that's dates?Suppose if my way of asking questions is wrong please correct me also.

View 1 Replies View Related

Using JS Cookies To Change Elements To Display:none

Aug 16, 2004

I've been trying to hack together a certain javascript lately, but as a complete novice I don't quite know how to achieve what I want.

Basically, I have a few information-request forms on my site. Once someone has submitted the form, I'd like the confirmation page to set a cookie, using JavaScript. Once the cookie has been set, I'd want to be able to hide page elements that have a particular ID or CSS class. Obviously, I can hide these elements using display:none. But, that only needs to apply to these elements if the cookie exists. If there is no cookie, the elements obviously need to show.

I've done quite a bit of research about JavaScript and cookies, but unfortunately have not found anything that works "out of the box" or that I understand well enough to hack together. What terms or concepts should I be looking for to learn how to do this? Or better, is there a script already out there that will work? If I could only find a working example, I think I could understand much better.

View 3 Replies View Related

Edit A Web Page Using A Editor And Display New Content In Same Page

Aug 18, 2010

I am developing a web application in which I need to integrate a javascript/html editor on some of the web pages and then provide 'Edit' buttons on those web pages so that users can edit the content on that partciular html/jsp page (like editing in wiki pages) and then, when they add some content and click on submit button, the new content should appear on the web page with all the formatting (i.e. bold, italics, color and so on) which was applied by user when he was entering the text.

Now, I need help for the below issues:

1. Suggest me a good javascript/html editor (freely downloadable) which I can use to integrate with my web pages.

2. Once the user has entered some content using the above javascript editor, how to make that content reach the server and update the corresponding web page.

View 1 Replies View Related

Add Timer To Display Panel On Page First Page Load Only

Aug 8, 2011

what it does is that it hide and show a panel by slidint it to the left.But my client want that on page load the panel opens automatically for about 2-3 seconds just to let users know that its here. But when the panel finished showing the button to open it again doesn't work.

View 3 Replies View Related

Mouseover Text To Change Display Image

Sep 23, 2009

I am new to JavaScript and I am having a difficult time finding what I thought would be easy to find.I have 4 text strings that when a user runs his/her mouseOver, I'd like to display a corresponding picture in a display area. I thought that would be easy enough. However, it gets a bit complicated for me since I am also using CSS to position the display area. For some reason all I can find out there are examples using HTML tables for display image positioning. I don't want to use tables. I'm not sure if this will make a difference but my style sheet is external. Also, the text does not link/go to another page.

View 6 Replies View Related

Radio Buttons Change Image Display

Mar 23, 2005

I am having trouble getting the following code to work. I just want to make the script in the head work, the html in the body is to stay as it is. I want to use an array. I can make it work very well without an array, using separate conditional statements for each radio button, but that is cumbersome. Can someone please tell me what I am doing wrong with the script in this code. I have stripped the page down to the bare essentials for ease of viewing. Code:

View 3 Replies View Related

Change The Onmouseover Event To Display A Hello World Alert?

Feb 14, 2011

I hope this is relatively simple. I've looked around for the answer, but I thin think the search terms (update onchange event) are a bit too common...

document.getElementById("tester").innerHTML= "hello";
document.getElementById("tester").onmouseover = "alert('hello')";

You see I'm trying to change an event like I'd change a property. The first will change the text to hello. I'd like the second to change the onmouseover event to display a hello world alert... but it doesn't seem to do anything.

View 12 Replies View Related

Radio Buttons Change Html Display Style (IE)

Jun 17, 2010

In an html form, I want a certain field to be invisible when "no" is checked and visible when "yes" is checked.

This is my code:

html:

<form action="pageName.html" method="post" name="formName">
Question?
<input name="radioBool" type="radio" value="1" onchange="dispField('textInput');" />yes

[Code]....

This seems to work perfectly across all browsers except for IE (latest version).

In IE the only problem is that the radio buttons have to lose focus before the span will change to visible. I would like the "specify" field to display immediately after the radio button changes to yes, rather than waiting for the buttons to lose focus.

View 2 Replies View Related

JQuery :: Superfish Customization: Change Display Height Of Submenu?

Sep 30, 2009

I am new to jQuery & Superfish, but it seemd like the most logical way to do a quick prototype for a menusystem. I am trying to create a verertical menu system (using superfish-vertical). However, I'd like to tweak the behaviour of the submenu, and have been unsuccessful so far. Here's what the current solution does (straight out of the box) assume menu item 3 is hovered over:

[Code]...

View 2 Replies View Related

Change The Display Property Of Specific Divs Using Select Boxes

Feb 23, 2009

I'm attempting to change the display property of certain divs depending on the criteria of multiple select boxes.

I got it to work by GetElementsByTagName('div') but it then selects all divs rather then the select few i actually want it to work on. I tried changing the selection to GetElementsByName but this doesn't work, why i don't really know.

I've dumped the source code below:

Code:

View 4 Replies View Related

JQuery :: Superfish Vertical Menu - Change It To Display Submenus On Left?

May 3, 2009

Love this menu. This menu will be appearing in module on right hand side of page. So I need the submenu to display on left, not right. So how to make this a right to left menu? I've played around a bit and have had no luck yet. I've used the navbar on another site and I'd really like to use this vertical menu too.

View 1 Replies View Related

Change Colour - Display School Timetable - Read The Current Time

Jun 2, 2010

So I have to display my school timetable, read the current time, and using javascript highlight the current lesson.

My teacher says i must use about 3/4 functions not switch cases.

View 6 Replies View Related







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