i have an iframe inside a page(main). In that iframe, i am calling a java script function that is in the main page.This function call is working in Mozilla , IE but not in Safari and google chrome?? Is there any specific reason for that? when i add the function in the iframe it works.
<button onClick="return popup('<span onClick='selectShape(1, 1, 1)'>test<span>');" tabindex=Ɖ' onFocus="setFocusColor(0,3)">....</button> This will work perfectly, but as soon as I need to pass Strings inside the selectShape function, I get stuck.
So the question is, how can I create the following and have it working
I have some javascript that works in Firefox 2 but not in IE 7. In the parent page, a user clicks a link and a new window is opened so that they can maintain some values. When the user is finished, they can click either a save or a cancel button. If the user clicks the save button, I want the parent page to be refreshed and then the child window to close. I have this working perfectly in FF2 but it does not in IE. In IE, the parent page is refreshed but when it refreshes, the screen that comes back is the same screen as the child window. When the child window should close, it instead is being refreshed and comes back as a blank screen. Code:
I want to create a parent class which initialises various stuff and then triggers a 'onStart' function. The idea is that the child classes can then just override this start function and do their thing when everything is initialised.
This is the code I was trying to use but it doesn't work
What I get is the parent start method always being called, not the child one.
I know that using this.onStart is assigning the method to the object not the prototype, so maybe I am mixing my methods here - but I tried it this way and it still doesn't work
What am I doing wrong? Is it not possible for a parent to trigger a method which is subsequently overridden by a child?
Everything works above. The first alert shows that this.status was set to 'error'. However, if I call myClass.getStatus(), I get undefined. How can I get the parseData function to set the variables in the parent function?
I am trying to piece together a bit of form validation. I can not get the two scripts to work together via onsubmit. CardVal works onclick and DataVal works onsubmit.
1. first i tried to call the CheckCardNumber(this.form) from inside the DataValidation.js after it returned true. Is that even possible? I could not figure it out...
2. i tried inserting this into the <form> tag: (subform_validator(this) && CheckCardNumber(this.form));" is that even possible? my javascript skills are not exactly expert so forgive me if i have overlooked something extremely simple... Code:
I know that each of the objects in the array have data because I tried to run each one of the lines above separately without calling the other two and it worked fine.
I'd like to ask how can i ask for a function inside a for loop , if i remove the loop the code works fine but i need it for 10 rows .here is the code...
I have an html input and when a button is clicked, that input's value is passed to a function. However, the value becomes undefined when execution gets inside the function despite NOT being undefined inside the event handler! See below code...
I have an embedded iframe that needs to call a function from a parent. The parent then automatically submits a form. It is written mostly using php, but since php is serverside, I need javascript to gather information in iframes. Here is what I have:
[Code]...
I am using opera, if that makes a difference. Should probably try it with chrome and IE...
Best way to access the functions of an Iframe from the parent of the frame.
I have tried
Code:
And
Code:
Though these didn't work.
In case you are wondering what I am doing is sending an id of a gig in my database when its button rolled over in a flash swf to a Google Map (inside the Iframe 'gigmap) and make the corresponding marker on the map jump. I have it so the iframed map markers send to the flash file on rollover though not the other way round...yet!
Basically I want to have a different background image for every time of the day. The function by itself works okay with onclick or onload placed in body.
function changesky() { document.getElementById("sky").style.background="url(back_morning.jpg) repeat-x";
Trying to call a function on click of an iframe but could not succeed. I want to call a javascript function when user click on an iframe window before it redirects to iframe source. Currently, It will redirect the user to Iframe source page when user click anywhere on iframe. 'onclick' event handler is not available directly with iframe and I tried to implement some solution to create event handler on iframe but did not work out.
I am reciving the (ajax) response res and diplaying in <div id=homepage> , i want to know is there any way to call a js function after i have recived/displayed the reponse inside <div id=homepage> .
I have a simple javascript function loadNPlay('file'),
parent.loadNPlay('file');
on clicke event it simply plays the file in a player in the parent window. with IE and Mozilla its working fine but with Safari, when called from iframe this function doesn't work(it does work, ie loadNPlay(..) when called in the same window, in safari)
I have tried:parent.loacation.loadNPlay(..) as well, it doesn't work.
I want to do exactly as mentioned on the title. You can consider this like surfing pages in traffic exchangers or PTCs. The functionality is exactly like those, though it is not for those.
This is what I have now.
Code HTML4Strict:
Currently, it shows "Page has been loaded" before even showing the "Please wait" part.
I have my events and syntax in the immediate script and they were working fine. But Im trying to move it all into the Script tags and call on them by using the function ID but cant seem to figure it out. here's what I got:
<html> <body> <script type="text/javascript"> function txtAmenity()
I have a script that is working well to detect if the client has acrobat reader is installed or not. I can print out next to the PDF link if the user has or hasn't got the reader. My problem is that i want to call that function and print something out only if the user clicks on the link to see the PDF file. This is where i'm at at the mo
So I create a class: function cMap(mapID){//vars and stuff}
I go and prototype a function: cMap.prototype.loadMap = function(){ //jquery AJAX call }
Now in the jquery $.ajax({...}); call, I use an anonymous function on the "success:" call: success: function(data){ this.member = data; }
My problem is that inside this anonymous function call I'm trying to call a class member of my cMap class to store the data in from the AJAX call, but it's out of scope. So the JS console in FF/Chrome throws errors about bad value/doesn't exist.
How can I access this class member from inside an anonymous function? Or at least what's a good way to go about doing all this?