Page 1 of 1
new window popups...
Posted: Wed Jul 21, 2004 10:59 am
by sakaveli
hey guys,
just trying to figure out how i can make a new browser window pop up with out any of the tool bars or buttons showing on the new window? ive been reading through the manual but cant find much.. would i have to use javascript?
sak
Posted: Wed Jul 21, 2004 11:00 am
by evilmonkey
Yes, this is clientside. Use javascript.
Posted: Wed Jul 21, 2004 11:01 am
by qads
Posted: Wed Jul 21, 2004 11:17 am
by pickle
Posted: Wed Jul 21, 2004 11:35 am
by sakaveli
thanks for the info guys, im trying to get the pop-up up but im getting a run time error which ive never had before (i guess coz ive never used java script before)
what im basically trying to do it get a shopping cart to pop-up and request that the customer calls the sales hotline(done throught the phone us.jpg file) here the code for my link to the cart:
Code: Select all
<!-- FOOTER.PHP -->
</td><td valign="top">
<!-- right menu -->
<?
if (hasItemsInCart()) {
?>
<body alink="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF">
<A HREF="javascript:popUp('cart.php')"><img src="images/viewcart.jpg"></a>
<?
}
?>
</td></tr>
<tr><td colspan="3">
<center>
<!-- footer -->
<?
//include("include/db.php"); //everything should already be included from header.php
//$result = query("select footer from config");
$result = query("select footer from config");
$array = mysql_fetch_array($result,$db);
echo $arrayїfooter];
echo "<br><font size=1>".date("d/m/Y h:i:s")."</font>\n";
?>
</center>
</td></tr>
<? CloseTable(); ?>
</center>
</body>
</html>
and now heres the code to display my pop-up window with the picture:
Code: Select all
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Idea by: Nic Wolfe (Nic@TimelapseProductions.com) -->
<!-- Web URL: http://fineline.xs.mw -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
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=0,width=500,height=700,left = 262,top = 34');");
}
// End -->
</script>
<img src="images/phone us.jpg">
as soon as i click the link for the cart.php file i get an error!
any ideas whats going wrong?
Posted: Wed Jul 21, 2004 4:11 pm
by liljester
what is the error you get?
Posted: Wed Jul 21, 2004 4:15 pm
by pickle
Your window title (second argument) cannot have any spaces and I've also had problems with underline characters. Are you just trying to name it the value of the id variable? Why not just have id instead of all that string concatenation. Also, you cannot have any spaces in your feature list, such as "left = 262, top = 34"