I want a new page to be opened when a button is pressed. Here is my code so far:
<input name="newThread" type="button" value="New Discussion" onclick="window.open('Political/Thread/thread_insert.php')"/>
It fails, however, ..I think the path is incorrect, but I dont know why..cause it is the correct directory path…
Your code is correct (valid and function), you problem is the your path.
Remember that page location is the page inside the web server and relative to the current page location.
So if your web server root is for example
c:\wamp\wwwthen the web addresstest/test.phpwill look for the real page ofc:\wamp\www\test\test.php. However the same address encoded into a page already in a subdirectory will be relative unless it starts with/So from the page test/test.php in the above example the link to
test/test.phpwill become/test/test/test.php(with a real path ofc:\wamp\www\test\test\test.php)If you have copied the link from another page somewhere this is probably the problem