Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Reply
 
LinkBack Thread Tools Display Modes
Old 05-02-2012, 03:17 PM   #1 (permalink)
The Boy Who Lived
 
hjpotter92's Avatar
 
Join Date: Apr 2008
Location: Kharagpur, Rajasthan, Godric's Hollow
Posts: 409
Default PHP + JavaScript PopUp Windows


On my page, the following function has been created:
Code:
	<SCRIPT language="javascript" type="text/javascript">
		function popModData( modName )
		{
			var url = "./modList.php?mod=" + modName;
			newWindow = window.open( url, modName, 'width=500,height=500,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0');
			if( window.focus ) { newWindow.focus() }
			return false;
		}
	</SCRIPT>
And, the page itself is modList.php which loads data of different game-mods from SQL table. I want each of the game-mod name clickable, so that a pop-up opens. I am using this in the php page generation:
PHP Code:
        while( $modTable mysql_fetch_array$getMod ) )
        {
            
$colour = ( $i )? "#99EECC" "CCDDFF";
            echo 
"\t\t\t<tr bgcolor='$colour'>";
            echo 
"\n\t\t\t\t<td>" $i++ . ".</td>";
            echo 
"\n\t\t\t\t<td onclick='return popModData($modTable[Name]);'>$modTable[Name]</td>";
            echo 
"\n\t\t\t\t<td>$modTable[From]</td>\n\t\t\t</tr>";
        } 
Upto this, no trouble is faced. Now, the trouble is pop-up window opens for the first entry in the table, but not for any of the other 516 values.

I thought of having another file to process the mod name( for eg. modData.php ) but, the problem is still there.

Please help. If anything is missing there, please mention, and I will try to put it up too!


EDIT
Ignore the question. Problem was solved. Seems like I must've used this
PHP Code:
            echo "\n\t\t\t\t<td onclick='return popModData(\"$modTable[Name]\");'>$modTable[Name]</td>"
__________________
Spoiler:

Core i7 920 @ 2.67 GHz
Intel DX58SO
3 GB DDR3 1600 MHz RAM
nVIDIA GeForce 9600 GS
Razer Arctosa + Abyssus


Please help: http://www.thinkdigit.com/forum/prog...p-windows.html
hjpotter92 is offline   Reply With Quote
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by Sarath
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 12:39 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2