Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Quick question on passing reference to url


  • From: david_chance at yahoo.com.au (David Chance)
  • Subject: [Javascript] Quick question on passing reference to url
  • Date: Wed Nov 29 12:30:58 2006

thanks for the reply.

What I'm looking to do is basically just have an image
displayed, then when clicking on it a new window opens that I
can size and include a close link in it.

<SCRIPT language="JavaScript" type="text/javascript">
<!-- ;
var newwindow = ''
function ImageWindow(url) {
if (newwindow.location && !newwindow.closed) {
    newwindow.location.href = url; 
    newwindow.focus(); } 
else { 
    

  var generator=window.open('','name','height=400,width=500');
  
  generator.document.write('<html><head><title>Popup</title>');
  generator.document.write('<A
HREF="javascript:ImageWindow(ImgUrl)"><IMG SRC='ImgUrl'
width="300">');
  generator.document.write('<p>Image Window</p>');
  generator.document.write('<p><a
href="javascript:self.close()">
    Close</a> the popup.</p>');
  generator.document.write('</body></html>');
  generator.document.close();

	
}
}


function tidy() {
if (newwindow.location && !newwindow.closed) { 
   newwindow.close(); } 
}

//-->
</SCRIPT>



--- Fl?vio Gomes <flavio@xxxxxxxxxxxxxxxx> wrote:

> Can you post the code to the "ImageWindow" function?
> 
> 
> 
> Nathan V. Patwardhan escreveu:
> 
> >On Thu, Nov 30, 2006 at 04:53:54AM +1100, David Chance wrote:
> >: 
> >: <script>
> >: 		
> >: var ImgUrl="http://mysite.verizon.net/stove1.jpg";
> >: 		</script>		
> >: 		
> >: 		<A HREF="javascript:ImageWindow(ImgUrl)"><IMG
> SRC='ImgUrl' width="300"></A> 
> >                                                
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> >Unless I'm missing something, this isn't Javascript.  It's
> just HTML.
> >
> >  
> >
> 
> -- 
> Flavio Gomes
> flavio@xxxxxxxxxxxxxxxx
> 
> _______________________________________________
> Javascript mailing list
> Javascript@xxxxxxxxxx
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 


Send instant messages to your online friends http://au.messenger.yahoo.com