JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 14th, 2001, 08:08 PM
qipix qipix is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Posts: 3 qipix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Javascript pop-ups within PHP

Hi, I am trying to have a pop-up box using javascript for the more info button in my shopping cart but I cannot seem to get the javascript to work within the php.
Can anyone let me know why this isn't working. the code is below...

php part:

PHP Code:
while ($r mysql_fetch_array($result)) { // Begin while 
extract($r);

echo 
"
while (
$r = mysql_fetch_array($result)) { // Begin while 
extract(
$r);

echo "
<tr>
<
td><font>$category</font></td>
<
td><font>$productname</font></td>
<
td><font>$ $price</font></td>
<
td><a href='javascript:popUp('products2.php?key='$id')'>More Info</a></td>
<td><form action=cart.php method=get>
<input type=hidden name=item value=$id>
<font>Quantity:</font><input type=text name=qty value=1 size=3>
<input type=submit value=ADD>
</form></td>
</tr>
"; 
} // end while 
echo "</table>"; 


and this is the javascript that it is calling:


<SCRIPT LANGUAGE="JavaScript">
<!-- 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=250,height=200,left = 412,top = 284');");
}
// End -->
</script>

**
ignore this : <img src="images/smilies/tongue.gif" border="0" alt="">

it is supposed to be

Thanks

Last edited by qipix : November 14th, 2001 at 08:10 PM.

Reply With Quote
  #2  
Old November 14th, 2001, 08:26 PM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,912 AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 31
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
your echo's are messed up, and also it might be a good idea to specify what 'problem' you're having.
__________________
And you know I mean that.

Reply With Quote
  #3  
Old November 14th, 2001, 08:40 PM
qipix qipix is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Posts: 3 qipix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
the problem is that the javascript is not working at all but it will work when done in standard php, the echos stuffed up when I put them in cause of the smiles you can have, there was supposed to be a : next to a p but this makes a smiley face...
any ideas how to do it?

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Javascript pop-ups within PHP

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap