justAnoob Posted June 1, 2009 Share Posted June 1, 2009 <?php echo '<a href="' . $row['imgpath'] . '" onClick="window.open(' . $row['imgpath'] . '', width=350, height=350); return false"> <img src="' . $row['imgpath'] . '" width="150" alt="" border="0"></a>'; ?> These quotes and double quotes really get to me sometimes... Can someone help out? Quote Link to comment Share on other sites More sharing options...
MadTechie Posted June 1, 2009 Share Posted June 1, 2009 try this <?php echo '<a href="' . $row['imgpath'] . '" onClick="window.open(\'".$row['imgpath']."\', width=350, height=350); return false"> <img src="' . $row['imgpath'] . '" width="150" alt="" border="0"></a>'; ?> Quote Link to comment Share on other sites More sharing options...
justAnoob Posted June 1, 2009 Author Share Posted June 1, 2009 <?php echo '<a href="' . $row['imgpath'] . '" //197 onClick="window.open(\'".$row['imgpath']."\', width=350, height=350); return false"> //198 <img src="' . $row['imgpath'] . '" width="150" alt="" border="0"></a>'; //199 ?> error on line 198 expecting , or ; this is what I got before. Quote Link to comment Share on other sites More sharing options...
justAnoob Posted June 1, 2009 Author Share Posted June 1, 2009 alright,, i got this to work,, but my width and height of my page is not working. Quote Link to comment Share on other sites More sharing options...
MadTechie Posted June 1, 2009 Share Posted June 1, 2009 Heres how i would write the line <?php echo "<a href=\"{$row['imgpath']}\" onClick=\"window.open('{$row['imgpath']}', width=350, height=350); return false\"><img src=\"'{$row['imgpath']}\" width=\"150\" alt=\"\" border=\"0\"></a>"; ?> Quote Link to comment Share on other sites More sharing options...
justAnoob Posted June 1, 2009 Author Share Posted June 1, 2009 ok,,, i can click the empty picture to now see my picture in another window... but the empty picture should be my picture that I'm clicking on. Quote Link to comment Share on other sites More sharing options...
justAnoob Posted June 1, 2009 Author Share Posted June 1, 2009 the code below works,, except for the size of the window that opens... It opens as a full screen browser window,,,I don't want that. <?php echo '<a href="' . $row['imgpath'] . '" onClick="window.open("'.$row['imgpath'].'", width=350, height=350); return false"> <img src="' . $row['imgpath'] . '" width="150" alt="" border="0"></a>'; ?> Quote Link to comment Share on other sites More sharing options...
.josh Posted June 1, 2009 Share Posted June 1, 2009 This is obviously not a php issue. Moved. Quote Link to comment Share on other sites More sharing options...
justAnoob Posted June 1, 2009 Author Share Posted June 1, 2009 Thanks,, I'll never get a reply in the javascript board. Quote Link to comment Share on other sites More sharing options...
.josh Posted June 1, 2009 Share Posted June 1, 2009 Thanks,, I'll never get a reply in the javascript board. well what do you expect from a php community? If you're worried about getting your question answered on a javascript forum on a php community, go to a javascript community and ask your question. Quote Link to comment Share on other sites More sharing options...
MadTechie Posted June 1, 2009 Share Posted June 1, 2009 Thanks,, I'll never get a reply in the javascript board. That reminds me, you keep posting in the wrong section, you know thats against the terms! Do take the time to post in the proper section. The Javascript section does get replies (I also go their) Quote Link to comment Share on other sites More sharing options...
justAnoob Posted June 1, 2009 Author Share Posted June 1, 2009 That was a joke kind of.... I was just stating that the PHP section gets more attention... Sorry for the misunderstanding. Quote Link to comment Share on other sites More sharing options...
MadTechie Posted June 1, 2009 Share Posted June 1, 2009 I thought it was half and half to didn't say anything! anyway solved ? Quote Link to comment Share on other sites More sharing options...
Psycho Posted June 1, 2009 Share Posted June 1, 2009 I would go with what MadTechie posted in Reply#4, except there was an errant, extra single quote at the beginning of the image src attribute <?php echo "<a href=\"{$row['imgpath']}\" onClick=\"window.open('{$row['imgpath']}', width=350, height=350); return false\"><img src=\"{$row['imgpath']}\" width=\"150\" alt=\"\" border=\"0\"></a>"; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.