| | |||||||
| |||||||
| New! Use your Facebook, Google, AIM & Yahoo accounts to securely log into this site, click logo to login | |
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Regular | 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 ? |
| |
| | #2 (permalink) |
| Buy my domains. | 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>
|
| |
| | #3 (permalink) |
| NamePros Regular | 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> |
| |
| | #4 (permalink) | ||||
| Senior Member | 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:
__________________ :hi: | ||||
| |