[SOLVED] Using javascript embedded in a php query

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
chuckwgn
Forum Newbie
Posts: 4
Joined: Sat Nov 15, 2003 8:59 pm

[SOLVED] Using javascript embedded in a php query

Post by chuckwgn »

If anybody knows the correct way to get a "onClick" (javascript) event to work in a php enviroment - All im trying to do is when the customer clicks on the thumbnail, it will display the picture in another window - just using standard Javascript - Check out my echo line below:

Code: Select all

<?php

echo "<td><a href="javascript:;" onClick=" . '"' . "MM_openBrWindow('$rowResult[10]','','width=300,height=300')"."' >
			<img src=$rowResult[10] width='100' height='100'> </td>"; 

?>
*Note:

Thanks for your help, whom ever knows---

| Charlie | Got PHP? |
microthick
Forum Regular
Posts: 543
Joined: Wed Sep 24, 2003 2:15 pm
Location: Vancouver, BC

Post by microthick »

Code: Select all

<?php 

echo "<td><a href="javascript:MM_openBrWindow('".$rowResult&#1111;10]."','','width=300,height=300')"><img src='".$rowResult&#1111;10]."' width='100' height='100'></a></td>"; 

?>
chuckwgn
Forum Newbie
Posts: 4
Joined: Sat Nov 15, 2003 8:59 pm

Post by chuckwgn »

Thanks ALOT - That worked -

I tip my hat to you sir.

-Charlie
microthick
Forum Regular
Posts: 543
Joined: Wed Sep 24, 2003 2:15 pm
Location: Vancouver, BC

Post by microthick »

No problem.
Post Reply