| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
who the fuck am i?
|
link problem
this is the link as written by previous designer: <a href="#" onMouseDown="MM_openBrWindow('www.linkhere','','to olbar=yes,scrollbars=yes,width=640,height=400')">B ook online</a> because the href has an # associated with it, clicking the link just refreshes the page/sends you back to the top. But I cant figure out how the link should be written... I think I'm having a braindead afternoon. Can anyone help? |
|
|
|
|
|
#5 (permalink) | |
|
Dr. Lucien Sanchez
Join Date: Mar 2003
Location: UK
Posts: 5,563
|
Quote:
|
|
|
|
|
#6 (permalink) |
|
Dr. Lucien Sanchez
Join Date: Mar 2003
Location: UK
Posts: 5,563
|
Fwiw, I use a bit of script to detect the link type and launch popups if called. So if js is turned off, the user gets there anyway. <a href="pop.htm" type="popup" title="Launch popup"> Very nice it is too. |
|
|
|
#7 (permalink) | |
|
who the fuck am i?
|
Quote:
The way I understand it is that the browser is reading the href="#" instead of going to the MM_Open command... right? by putting in return false at the end, does that ensure that the browser reads the MM_open? to clarify: I want the browser to read the MM_Open and ignore the href="#" |
|
|
|
|
#10 (permalink) |
|
Read between da lines!
|
Ok firstly make sure this is in your header: var newwindow; function openwindow(url) { newwindow=window.open(url,'name','toolbar=yes, scrollbars=yes, height=640,width=400'); if (window.focus) {newwindow.focus()} } Then have this as your link mate: <a href="page.html" onClick="openwindow('page.html'); return false;">Book online</a> You asked Fin I answered! Having the link this way also lets people to have JS disabled browse your links. |
|
|
|
#13 (permalink) |
|
who the fuck am i?
|
ended up just doing away with function and putting window.open on the link. It was being messed up somehow by the in-house CMS and no matter what I tried it wouldnt work with the function. The site is going to be overhauled very soon so they arent too worried about the solution in the interim |
|
![]() |