Go Back   Dynamic Drive Forums > General Coding > HTML
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 06-26-2006, 07:36 PM
colrcrzy colrcrzy is offline
Junior Coders
 
Join Date: Jun 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pop-Up Window

i need a pop up window to come up after a link is selected. anyone got the code for this? SUPER THANKS!
Reply With Quote
  #2  
Old 06-27-2006, 12:16 AM
djr33's Avatar
djr33 djr33 is offline
Global Moderator
 
Join Date: Mar 2006
Location: N. California, USA
Posts: 6,408
Thanks: 11
Thanked 82 Times in 82 Posts
Default

Selected? Rollover? Clicked? The actual text of the link is selected?

As for a NEW window, just use <a ... target="_blank">

That will open a new browser window for any link.

As for a popup, you can google for a code... there are many versions.

Note, however, that, since I'm not sure what user input you are responding to (see top of post), that it may be blocked by popup blockers.
blockers usually only block autogenerated ones, or popups based on rollovers, etc.
Usually if it is a click by the user, the blocker will let it through.
So... if you are talking about a click, then this will likely work for you. If not, realize a very large portion of your audience may be blocking the popups.
__________________
Daniel - <?php?> | <html>| Ich lerne Deutsch. | Studio l'italiano. | Estudiaba español. | Estudo português. | 日本語の勉強。| मैं हिन्दी सीखो | درس العربية
Reply With Quote
  #3  
Old 06-28-2006, 08:55 AM
soupdragon soupdragon is offline
Junior Coders
 
Join Date: Jun 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you need a simple clickable popup window try this,

<SCRIPT type="text/javascript">
<!--hide

function newwindow()
{
window.open('Picture_1.htm','jav','width=650,height=450,resizable=yes');
}
//-->

<!--hide

function newwindow_1()
{
window.open('Picture_2.htm','jav','width=650,height=450,resizable=yes');
}
//-->


</SCRIPT>

<A HREF="javascript:newwindow()" ><img src="pictures\Pict0001.JPG" alt="image1" border="0" width=200 height=150></A>

<A HREF="javascript:newwindow_1()" ><img src="pictures\Pict0002.JPG" alt="image2" border="0" width=200 height=150></A>


Obviously change the image names and alt, place it in your code and your away.

Hope this helps
Reply With Quote
  #4  
Old 06-28-2006, 10:11 AM
atanas1234 atanas1234 is offline
New Comer (less than 5 posts)
 
Join Date: Jun 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There is a very nice program http://www.antssoft.com/index.htm it is Free trial, but when you run it several times it is enought to get the sorce and the idea how to write your own code.
but if you prever not to instal anyting just use this code:

Put this in the head of your HTML:

<script language="JavaScript">
function PopupMe(){
myleft=(screen.width)?(screen.width-800)/2:100;mytop=(screen.height)?(screen.height-600)/2:100;
settings='top=' + mytop + ',left=' + myleft + ',width=800,height=600,location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,fullscreen=no'
Login=window.open('http://quantuminfo.phys.uni-sofia.bg/secure/index.php','Login', settings);
Login.focus();}
</script>



And this in the Body:

<a href="javascript:PopupMe()">Click this link</a>




I need somthing else .Could anyone tell me how to make a download link
but i am not a specialist in making site so please could it be simple explanation.Thanks
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:50 PM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.