Solved

How to reload a iframe clicking on a link

Posted on 2011-03-22
3
278 Views
Last Modified: 2012-05-11
Hello,

I have an asp page that loads a iframe. In my page there is a list of items and I want to reload the iframe and to pass a paremeter to it when user clicks over one of these items.

The fact is in that iframe I load especifications of the main item, so I need to pass and id parameter to identify which characteristics I have to show (I take it from a table using asp).

I hope I've explained well. Thanks a lot in advance.

Kind regards.
0
Comment
Question by:starbase2
3 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 35188758
For example :
<a href="javascript:void(0)" onclick="document.getElementById('IFrameID').src = 'http://www.address.com/page.ext?rnd=' + (new Date().getTime())" >Reload</a>

Open in new window

0
 
LVL 9

Expert Comment

by:Roman Gherman
ID: 35188779
Hi,

Put the following in the loaded page:
<head>
<meta http-Equiv="Cache-Control" Content="no-cache">
<meta http-Equiv="Pragma" Content="no-cache">
<meta http-Equiv="Expires" Content="0">
</head>

Open in new window

0
 
LVL 17

Accepted Solution

by:
shinuq earned 500 total points
ID: 35188788
<a target="framename" href  "mainmenu.asp?id=1&item2" >menu items</a>

Framnname should be replaced with the appropriate frame name that you are using.

Hope this helps
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

747 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

12 Experts available now in Live!

Get 1:1 Help Now