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
new window popups...
Moderator: General Moderators
- evilmonkey
- Forum Regular
- Posts: 823
- Joined: Sun Oct 06, 2002 1:24 pm
- Location: Toronto, Canada
Here's a page that shows you how to do it yourself:
http://javascript.about.com/library/wee ... 31203a.htm
http://javascript.about.com/library/wee ... 31203a.htm
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
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:
and now heres the code to display my pop-up window with the picture:
as soon as i click the link for the cart.php file i get an error!
any ideas whats going wrong?
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>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">any ideas whats going wrong?
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"
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.