Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 Basics 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 November 28th, 2004, 11:40 PM
Authorized User
 
Join Date: Jul 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default sending src name to new document

How can I send the name of the src file to a new window that I am opening up....I want to show an enlarged view of an image when clicked - so I just want to send the name of the image file to the new page I am opening up in a new window....any ideas...can I send it in a querystring and if so how???

 
Old November 29th, 2004, 01:01 AM
Authorized User
 
Join Date: Aug 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default

function openwin(path)
{
  sFeatures='width=300,height=400,top=100,left=100';
  xWin= window.open(path,"winname",sFeatures)
}

<img src="abc.gif" onclick="openwin('newwindow.asp?imgname=abc.gif')" >

--------
In newwindow.asp
imagetoShow= request.querystring("imgname")


Vinay



 
Old November 29th, 2004, 08:40 AM
Authorized User
 
Join Date: Jul 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you, the only problem with that is that the src name is dynamic - so I dont know what it is...



 
Old November 29th, 2004, 11:42 PM
Authorized User
 
Join Date: Aug 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:
The only problem with that is that the src name is dynamic - so I dont know what it is...
Change this line
<img src="abc.gif" onclick="openwin('newwindow.asp?imgname=abc.gif')" >

to this one:
<img src="<%=imgvar%>" onclick="openwin('newwindow.asp?imgname=<%=imgvar% >')">

'here imgvar is the image name being generated on the fly.


Vinay







Similar Threads
Thread Thread Starter Forum Replies Last Post
$@src newbieboobers XSLT 2 March 12th, 2008 04:22 PM
chapter2-src\src\ch02\sample5 _ need help M7777777bill BOOK: Professional Java Development with the Spring Framework 0 June 14th, 2006 10:00 PM
modifying src attribute jtnw XSLT 1 January 20th, 2005 05:08 AM
sending the src for an image to a new window... elladi Javascript How-To 1 November 29th, 2004 05:35 AM





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