Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7402403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:43:59+00:00 2026-05-29T04:43:59+00:00

On my page, the following function has been created: <SCRIPT language=javascript type=text/javascript> function popModData(

  • 0

On my page, the following function has been created:

<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:

while( $modTable = mysql_fetch_array( $getMod ) )
{
    $colour = ( $i % 2 )? "#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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T04:44:00+00:00Added an answer on May 29, 2026 at 4:44 am

    Surround the names with ” ” as you need javascript to parse them as strings.

    Like this:

    while( $modTable = mysql_fetch_array( $getMod ) )
    {
        $colour = ( $i % 2 )? "#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>";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote the following script for a page which has been loaded with a
I have the following Javascript code add_num = { f: function(html, num) { alert(this.page);
I am using the following html page: <html> <head> <title>AJAX Example</title> <meta http-equiv=Content-Type content=text/html;
I have the following code $(#logoutLink).click(function(event) { event.preventDefault(); var dataString = action=confirm; $.ajax({ type:
I have the following script inside a HTML page: <script> function Test(){ alert(i got
The following function was written for java and has been adapted for C. bool
Following function is used to get the page's base address of an address which
It has been suggested to me the following structure is preferred/standard to expose public
I have a HTML page with the following input tag: ... <input type=file id=browseContactImageButton
The following page is mucked up in IE8 -- the bulk of the content

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.