sushantkaura Posted November 15, 2007 Share Posted November 15, 2007 hey guys , i have a lil problem . i have 2 php pages in which value has to be passed between the two the function open_win() is used to open the page in a new window and is defined above the code as it is a java script . a.php ................ function open_win() { window.open("player.php?songId=<?=$songid?>") } $songid=$row['Cid']; echo "<td>"?><input type=button value="Listen" onClick="open_win()"/><?php "</td>"; ....................... second page player.php i m typing ....................... $sid=$_GET["songId"]; echo "$sid"; ....................... i have done like this but in player.php it is not echoing the value and not even in the url of the next window, is it the rite way to id ? i think i m doing something wrong . plz tell me the rite way to do it. sushant Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted November 15, 2007 Share Posted November 15, 2007 Change your function to this function open_win(songID) { window.open("player.php?songId="+ songID) } Now to call the function, do this <?php $songid=$row['Cid']; echo "<td><input type=button value='Listen' onClick='open_win($songid)'/></td>"; ?> Quote Link to comment Share on other sites More sharing options...
sushantkaura Posted November 15, 2007 Author Share Posted November 15, 2007 thnx , it wrks .. 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.