Hi,
I have an iframe src which is a dhtml <div> which includes a
javascript function, what I want to do is appendchild the <div id=xxx>
to the parent webpage, I am able to import and append the image to the
parent page. However the script function does not seem to get
recognized via the browser.
E.g when I go mouseover on the image in the parent page it throws the
error "object expected".
Does anyone know how I can import and execute the scriupt functions
too?
Thanks,
Tim
<div id="xxx" style="position :absolute;visib ility: hidden;">
<script>
function actionMe(action ) {
alert(action);
}
</script +>
<div id="Layer1" style="width:27 6; height:110; visibility: visible;
z-index=3;" onmouseover="ac tionMe('alert') ">
<a target="_top" href="http://google.com.au"> <img
src="http://www.google.com. au/intl/en_au/images/logo.gif" border=0
height=110 width=276 alt=""></a>
</div>
</div> 2 2606
Timmy wrote: Hi,
I have an iframe src which is a dhtml <div> which includes a javascript function, what I want to do is appendchild the <div id=xxx> to the parent webpage, I am able to import and append the image to the parent page. However the script function does not seem to get recognized via the browser.
E.g when I go mouseover on the image in the parent page it throws the error "object expected".
Does anyone know how I can import and execute the scriupt functions too?
Thanks,
Tim
Try something like:
var mydiv = parten.document .createElement( "div");
mydiv.onmouseov er = function(messag e) {
alert(message);
};
parent.document .appendChild(my div); // or wherever you want
-Ema-
Timmy a ecrit : Hi,
I have an iframe src which is a dhtml <div> which includes a javascript function, what I want to do is appendchild the <div id=xxx> to the parent webpage, I am able to import and append the image to the parent page. However the script function does not seem to get recognized via the browser.
seen any iframe in proposed code ...
the usual way to call an external function is :
parent.My_I_Fra me.itsFunction( );
or
top.MyFrame.its Function();
or with a pop-up window named *myPop*
myPop.onePopUpF unction();
so ... with the iframe named "myIframe"
<div id="Layer1" onmouseover="pa rent.myIframe.a ctionMe('alert' )"> E.g when I go mouseover on the image in the parent page it throws the error "object expected".
Does anyone know how I can import and execute the scriupt functions too?
Thanks,
Tim
<div id="xxx" style="position :absolute;visib ility: hidden;">
<script>
function actionMe(action ) {
alert(action); } </script +>
<div id="Layer1" style="width:27 6; height:110; visibility: visible; z-index=3;" onmouseover="ac tionMe('alert') "> <a target="_top" href="http://google.com.au"> <img src="http://www.google.com. au/intl/en_au/images/logo.gif" border=0 height=110 width=276 alt=""></a> </div> </div>
--
******** (enlever/remove [OTER_MOI] du/from reply url) *******
Stéphane MORIAUX : mailto:st****** *************** @wanadoo.fr
Aide aux Pages Perso (images & couleurs, formulaire, CHP, JS) http://perso.wanadoo.fr/stephane.moriaux/internet/
*************** *************** *************** *************** ** This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: lordslayer |
last post by:
Helo!
I have a little problem.
My whole page (index.html) is based on one big table and an iFrame. In
this iFrame one of the pages is a picture-thumbnail page. I found a
javascript to open thumbnailed pictures in a really nice new window
(it's not really a window but an iFrame, that can be moved around).
The problem i am facing is that this window that opens picture is
limited to the size of the index.html iFrame. If a picture is bigger...
|
by: Robert Oschler |
last post by:
I have an IFrame whose document is created completely by Javascript code at
runtime. The document in the IFrame accesses Javascript functions in the
top level document. This works fine most of the time. But every now and
then, when I hit the back button, the browser suddenly thinks the Javascript
created document in the IFrame is not from the same domain as the topmost
document, and therefore I start getting "permission denied" errors...
|
by: jeff_m |
last post by:
Hello all,
I'm having an issue with the following:
I have an .aspx page with two html links that call distinct Javascript
functions.
I also have an iframe in the html of this .aspx page. The Javascript
functions are supposed to redirect the iframe to a new page (different
page for each link).
|
by: Chris Ianson |
last post by:
Hi geniuses (or is that genii, or genies)
The challenge is as above really. I have a page with an iframe in it, and
need to call a JS function in the *parent* page, *from* inside the iframe.
(It's for Google Maps, but I won't bore you with the complexities of that,
as it doesn't affect the question).
Mochas kudos to anyone able to solve this widdle.
|
by: sameergn |
last post by:
Hi,
I have HTML form whose target is an invisible IFrame. After the IFrame
is loaded completely,
following code transfers contents of IFrame to DIV
document.getElementById("mainDiv").innerHTML =
test_iframe.document.body.innerHTML;
but this does not seem to carry over the Javascript code from IFrame to
| |
by: Lupus |
last post by:
Hi everyone,
I've got a problem with javascript. I have a webpage which contains
some javascript functions and an iFrame which contains a second
webpage:
<html>
<head>
....
<script....>
|
by: RussianNeo |
last post by:
Hi everybody!
I've got some problems with JavaScript in IE7... I'll try to describe
the situation...
I'm writing a toolbar for IE7. After IE loaded the page, the toolbar
changes the code of the page. It adds some JavaScript code.
The problem is: IE ignores all events and JS is not running... (it
happens only on RSS pages... on other pages it works correctly...)
|
by: kaer |
last post by:
I have to send an XPath request on web page with JavaScript (with
XMLHttpRequest) that has to be executed before. I have no idea on how
to do that. Any pointer is welcome.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |