...

View Full Version : js link quota problem in php



zodehala
02-25-2008, 10:46 AM
echo '<a href="JavaScript:window.open('index.php?do=logout', 'newWindow')">click here</a>';

when i use single quota it gives error . how can i do it ?

Inigoesdr
02-25-2008, 02:05 PM
<?php
// php code
?>
<a href="javascript:window.open('index.php?do=logout', 'newWindow')">click here</a>
Or escape the quotes with a backslash.

zodehala
02-25-2008, 09:25 PM
<?php
// php code
?>
<a href="javascript:window.open('index.php?do=logout', 'newWindow')">click here</a>
Or escape the quotes with a backslash.

i did it like


echo '<a href="JavaScript:window.open(\'index.php?do=logout\' ,\'newWindow\')">click here</a>';

but a windows is up agian (its content is [object Window])

i want only it goes link i gave and no any window. ?

Inigoesdr
02-25-2008, 09:28 PM
Try:
<a href="javascript:window.location('index.php?do=logout')">click here</a>
If that doesn't work make a post in the Javascript forum.

zodehala
02-26-2008, 08:31 AM
Try:
<a href="javascript:window.location('index.php?do=logout')">click here</a>
If that doesn't work make a post in the Javascript forum.

it does not run



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum