Solved

I need an iFrame alternative

Posted on 2009-05-06
13
1,999 Views
Last Modified: 2013-11-19
I need an alternate to iframe for many reasons. I want to pull  in page(s) that already resides on my site.

Currently using but would like to avoid:

<iframe src ="/rating/irating.asp?ID=TEST1" name="TEST1" width="300" height="300">
  <p>Your browser does not support iframes.</p>
</iframe>

I tried using AJAX INCLUDE script that I got off Dynamic Drive but it didn't work the way I needed it to. It needs to also include a unique name: name="something"

<script type="text/javascript">
ajaxinclude("/rating/irating.asp?ID=TESTAGAIN1")
</script>
0
Comment
Question by:swaggerking
  • 5
  • 4
  • 3
13 Comments
 
LVL 17

Expert Comment

by:OriNetworks
ID: 24322058
Would it work for you if you included the pages on the server side such as an ASP Include?
0
 

Author Comment

by:swaggerking
ID: 24327063
I wish. Unfortunately for this instance it won't work. I'm trying to implement an ASP Star Rating script into my web pages. I'm using the example provided by http://www.chrishardy.co.uk/asp/scripts/accessible-star-ratings/.

The rating system works great for a single page with single object. I 'm trying to rate more than one object on a page. For this they state:

"You can create as many of these as you need, as long as the IFrame name value and the ID parameter are unique for each IFrame section. As you can see below, the ID parameter (and even the name) can be defined dynamically via ASP."

There iframe example:
<iframe src ="/rating/irating.asp?ID=UniqueID" name="UniqueID" width="300" height="300">
  <p>Your browser does not support iframes.</p>
</iframe>


0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 24333772
But what is the issue?

Add the name...
<iframe src ="/rating/irating.asp?ID=<%= someAspVar %>" name="<%= someAspVar %>" width="300" height="300">
  <p>Your browser does not support iframes.</p>
</iframe>



0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:swaggerking
ID: 24336599
The issue: I Some browsers may see iframes as a security risk dependent upon their settings, iframes are not allowed in strict doctype, display of iframe in ie 6/7 is undesirable, and so on.

I was just hoping that some one out there might know of another technique that I could use instead of inserting iframes into my pages.


0
 
LVL 17

Assisted Solution

by:OriNetworks
OriNetworks earned 75 total points
ID: 24336988
I would suggest going with something based of of AJAX which is can basically be put on the same page and it can send information back to the server (called a postback) without having to reload the page. THere are a few examples out there but here is a quick one i found when googling for ajax star rating system.
http://masugadesign.com/the-lab/scripts/unobtrusive-ajax-star-rating-bar/
0
 

Author Comment

by:swaggerking
ID: 24357624
I was able to find a solution on my own.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 24361382
Please share
0
 

Author Comment

by:swaggerking
ID: 24375760
mplungian,
I never found an alternative to iframes that I was totally happy with. Ended up having a developer buddy come over and shared with me his ajax star rating script. Something very similar to http://www.ex-designz.net/softwaredetail.asp?fid=1206 and to what OriNetworks mentioned, but in asp.
0
 
LVL 17

Expert Comment

by:OriNetworks
ID: 24380882
So if AJAX was the solution, why would my suggestion of going with an AJAX based soluition not be marked as the solution?
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 24382139
Perhaps because that was a suggestion and the asker already was aware of the existence of Ajax.
He did not choose your suggested example because it was in PHP
0
 

Accepted Solution

by:
swaggerking earned 0 total points
ID: 24386285
OriNetworks,
By no means did I wish to diminish your suggestion. This site is worth every penny and you guys (the true experts) have helped me numerous times. The only reason I didn't choose your suggestion is pretty much on par with mplunjan comments. In addition, I had already implemented the switch to ajax with the help of friend and was testing it prior to receiving your php suggestion and closing the ticket.
0
 
LVL 17

Expert Comment

by:OriNetworks
ID: 24391183
No problem.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now