webForumDet fria alternativet

popup å placering

2 svar · 146 visningar · startad av nybi

nybiMedlem sedan nov. 200059 inlägg
#1

varför sig inte funka:

<SCRIPT LANGUAGE="JavaScript">
  <!--
 function popup(URL, w, h) {
	var w_width = w;
	var w_height = h;
	var w_top = (screen.height-w_height)/2;
	var w_left = (screen.width-w_width)/2;
 	window.open(URL,'NewWin', width=" + w_width + ", height=" + w_height + ", top=" + w_top + ", left=" + w_left + ", 'toolbar=0, location=0, directories=0, status=0, toolbar=0, menubar=0, scrollbars=0, resizeable=0'); 
 }
  //-->
</SCRIPT>
<A HREF="javascript:void(0);" onClick="javascript:popup('newpost.php', 220, 350);">

ERROR
rad 7 (window.open(URL,'NewWin'.....)
tecken 3
fel Har inte implementerats

när jag klickar på länken händer inget.

hjälp

JojoxxMedlem sedan juni 20004 308 inlägg
#2

Det fattas ett citat-tecken. Så här skulle jag skriva;

<SCRIPT LANGUAGE="JavaScript">
<!--
function popup(URL, w, h) {
var w_width = w;
var w_height = h;
var w_top = (screen.height-w_height)/2;
var w_left = (screen.width-w_width)/2;
window.open(URL,"NewWin", "width=" + w_width + ", height=" + w_height + ", top=" + w_top + ", left=" + w_left + ", toolbar=0, location=0, directories=0, status=0, toolbar=0, menubar=0, scrollbars=0, resizeable=0"); 
}
//-->
</SCRIPT>

<A HREF="#" onClick="popup('newpost.php', 220, 350); return false;">dsf</a>

------------------
/ J

nybiMedlem sedan nov. 200059 inlägg
#3

Jabbadabbadooo

255 ms totalt · 3 externa anrop · v20260731065814-full.1211964f
132 ms — hämta forumlista (db)
121 ms — hämta statistik (db)
122 ms — hämta tråd, inlägg och bilagor (db)