[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 07-08-2006, 12:33 PM   #1 (permalink)
NamePros Regular
 
max99's Avatar
 
Join Date: Mar 2006
Location: Manchester
Posts: 398
35.00 NP$ (Donate)

max99 is an unknown quantity at this point

Cancer
Drop Down Menu - extra window

This is code for one of my options on drop down menu <option value="/beta/amazon.html" onClick="MM_openBrWindow('http://www.amazon.co.uk/exec/obidos/redirect?link_code=ur2&tag=dvdrentalcomp-21&camp=1634&creative=6738&path=www.amazon.co.uk', 'merchant','toolbar=yes,location=yes,status=yes,me nubar=yes,scrollbars=yes,resizable=yes')">
Amazon</option> , it works except a new window with the amazon link doesnt appear, anyone know why


Basically i want the page to link to www.mysite.com/beta/amazon.html , and then another window to open with 'http://www.amazon.co.uk/exec/obidos/redirect?link_code=ur2&tag=dvdrentalcomp-21&camp=1634&creative=6738&path=www.amazon.co.uk' that in it

What am i doing wrong ?
max99 is offline  
Old 07-08-2006, 01:59 PM   #2 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
 
Join Date: Feb 2006
Posts: 2,801
56.00 NP$ (Donate)

Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future

Autism Autism Autism Autism Autism Autism Autism
Code:
<script type="text/javascript">
function openlinks(url1, title1, url2, title2) {
     window.open(url1, title1, "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes");
     window.open(url2, title2, "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes");
}
</script>

<option onclick="openlinks('http://google.com', 'Google', 'http://yahoo.com', 'Yahoo');">Open the Windows</option>
Dan is offline  
Old 07-09-2006, 06:09 AM   #3 (permalink)
NamePros Regular
 
max99's Avatar
 
Join Date: Mar 2006
Location: Manchester
Posts: 398
35.00 NP$ (Donate)

max99 is an unknown quantity at this point

Cancer
does the script but (top bit) does that need to be in head at top, or anywhere ?

I've done this and it don't seem to work, says error

<script type="text/javascript">
function openlinks(url1, title1, url2, title2) {
window.open(url1, title1, "menubar=yes,location=yes,resizable=yes,scrollbars = yes,status=yes");
window.open(url2, title2, "menubar=yes,location=yes,resizable=yes,scrollbars = yes,status=yes");
}
</script>
<div class="bar" style="width: 1051; height: 72">
<ul>
<li class="browse_category">
<p>Search By Retailer: <select name="Retailer" onChange="location=this.options[this.selectedIndex].value;" id="search_box" style="font-family: Verdana">
<option value=# selected>Retailers A to H</option>
<option onclick="openlinks('/beta/amazon.html', 'Amazon', 'http://www.google.com', 'google');">Amazon</option>
max99 is offline  
Old 07-09-2006, 06:37 AM   #4 (permalink)
Senior Member
 
Jiblob's Avatar
 
Join Date: Dec 2004
Location: .co.uk
Posts: 2,179
271.38 NP$ (Donate)

Jiblob is just really niceJiblob is just really niceJiblob is just really niceJiblob is just really nice


I dont see why you dont just put the open window functions in to the link.. Its over complicating things?

But I reccomend putting any functions in to the <head>

But, for a start have:

Quote:
<script language="JavaScript" type="text/javascript">
__________________
:hi:
Jiblob is offline  
Old 07-09-2006, 06:50 AM   #5 (permalink)
NamePros Regular
 
max99's Avatar
 
Join Date: Mar 2006
Location: Manchester
Posts: 398
35.00 NP$ (Donate)

max99 is an unknown quantity at this point

Cancer
i've done what i wanted to do in normal links. i.e just a "click here" and it goes to a page, and another window opens up aswell, but i don't know how in drop down menus
max99 is offline  
Old 07-09-2006, 11:00 AM   #6 (permalink)
NamePros Regular
 
max99's Avatar
 
Join Date: Mar 2006
Location: Manchester
Posts: 398
35.00 NP$ (Donate)

max99 is an unknown quantity at this point

Cancer
anyone help
max99 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 07:39 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85