Jump to content
php.lv forumi
  • 0

alert un redirect


Question

5 answers to this question

Recommended Posts

  • 0
Posted (edited)

			if ( isset ( $_GET['add'] ) )
	{
		if (empty($_POST['tsss']))
				{
					echo '<script type="text/javascript">
					alert("text");
					document.location.href="index.php";
					</script>';
					echo '</td>';
					require_once('footer.php');
					exit;
				}
			else

		echo "<br><br>";
		echo "seuccess :D!";
		echo '</td>';
		require_once('footer.php');
		exit;
				}
	}

 

kāpēc man pēc js nerāda footer ? :)

Edited by edi
  • 0
Posted

tāpēc, ka document.location.href="index.php"; pārlādē lapu uz index.php. Iespējams, ka footers vairs nepaspēj parādīties, pirms lapa pārlādējas.

  • 0
Posted

tāpēc, ka document.location.href="index.php"; pārlādē lapu uz index.php. Iespējams, ka footers vairs nepaspēj parādīties, pirms lapa pārlādējas.

tad man footer no sākuma palaist un tad js?

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...