aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes can't access iframe variable but can call iframe method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "can Watch "can New topic
Author

can't access iframe variable but can call iframe method

Matt Kidd
Ranch Hand

Joined: Jul 17, 2002
Posts: 259
I'm trying to access a variable inside an iframe I've set up to make a web service call. The page it loads is just a basic html page that calls a local webservice which in turn calls the actual websevice I want to call.

This works just fine when I try to access a function:



However any attempt to access a variable in iFrame2 does not work. I get no errors though...it just sort of sits there:



This is the webpage inside the iframe itself:





Any ideas?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You should not have to specify contentWindow

Eric
Matt Kidd
Ranch Hand

Joined: Jul 17, 2002
Posts: 259
Eric Pascarello wrote:You should not have to specify contentWindow

Eric


I removed it and I still get that the variable is undefined.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: can't access iframe variable but can call iframe method