SunQuest
           JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 24th, 2002, 12:23 PM
chausfeld chausfeld is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 187 chausfeld User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 37 m 23 sec
Reputation Power: 7
2 javascript functions on 1 click?

I have a popup window that is a disclaimer with an AGREE and DISAGREE button. If the person selects DISAGREE, it just closes. But if they select AGREE, it opens a new window with a pdf file. What I WANT IT TO DO is to not only open up that new file but also close the popup at the same time. I already tried putting the window.close function in the same href as the link to the new file but that didn't work.... How can I do this?

Here's the code for the buttons:

<tr>
<td align="center" valign="top"><a href="pdf/select_prospectus.pdf;" target="_blank"><img src="agreebutton.gif" width="91" height="34" border="0" alt="Agree"></a>
</td>
<td a href="javascript:window.close();"><img src="disagreebutton.gif" width="91" height="34" border="0" alt="Disagree"></a>
</td>
</tr>

Reply With Quote
  #2  
Old January 24th, 2002, 01:52 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
Nothing fancy:

PHP Code:
<a href "javascript:window.open('URL_TO_OPEN'); window.close();">Open a new windowclose the current one</a

Reply With Quote
  #3  
Old January 24th, 2002, 02:02 PM
chausfeld chausfeld is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 187 chausfeld User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 37 m 23 sec
Reputation Power: 7
thank you!

that works perfectly - thank you SO much!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > 2 javascript functions on 1 click?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway