Solved

How do I load an HTML page in a iFrame from a Flash button command?

Posted on 2008-06-17
5
240 Views
Last Modified: 2010-04-21
Hi I am trying to load an external page into an iFrame from a flash command.

It loads a page to start and should load additional pages from a flash button.  For some reason it just opens a new page when I click on the button.

Herewith the current HTML code:
<iframe name="load" id="load" SRC="highlights.html" scrolling="no" height="250" width="980" align="middle" frameborder="0"> </iframe>

Flash Code:
btnprof.onPress = function(){
     getURL("profbothma.html", load);
}

Test page url:
http://www.shayamanzi.com/newweb/main.php

I really want this to work because every index section of the site loads additional content from a flash button command.

Designer trying to be a developer!
0
Comment
Question by:realmark
  • 3
5 Comments
 
LVL 49

Accepted Solution

by:
Roonaan earned 125 total points
ID: 21801297
you would need quotes around "load":

getURL("profbothma.html", "load")
0
 

Author Comment

by:realmark
ID: 21801353
Hi Roonaan

I added the quotes nothing changed still opening in a new page instead of the iframe?

This comment had sort of the same problem then what I have, but I am not sure haow to add the code to apply to my situation:

https://secure.experts-exchange.com/index.jsp?srid=k6wRDy1kDwPTfQMfgitGJg%3D%3D&redirectURL=%2FSoftware%2FPhotos_Graphics%2FWeb_Graphics%2FMacromedia_Flash%2FQ_23005152.html&rsid=20&pid=2479732#a20742792

Thanks
0
 
LVL 6

Assisted Solution

by:Iced-evil
Iced-evil earned 125 total points
ID: 21801514
add the below code to the html document in the head section:

<script>
function getList(whatPage)
{
      var theFrame = document.getElementById("load");     // load being the ID of the Iframe
      theFrame.src = whatPage;
}
</script>



and the flash code will become :

btnprof.onPress = function(){
getURL("javascript:getList('profbothma.html');");
}
0
 

Author Comment

by:realmark
ID: 21801558
Ok I feel like a real idiot, both your solutions work, I was testing my outcome locally and was not aware that the files requires server side process to work. I loaded them up and it is working!

Thanks allot guys
0
 

Author Closing Comment

by:realmark
ID: 31467901
Iframe loading solution
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Bootstrap input box width 2 33
Bootstrap 3 with accordion menu 2 45
Help position a graphic properly via CSS 4 23
Max-width on individual images in grid 4 51
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now