SEO Services
Home >>
Webmaster Forums >>
javascript helpjavascript help
Sharky said: "echo"
";
when i use this it doesn't use the correct height and width. But when i used this i didn't think i would need to use the
[/code] and i havent got a clue what it means.
EDIT: heres the actual script
[code]";
$i=0;
while ($i < $num) {
$id = mysql_result($result,$i,"id");
$image = mysql_result($result,$i,"image");
$content = mysql_result($result,$i,"content");
$height = mysql_result($result,$i,"height");
$width = mysql_result($result,$i,"width");
// JAVASCRIPT LOOP
echo"
function open$id() {
var open$id =
window.open('popup.php?id=$id','','height=$height,width=$width');
}
";
$i++;
}
echo"";
$i=0;
while ($i < $num) {
$id = mysql_result($result,$i,"id");
$image = mysql_result($result,$i,"image");
$content = mysql_result($result,$i,"content");
$height = mysql_result($result,$i,"height");
$width = mysql_result($result,$i,"width");
echo"
";
$i++;
}
?> [/code]"
Developer said: "When you say it doesn't use the correct width and height, does it resize it at all? It probably is using the correct size, but for the outside of the window, not the inside."
Sharky said: "with this one it goes straight to full screen :S"
Neutron2k said: "an alternate to javascript:void(0); is to just use javascript:;
Does the same thing."
Neutron2k said: "sharky, go back and use php to output the links as opposed to muddlingin a script block.
then take a look at what your problem is.
you say the window pops up, but its not the correct size?
if this is the case, then the javascript is probably working and there is a problem retriving the numeric values from the database.
preview the rendered page and take a look at the source code for the page. find one of the links and check that values have been entered into the links height and width properties."
Sharky said: "i fixed it, i wont tell you what the problem was because its just embarresing lol.
thanks for the help :D"
Neutron2k said: "what was it?
wrong database field name?"
Sharky said: ":oerr... it was limited to 3 values inside the database:o"
Neutron2k said: "yeah theres always somthing simple that totally throws you off."