• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trouble getting IFRame Call to work

 
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using http://ajaxify.com/run/iframe/ as an example.

I need to populate an iframe with the results from a webservice call. so far I have this and I'm at the point that the form will not submit. I've noticed that innerHTML does not give me actual HTML but instead textContent does. However like I said I still can't get the form to submit. Is the site wrong or am I missing something?






I was using the alert to see if I got correct results but I just kept getting [object text] or something similar.

please any help appreciated. I would use a library like prototype or something else but the way our environment is set up I keep running into the same-origin policy problem.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
why in the world are you setting the content of an iframe with an Ajax call when you can just set the iframe with the url to begin with?

Eric
 
Matt Kidd
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Eric Pascarello wrote:why in the world are you setting the content of an iframe with an Ajax call when you can just set the iframe with the url to begin with?

Eric



because that's what the example said to do.

In all seriousness I'm trying my damnedest to get this to work with just using an URL but I keep running smack into the same-origin policy problem. I tried testing with just http://www.google.com and I don't htink it worked. I tried getting the text content and all I got was a blank

I have put some thought into it though and direct link, even though i'm trying to submit a form, is feasible. I'd just have to set the src to the url with the paramters already encoded as an http get.

in any case still doing with the same origin stuff. I think.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can not access another domain because of security concerns. If you want to access data from another domain, you will have to use a server side proxy.

Eric
 
Matt Kidd
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would a dns redirect from a local directory fit the bill i.e. www.somedomain.com/webservice has a dns entry to the webservice you're trying to reach?
 
Matt Kidd
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it seems like i'm going to have to has the .NET developer make a script to call the web service so I can call it locally. I hate our environment.
reply
    Bookmark Topic Watch Topic
  • New Topic