Jump to content

Recommended Posts

print"<br> Screening: <font color=\"red\">$screenstatus</font></b>&nbsp&nbsp&nbsp<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 "

Link to comment
https://forums.phpfreaks.com/topic/172389-solved-please-help/
Share on other sites

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.

 

Link to comment
https://forums.phpfreaks.com/topic/172389-solved-please-help/#findComment-908923
Share on other sites

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>&nbsp&nbsp&nbsp<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>

 

Link to comment
https://forums.phpfreaks.com/topic/172389-solved-please-help/#findComment-908934
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/172389-solved-please-help/#findComment-908942
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.