Jump to content

passing variables in url


Recommended Posts

I am looking for some hints regarding sending people links to my website, http://dg-ad.com A user clicks a project link from a list of projects, below is an example of a project link: <a href="PF-Skinner.html" onclick="updatePortfolioFrame(this); return false;">SCHOOL OF NURSING UMASS AMHERST</a> Using javascript's innerHTML and which/this functions, an iframe is placed in a div. The src for the iframe is the href from the anchor tag. This href references a small html file that is a list of jpegs that are then displayed as a slide show in an iframe on the parent page. This is the script: <script type="text/javascript">function updatePortfolioFrame(which){document.getElementById('portfolio').innerHTML = '<'+'iframe id="pf_window" name="pf_window" type="text/html" frameborder="no" scrolling="no" src="'+which.href+'"><\/iframe>';}</script> Now if you surf to the site, the parent page does not display any slideshow, the user navigates to projects using menus. This is the question: I want to be able to send people links to the parent page with the slideshow of a specific project open in the iframe. My javascript function updatePortfolioFrame specifies the src of the iframe as a variable. I suspect that I can pass the variable in the URL/link to the function. If this is the right concept could anyone suggest some direction for me to follow, some code, some keywords to google, or some web sites that may illustrate some methods. Thanks for thinking about this. Daniel

Edited by df_glazer
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...