Solved

I need an iFrame alternative

Posted on 2009-05-06
13
2,000 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
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 

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

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.

Question has a verified solution.

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

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

791 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