473,770 Members | 5,880 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to call a Javascript function from iframe

23 New Member
Hi,

I have used a rich text editor in my application. I got it from one of the site.all are JS files.

My problem is, i want to call a javascript function from the iframe.

Can anybody help me in this regard
Apr 27 '09
17 5837
Ciary
247 Recognized Expert New Member
what does firebug say?
Apr 27 '09 #11
malathib
23 New Member
I have checked the error console of firefox whcih was located in Tools -> Error Console. It didn't show any error there
Apr 27 '09 #12
Ciary
247 Recognized Expert New Member
try installing firebug, it's way more helpful then the errorconsole.
eg it shows javascript errors :) and ajax requests + it allows you to use breakpoints. then you can easy locate your problem. also try to alert some variables in various places, it also helps troubleshooting
Apr 27 '09 #13
malathib
23 New Member
i have installed firebug and i have tested. but fierebug also is not giving any error in the console
Apr 27 '09 #14
Ciary
247 Recognized Expert New Member
then try alerting variables at certain places. see which part of your code is/isnt executed and why it should/shouldnt be. then, you get the specific location of your error. also try using the breakpoints in firebug.
Apr 27 '09 #15
malathib
23 New Member
Alert only is not working.Here i am not finding any error.

Expand|Select|Wrap|Line Numbers
  1. <form method="post" name="frm">
  2. <script src="richtext.js" type="text/javascript" language="javascript"></script>
  3. <script src="config.js" type="text/javascript" language="javascript"></script>
  4. <script>
  5.     <!--
  6.         initRTE('This <span onmouseover="top.frames[0].test()">These </span>is an <del>example</del> <ins>of </ins>a', 'example.css');
  7.     //-->
  8.     </script>
  9. </form>
here initRte will initialise the editor and load the content that i am passing as first parameter.
Apr 28 '09 #16
Ciary
247 Recognized Expert New Member
then there must be a logical mistake in your initRte. normally, alert always works. if it doesnt, it means you never get to that point. so, i dont know where you placed your alert(s) but try putting it in other locations till you find a place where it does appear.
Apr 28 '09 #17
acoder
16,027 Recognized Expert Moderator MVP
Have you got a link to your application?
Apr 28 '09 #18

Sign in to post your reply or Sign up for a free account.

Similar topics

5
94261
by: Christian Radermacher | last post by:
I have document with an iframe in it. I'm able to call a javascript function in the main-document from the javascript inside the iframe-document. I have difficulties to do the other way round, i.e. to call a function in the iframe-document from javascript in the main-document. TIA Christian
26
45523
by: Dave Hammond | last post by:
In document "A.html" I have defined a function and within the document body have included an IFRAME element who's source is document "B.html". In document "B.html" I am trying to call the function defined in "A.html", but every attempt results in an "is not a function" error. I have tried to invoke the function using parent.document.funcname(), top.document.funcname(), and various other identifying methods, but all result in the above...
5
2210
by: Tudor Tihan | last post by:
Hi, This is my first post here, so please be kind. I have tryed to make a javascript html page loader by using an invisible <IFrame> and some javascript variable text passing between entities. This seems to brake the CSS after some depth, or perhaps I am not understanding something.
8
3674
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
18
43566
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.
3
3596
by: KaNos | last post by:
Hi, "robot script pages" are html+javascript pages, can be played in aspx player. So in this tech, robot call aspx player's function (an interface is sheared) and wait a result synchronously with a javascript method. I try it with GetCallbackEventReference but this tech works async. Could I use a javascript function with a sync call ? Thaks for responses,
2
15800
by: cont | last post by:
Hi I have the following simple page: <HTML> <TITLE>Test</TITLE> <HEAD> <script language="javascript"> function doSubmit() { alert('test'); window.frames.item(0).updateParent();
1
3870
Fuhrer
by: Fuhrer | last post by:
Hi all, i'm working on a page that contains 2 Frames, in the first Frame i have an iframe included. My problem is that i'm trying to call a javascript funtion located in the iframe from the second Frame but it does not work: in the second Frame: parent.mainFrame.datamain.hidemenu();
4
3875
by: Ty | last post by:
Hello all, I am creating a web site with Visual Stuido 2008. I am trying to use a java script file to create a busybox for login from this page http://blogs.crsw.com/mark/articles/642.aspx. I am using a master page senerio. The erro I'm getting is 'busyBox' is not a member of 'ASP.login2_aspx'
6
2633
by: Revathi Balakrishnan | last post by:
i am trying to disable some of the anchor tags which are linked with particular onmouseover and onmouseout events.i have written a javascript function.when i called this function on load of the document body, it is able to disable the tags.But when the body of the page has iframes, this script is unable to disable the tags with in the iframes. since "document.getelemetbytags" is not returning the anchor tags with in the iframe.so i need to put...
0
9432
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,...
0
10232
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10059
jinu1996
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...
1
10008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8891
agi2029
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...
0
6682
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();...
0
5454
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3578
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2822
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.