DrTrans Posted August 29, 2009 Share Posted August 29, 2009 print"<br> Screening: <font color=\"red\">$screenstatus</font></b>   <input type=\"submit\" name=\"approve\" value=\"Approve\" onclick=\"window.open(\"google.com\", \"\",\",height=200,width=200\");\"></form><hr>\n"; / Dont know why it does not work.... it should onclick open " google.com " Quote Link to comment https://forums.phpfreaks.com/topic/172389-solved-please-help/ Share on other sites More sharing options...
premiso Posted August 29, 2009 Share Posted August 29, 2009 Not sure if this could be the problem, but try using type="button" instead of submit. As submit is really for submitting a form, which could be causing a conflict. If not, I would suggest getting FireFox and using it's Javascript Debugging built in program to help out where you have gone wrong, or even try making it an anchor tag. Quote Link to comment https://forums.phpfreaks.com/topic/172389-solved-please-help/#findComment-908923 Share on other sites More sharing options...
ldb358 Posted August 29, 2009 Share Posted August 29, 2009 try using single quotes in side the onclick attribute your only slashing out the quotes in php not in javascript Quote Link to comment https://forums.phpfreaks.com/topic/172389-solved-please-help/#findComment-908926 Share on other sites More sharing options...
DrTrans Posted August 29, 2009 Author Share Posted August 29, 2009 I have fixed and it is opening the window... however how do i pass the hidden fields threw the link.. Heres the database connect: $connect = mysql_connect("lXXXXXXX","XXXX",""); mysql_select_db($tpdbname); $query = "SELECT * FROM applicant WHERE Applicant_ID = '$applicant'"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { $applicantid = $row['Applicant_ID']; $appid = $row['ApplicantID']; $applicantfname = $row['FirstName']; $applicantlname = $row['LastName']; $applicantphone = $row['HomePhone']; $unitid = $row['PropertyID']; $applicantwphone = $row['WorkPhone']; Heres my window.open() if($screenstatus == "Declined") { print"<br> Screening: <font color=\"red\">$screenstatus</font></b>   <INPUT type=\"button\" value=\"Approve!\" onClick=\"window.open('approvedetail.php','mywindow','width=400,height=400')\"></form><hr>\n"; Basically when they click the approve button. it needs to know what the ID number of the record that they are approving. heres is what my applicantdetail.php file looks like: <html> <h4>Approval Required</h4> <form action="approvedetail.php" method="POST"> Approval For Applicant: <input type="text" name="applicant">$applicantid<br /> Approved By: <?php session_start(); $dbusername = $_SESSION['username']; echo"$dbusername"; ?><br /> Notes:<br /><textarea name="notes" cols="40" rows="10">Enter Notes Here...</textarea> <br /> <hr /><i>I have recorded your IP as:<?php echo $_SERVER['REMOTE_ADDR']; ?></i> <input type="submit" name="approve" value="Approve Applicant"> </form> Quote Link to comment https://forums.phpfreaks.com/topic/172389-solved-please-help/#findComment-908934 Share on other sites More sharing options...
premiso Posted August 29, 2009 Share Posted August 29, 2009 You should be able to access the fields using Javascript on the applicantdetail.php. Since this is the PHP forum and what you want will most likely require the use of Javascript I would suggest creating a new topic in the Javascript section, since the original question here was solved. Quote Link to comment https://forums.phpfreaks.com/topic/172389-solved-please-help/#findComment-908942 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.