473,325 Members | 2,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

function works in ie, ff sometimes

Hi, maybe a piec of cake for more educated Js-peeps, but here's the prob:

function:

Expand|Select|Wrap|Line Numbers
  1. function schrijfopt(wat, waarde, waar){
  2.  
  3.  
  4.    var url = 'edit2.php';
  5.  
  6.       var pars = "wijzig=fg";
  7.    var myAjax = new Ajax.Request(url, {method:'post', postBody:pars});
  8. alert(pars);
this works:
Expand|Select|Wrap|Line Numbers
  1. schrijfopt('padding', '10', '2'); 

this works, but not in firefox
Expand|Select|Wrap|Line Numbers
  1. function DoSomething( editorInstance )
  2. {
  3.  
  4. var wie = FCKeditorAPI.GetInstance('1') ;
  5. if (wie.IsDirty()){
  6. var cont = wie.GetHTML();
  7. wie.ResetIsDirty(); 
  8. schrijfopt('padding', '10', '2');
  9. }
  10.  
  11. }
  12. function FCKeditor_OnComplete( editorInstance )
  13. {
  14.     editorInstance.Events.AttachEvent( 'OnSelectionChange', DoSomething ) ;
  15. }
  16.  

somebody knows what could be the problem, i don't see it and whats also strange, that i do get the alert
thx
Nov 1 '06 #1
5 1295
the call is made from an iframe, could that be the problem?
Nov 1 '06 #2
iam_clint
1,208 Expert 1GB
It could be because its from an iframe firefox doesn't handle iframes too well from the past i've noticed.. But i am not sure what the problem is does firefox throw up any javascript errors?
Nov 1 '06 #3
nope, no errors at all
it does something with the function because i get the alert, but then, it doesnt execute the ajax post
Nov 2 '06 #4
Well, i guess the problem is not the function.
When i put the ajax request in the iframe, it still wouldnt fire..

is there a problem with ajax and iframes?
on firefox, that is. (works well in ie)
Nov 2 '06 #5
apparently there is..

miraculously setTimeout() did the trick..
Nov 2 '06 #6

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

Similar topics

3
by: Andrew DeFaria | last post by:
I have the following php code: function Today2SQLDatetime () { $today = date ("Y-m-d H:i:s"); print "date (\"Y-m-d H:i:s\") returned $today<br>"; return $today; return date ("Y-m-d H:i:s"); }...
7
by: Gregor Peter | last post by:
Hi folks, I've got a problem with calling a memberfunction from a inheriteded class. It seems to work sometimes and sometimes not. There is a Class 'Robot' that is derived from a foreigen...
2
by: DavidGeorge | last post by:
I'm having trouble with what seems like a very simple function, although it's the first I've used in Access so I could have it all mixed up. It still works fine in forms I designed until...
64
by: Morgan Cheng | last post by:
Hi All, I was taught that argument valuse is not supposed to be changed in function body. Say, below code is not good. void foo1(int x) { x ++; printf("x+1 = %d\n", x); } It should be...
10
by: David Fort | last post by:
Hi, I'm upgrading a VB6 app to VB.net and I'm having a problem with a call to a function provided in a DLL. The function takes the address of a structure which it will fill in with values. I...
28
by: Larax | last post by:
Best explanation of my question will be an example, look below at this simple function: function SetEventHandler(element) { // some operations on element element.onclick = function(event) {
17
by: DanielJohnson | last post by:
how to use the combination function in python ? For example 9 choose 2 (written as 9C2) = 9!/7!*2!=36 Please help, I couldnt find the function through help.
2
by: WGW | last post by:
Hello all, I need another set of eyes cause it just isn't working, no matter how identical I make it. The initRotator function works when called by itself, but when adding another function, only the...
4
by: Immortal_Nephi | last post by:
I had a lot of research to see how function pointer works. Sometimes, programmers choose switch keyword and function in each case block can be called. Sometimes, they choose ordinary function...
53
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.