osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Popup window upon clicking a hyperlinked banner

This is a discussion on Popup window upon clicking a hyperlinked banner within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi, I have made a new info box, and placed a bannner in it. I want it to be hyerlinked ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 02-04-2005, 12:32 PM
developer_x's Avatar
Active Member
 
Join Date: Nov 2004
Location: Digital Infoway
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
developer_x
Default Popup window upon clicking a hyperlinked banner

Hi,
I have made a new info box, and placed a bannner in it. I want it to be hyerlinked through a popup window linked to another site.

How can i embedd this javascript code into catalog/includes/boxes/my_box.php?

<a href="http://chat.boldchat.com/chat/visitor.jsp?cdid=961164255" target="_blank" onClick="this.newWindow = window.open('http://chat.boldchat.com/chat/visitor.jsp?cdid=961164255&url=' + document.location, 'Chat', 'toolbar=0,scrollbars=1,location=0,statusbar=0,men ubar=0,resizable=1,width=640,height=480'); this.newWindow.focus(); this.newWindow.opener = window;return false;"><img alt="Live chat by Boldchat" src="http://www.roseluggage.com/images/headbabe12.jpg" border="1"></a>


I know where to embedd it:

$info_box_contents[] = array('align' => 'center',
'text' => '<a href="http://chat.boldchat.com/chat/visitor.jsp?cdid=961164255">' . tep_image (DIR_WS_IMAGES . 'headbabe12.jpg', 'LiveSales') . '</a>' );

But I need to use the javascript coding in order to get a pop up window.

Any help would be greatly appreciated.

Regards,
|rf@N
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 02-04-2005, 02:51 PM
Active Member
 
Join Date: Jun 2004
Location: Glued to Computer Chair
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
makemethis
Default RE: Popup window upon clicking a hyperlinked banner

look at how the popup image for a large image is done...should be similar coding
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 02-07-2005, 08:39 PM
developer_x's Avatar
Active Member
 
Join Date: Nov 2004
Location: Digital Infoway
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
developer_x
Default RE: Popup window upon clicking a hyperlinked banner

Thanks for replying. I have done that. But it still doesn't work. I have to use this javascript code:

Quote:
<a href="http://chat.boldchat.com/chat/visitor.jsp?cdid=961164290" target="_blank" onClick="this.newWindow = window.open('http://chat.boldchat.com/chat/visitor.jsp?cdid=961164290&url=' + document.location, 'Chat', 'toolbar=0,scrollbars=1,location=0,statusbar=0,men ubar=0,resizable=1,width=640,height=480'); this.newWindow.focus(); this.newWindow.opener = window;return false;"><img alt="Live chat by Boldchat" src="http://www.roseluggage.com/images/headbabe12.jpg" border="1"></a>
so that someone clicks the image of a box 'live_salesperson.php", boldchat's live support opens up in a pop up window. The coding of live_salespersons.php is:

Quote:
<!-- specials //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_LIVE_SALESPERSONS);

new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_LIVE_SALESPERSONS));

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => '<a href="http://chat.boldchat.com/chat/visitor.jsp?cdid=961164290">' . tep_image (DIR_WS_IMAGES . 'headbabe12.jpg', 'LiveSales') . '</a>' );

new infoBox($info_box_contents);

?>
</td>
</tr>
<!-- specials_eof //-->
This works. But i need a popup window. I think my problem is that i have to correclty use javascript code with in the single quotes which are infront of 'text' => .
Someone talked about quotes within quotes are not allowed.

I tried this but doesn't work. Code is:

Quote:
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_LIVE_SALESPERSONS);

new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_LIVE_SALESPERSONS));

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
//'text' => '<a href="http://chat.boldchat.com/chat/visitor.jsp?cdid=961164290">' . tep_image (DIR_WS_IMAGES . 'headbabe12.jpg', 'LiveSales') . '</a>');
'text' => ?>
<script language="javascript"><!--
document.write('<?php echo '<a href="javascriptopupWindow(\\\' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>' ?>');
//--></script>
<?php );
new infoBox($info_box_contents);

?>
I didn't copied the javascript function again. although it is there.
Any suggestions?

Regards,
|rf@N
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 02-08-2005, 09:12 PM
developer_x's Avatar
Active Member
 
Join Date: Nov 2004
Location: Digital Infoway
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
developer_x
Default RE: Popup window upon clicking a hyperlinked banner

I had contacted a person who had done the popup window feature at her site. And she was clearly not willing to cooperate. It is really pathetic when people of the open soure don't share knowledge after getting help from the community themselves.
It should not have taken this much time to fix this problem. All I needed to do was to add an extrabacks slash before a few single quotes. I repeat in order to embed the bold chat coding in to the single quotes of an associative array of php, you need to change a few ' to \' . My coding is given below:

Quote:

$info_box_contents[] = array('align' => 'center',
'text' => '<a href="http://chat.boldchat.com/chat/visitor.jsp?cdid=961164290" target="_blank" onClick="this.newWindow = window.open(\'http://chat.boldchat.com/chat/visitor.jsp?cdid=961164290&url=\' + document.location, \'Chat\', \'toolbar=0,scrollbars=1,location=0,statusbar=0,me nubar=0,resizable=1,width=640,height=480\'); this.newWindow.focus(); this.newWindow.opener = window;return false;"> ' . tep_image (DIR_WS_IMAGES . 'banner_livesales.jpg', 'LiveSales') . '</a>');
If you want to see it in action , visit the site where I used this code:

www.roseluggage.com

Regards,
Irfan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Anyway to get a popup window from FCK editor?? Redeye_Joe osCMax v2 Features Discussion 1 03-07-2006 01:00 PM
how to make popup window scrolling? technoboy osCMax v2 Customization/Mods 1 02-08-2006 12:26 PM
Scrollable popup window fuzzyphil osCMax v1.7 General Mods Discussion 0 10-10-2005 03:39 AM
Help changing text in popup window titlebar groggory osCMax v1.7 Discussion 4 12-08-2004 10:08 AM
popup window too small jlee osCommerce 2.2 Modification Help 1 02-18-2003 01:24 PM


All times are GMT -8. The time now is 08:52 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax