Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 25th, 2005, 12:20 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problems with loading external pics into an IFrame

Hello,
While I searched your site to find the solution to my problem, I haven't found any, which prompted me to email you with the issue at hand:
Brief: I have an employee directory that is loaded into a table (dynamically). I also have a picture stored in a folder (same root) that with FSO will "push" a camera icon to link to that employee's picture, if there is a picture. So far, so good.

On the page with the dynamic table I also have a Floating <Iframe> with images of all employees scrolling side to side (Slide show effect)

When the end-user clicks on the camera icon (in the dynamic table) that employees pic should replace the slideshow but instead the picture relaces the whole page instead of loading into the IFRAME. ?!

Here's the chunk of code that calls the Floating IFrame:

var iframetag='<iframe id="masterdiv" name="masterdiv" src="../people.htm" width="101px" height="150px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="1" scrolling="no" style="position: absolute; left: -500px; top: -500px; border:8px solid #336699;"></iframe>'


Here's the code calling the camera icon (if there is a corresponding picture in the image folder)

 <%
  If (fso.FileExists(strpath)) Then%>
  <a href="<%=PICurl%>" OnClick="javascript:changePic()" class="docs"><img src="../img/EMPpic.jpg" border="0"></a>
   <%
 Else
  response.write("<P class=""dir"">n/a</P>")
 End If
 %>

And here's my changePic function:

<script>
function changePic(){
window.frames['masterdiv'].window.location.replace()
}
</script>


Please help??

Thank you,
nancy
 
Old April 26th, 2005, 01:42 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 186
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:
window.frames['masterdiv'].window.location.replace()
The problem is you are replacing the window content.

Change window to Document

Code:
window.frames['masterdiv'].document.location.replace()
 
Old April 26th, 2005, 10:33 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I copied your code and when the camera icon is clicked the picture still replaces the whole page ???

Any clue why?

Thank you,
nancy





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need iframe loading indicator surendran Javascript How-To 1 September 24th, 2008 03:32 AM
Need Help with path for loading Pics (app.path) Tabbasum Beginning VB 6 2 November 15th, 2007 04:57 AM
targeting external page in another page's IFRAME nancy HTML Code Clinic 1 March 30th, 2006 03:22 PM
loading XML Documents in IFrame in IE 5.0 anil_tiwari Javascript 1 February 2nd, 2006 08:01 PM
Loading Code to External Program algip ASP.NET 1.x and 2.0 Application Design 0 March 18th, 2004 03:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.