Jump to content

INPUT FORMS


Closure

Recommended Posts

Hello,

 

I have a code to send mail to other users, I have recently created a feature where they can ask for tracking their mails to know its been read.

I have the code, so you have a button to click if you want tracking. It pops up, you click OK then it takes you to the same page but with &track=Y in the URL.

The code below is the main part, the send button will only work if the user has clicked track, it now wont send normal mail without clicking the track. The send button just doesnt work, just keep clicking and no actions done.

 

I feel the error is to do with the INPUT forms, IE:

<INPUT TYPE="button" value="Confirm Read" onClick="go_there()"><SCRIPT LANGUAGE="JavaScript">

 

and the send form:

echo "<input type=submit value=Send>";

 

 

Are they conflicting each other?

if the $track = Y then the Confirm Read form isnt there, therefore it works...

 

Any help would be great.

James

 

 

 

 

				if ($track != "Y"){

?>
			<SCRIPT language="JavaScript">
<!--
function go_there()
{
var where_to= confirm("Want confirmation of being read? (5 a day)");
if (where_to== true)
{
   window.location="http://www.igamehere.com/imail.php?action=send&id=<? echo"$muser1[id]"; ?>&track=Y";
}
else
{
  window.location="http://www.igamehere.com/imail.php?action=send&id=<? echo"$muser1[id]"; ?>";
  }
}
//-->
</SCRIPT>

			<BR>
<FORM>
<INPUT TYPE="button" value="Confirm Read" onClick="go_there()"><SCRIPT LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=700,height=400,left = 470,top = 350');");
}
</script>
<A HREF="javascript:popUp('pophelp.php?note=receipt')"><img src=qmark1.png width=10 height=15></A><bR><bR>
<script language='javascript' type='text/javascript'>

function shownormal()

{

var shownormallink=document.getElementById('normal').style;

if(shownormallink.display!='block')

{

shownormallink.display='block';

}

else

{

shownormallink.display='none';
}

}
</script>
</FORM>
<? }else{
echo "<br>[<a href=imail.php?action=send&id=$muser1[id]>Remove Confirmation</a>]";
$track = "Y";
}
                echo "<p><img src=image/misc/imail.gif><b><font color=5EDA9E>Message</font></b>: <br>";

                echo "<textarea rows=10 cols=70 wrap=on name=message>";

                if ($repl == 1){
                        echo "\n\n\nReply to $muser1[username]'s message:\n";
                        echo "$repl5";
                }

                echo "</textarea>";
	 echo "<input type=hidden name=action value=sent>";
                echo "<input type=submit value=Send>";
                echo "</form></center>";
			}
			}

Link to comment
https://forums.phpfreaks.com/topic/198211-input-forms/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.