hello,
How to call the javascript function to and from the iframe if the domain is different .
Thanks is advanced.
hello,
How to call the javascript function to and from the iframe if the domain is different .
Thanks is advanced.
No modern browser allows this.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
pankaj.ghadge (01-06-2009)
Is it possible to call function via ajax if the domain is different.?
if possible please tell me.
1)how to call the java script function from php.
2)how to specify the full path of url in ajax.
1) The execution of a JS function is always in the browser as far as the client-side script is concerned. So at the moment your PHP code executes it will not execute the JS code (client-side).
2) You can use something like the following to obtain the domain name:
You can replace the 'your_folder' with your original folder structure also the 'your_resource_name' with your correct resource which you want to access from the server-sideCode:var domain = 'http://' + document.domain; var fullpath = domain + "your_folder/your_resource_name";
Bookmarks