dweb77 Posted July 31, 2007 Share Posted July 31, 2007 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 <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> Quote Link to comment https://forums.phpfreaks.com/topic/62620-very-strange-javascriptphp-issue/ Share on other sites More sharing options...
btherl Posted July 31, 2007 Share Posted July 31, 2007 Does the browser report any javascript errors? If you post the full HTML for the page with the problem (or give us a link) I'm sure someone can work out what's wrong. The fact that the window never opens makes me think it's a syntax error with the javascript, triggered by certain characters. Quote Link to comment https://forums.phpfreaks.com/topic/62620-very-strange-javascriptphp-issue/#findComment-311711 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.