I post this in case there is a general answer:
I have a php script that run's a query, returns a set of records, then displays results with a hyperlink on a letter. The letter/link allows for the particular row to be deleted. The link is coded with a javascript that runs a php page, opening a new window and deletes the record from the database, the window indicating with the text that the record was deleted.
When the total records are 5 records or more, the window opens when clicking the link and deletes the record as it is supposed to. When there are 4 records or less, the link does not work. Nothing happens when clicking on the link. This is true on one page. However, another page has the exact same javascript link and will open the window successfully and process even with the records fewer than 4.
There is no place in the javascript code that references the number 4 or total records < 5.
Is there any general type of situation where this is an issue? I have included the Javascript code below but not the php.
Any thoughts. Thanks
I have a php script that run's a query, returns a set of records, then displays results with a hyperlink on a letter. The letter/link allows for the particular row to be deleted. The link is coded with a javascript that runs a php page, opening a new window and deletes the record from the database, the window indicating with the text that the record was deleted.
When the total records are 5 records or more, the window opens when clicking the link and deletes the record as it is supposed to. When there are 4 records or less, the link does not work. Nothing happens when clicking on the link. This is true on one page. However, another page has the exact same javascript link and will open the window successfully and process even with the records fewer than 4.
There is no place in the javascript code that references the number 4 or total records < 5.
Is there any general type of situation where this is an issue? I have included the Javascript code below but not the php.
Any thoughts. Thanks
Code:
<SCRIPT LANGUAGE="JavaScript">
function SaveRemove(page) {
OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=480,height=415,menubar=no,directories=no,location=no");
}
The link:
<a href="javascript:SaveRemove(\'school_remove.php?id=' . $sch['school_id'] . '&user=' . $user . '&name=' . $sch['s_id'] . '\',\'height=380,width=300,scrollbars=no\')"\;>R</a>