i-frame alternative

I have a project to create something like iframe to allow our clients to access one of our webpage. It is a html form with jquery and it will save all of the information into our database.

iframe is one of my options. But I know there is alot of disadvantage of using it. I would like to get some ideas from experts here and hopefully find out some other and better solutions.

If you can show me sample codes how it works. It will be very helpful. Thanks
solution1368Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Can you describe more detail.  Are you talking about just viewing data or the ability to update data?  You mention ajax, you can use ajax to place data directly on the page and no need for a frame.

I think if you can paint a better picture of what you want we can help better.
0
Dave BaldwinFixer of ProblemsCommented:
An iframe is intended to display a complete web page.  Why do you have to put it in an iframe instead of letting them connect to it directly?  Why do you think an iframe would be a good idea?
0
solution1368Author Commented:
How to use Ajax to place directly ... As you mentioned?
My question is actually very clear.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
There are many ways....  Since you selected jquery as your topic  http://api.jquery.com/jQuery.ajax/

Let's say you have an empty div with the id result

<div id="result"></div>

You can place html in that div using jquery
$('#result').html('<b>Hello</b><br>World')

Open in new window

To do the same but use data from another url

Same domain
$.ajax({
  url: "test.html",
  context: document.body
}).done(function(data) {
  $( '#result' ).html(data);
});

Open in new window

Another domain
$.ajax({
  url: "http://anotherdomain.com/test.html",
  context: document.body
}).done(function(data) {
  $( '#result' ).html(data);
});

Open in new window


In needed you can target a specific class or id as well so you don't have to bring in the entire page.
0
solution1368Author Commented:
thank but can you show me the exact html code i need to put?

my domain:

my friend domain:

Thanks
0
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Something like this
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
  <script>
    $.ajax({
  url: "test.html",
  context: document.body
}).done(function(data) {
  $( '#result' ).html(data);
});
  </script>
<meta charset=utf-8 />
<title>padas</title>
</head>
<body>
  <div id="result"></div>
</body>
</html>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.