Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


calling function



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> JavaScript Forum
View previous topic :: View next topic  
Author Message
LukeJrs



Joined: 12 May 2007
Posts: 1

PostPosted: Sat May 12, 2007 8:14 am    Post subject: calling function Reply with quote

At my job we have intranet web page, Once i'm in the webpage we look customer information by their phone number after we put their phone number and hit enter. I get button to press to review their account.

The thing i'm trying to do is use Iframe as scr=mywebpage that i have for work then use the javascript that is on that iframe webpage from my work.


Like

here a example

client.html

<input type="button" value="Client" onclick="window.parent.innerframe.handleResponse()">

<iframe id="innerframe" name="innerframe" src="server.html"></iframe>


here is the server.html

<script type="text/javascript">
function handleResponse() {
alert('testing')
}
</script>

<input type="button" value="Server" onclick="handleResponse()">

as you notice the click work even the javascript is loaded on serverside but i was able to call it as a resource in my iframe.

here another one example

<input type="button" value="Client" onclick="window.parent.innerframe.handleResponse()">

<iframe id="innerframe" name="innerframe" src="http://developer.apple.com/internet/webcontent/client-simple.html"></iframe>

Now this javascript won't be able make the call because of something not right i'm trying to call a function from website http://developer.apple.com/internet/...nt-simple.html that inside the html have this source

<html><head><title>Remote Scripting with an IFrame - simple client page</title>

<script type="text/javascript">
function handleResponse() {
alert('this function is called from server.html')
}
</script>

</head>
<body>

<p>This is our client application. We want to be able to make calls to the server from this page without reloading.</p>

<iframe id="RSIFrame"
name="RSIFrame"
style="width:0px; height:0px; border: 0px"
src="blank.html"></iframe>

<a href="server.html" target="RSIFrame">make RPC call</a>

</body>
</html>


I would like to call this function handleResponse() from my client.html window that I have iframe to connect a webpage

The thing is I want call javascript function from different site and just input a button to call it out from my client.html even though the javascript is not in my client is just in the website i'm linking to and trying call their function with a button on my client.html
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> JavaScript Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap