Welcome Guest, Not a member yet? Register   Sign In
Javascript
#1

[eluser]the_unforgiven[/eluser]
I have some javascript

Code:
echo '[removed]
      alert("Meeting successfully added. Click OK to continue.");
      location = "../admin/clientlist/"; //How do i get the uri in this line
  [removed]';

And I need it to redirect back to the page that has the id on like this:

http://localhost/kproject/admin/updateclient/2
#2

[eluser]meigwilym[/eluser]
Try

Code:
echo '[removed]
      alert("Meeting successfully added. Click OK to continue.");
      location = "'.site_url('admin/clientlist').'";
      [removed]';

Mei
#3

[eluser]the_unforgiven[/eluser]
then how would i get the id like in the url shown
#4

[eluser]Jason Stanley[/eluser]
Like this?

Code:
echo '[removed]
      alert("Meeting successfully added. Click OK to continue.");
      location = "'.site_url('admin/clientlist/'.$id).'";
      [removed]';

Where are you getting the id from?
#5

[eluser]the_unforgiven[/eluser]
Cheers I'll give that a whirl
#6

[eluser]InsiteFX[/eluser]
To display script tags just change the s to $
Code:
// change the $cript to script - $ to s
echo '<$cript>
      alert("Meeting successfully added. Click OK to continue.");
      location = "'.site_url('admin/clientlist/'.$id).'";
      </$cript>';




Theme © iAndrew 2016 - Forum software by © MyBB