Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Pass Variables To iFrame
Old 05-11-2010, 06:04 PM Pass Variables To iFrame
MoForce's Avatar
Super Talker

Posts: 145
Name: Jack Shalt
Trades: 0
I'm trying to pass variables to an iframe (src pointing to another server)

My Site (http://test.com)
Code:
	<script type="text/javascript"> 
	var testvar="testing, testing . . ."; 
	</script>
                    <iframe name="ifrOne" id="frame" style="background:#f7f7f7;" frameborder="0" height="100%" width="100%" src="http://ape.blah.com/ape-jsf/Demos/Shoutbox/demo.html"></iframe>
and you'll notice that the src points to http://ape.blah.com/...

My Other Site (http://ape.blah.com)
Code:
<a href="#" onclick="alert(parent.testvar);return false;">Call Parent Variable</a>
Now if both files were on the same server, this works perfectly fine... but they're not on the same server and it doesn't work. Is there any way of getting this to work?
__________________

Please login or register to view this content. Registration is FREE
- FlUIN
MoForce is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-12-2010, 05:24 AM Re: Pass Variables To iFrame
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
No.
http://en.wikipedia.org/wiki/Same_origin_policy
http://code.google.com/p/browsersec/...-origin_policy
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 05-13-2010, 08:11 PM Re: Pass Variables To iFrame
MoForce's Avatar
Super Talker

Posts: 145
Name: Jack Shalt
Trades: 0
Well that sucks :/

thanks for a straight answer
__________________

Please login or register to view this content. Registration is FREE
- FlUIN
MoForce is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Pass Variables To iFrame
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13924 seconds with 12 queries