[ic] Discounts

cblevins at macronet.com cblevins at macronet.com
Wed Feb 28 15:33:09 EST 2007


cblevins at macronet.com writes: 

> I have this in results_buylist.  The popup returns all the info correctly,
> if the search returns just one product.  If multiple items are returned
the
> popup displays the info for the last item on the page.  I have searched
> through the list and cannot find anything relating to this particular
> problem. I am using IC 5.5.0-200612100658.  What am I overlooking? 
> 
> <script language="JavaScript">
> <!--
> // This is the function that will open the
> // new window when the mouse is moved over the link
> function open_new_window()
> {
> new_window =
>
open("","hoverwindow","width=500,height=100,left=10,top=10","toolbar=no,loca
> tion=no,status=no,menubar=no"); 
> 
> // open new document
> new_window.document.open(); 
> 
> new_window.document.write("<html><title>Best Price for
> [item-code]</title>");
> new_window.document.write("<body bgcolor=\"#FFFFFF\">"); 
> 
> new_window.document.write("<table><tr>[if discount [item-code]]<TD
> ALIGN=right valign=\"top\">[L]Regular price[/L]
> <STRIKE>[item-price]</STRIKE><br><B>[L]Your price[/L]: [price discount=1
> code="[item-code]"]<br>[L]You save[/L]: [currency][calc][item-price
> noformat=1] -  [price discount=1
> code="[item-code]"noformat=1][/calc][/currency]</TD>[/if]</tr></table>"); 
> 
> new_window.document.write("<br>");
> new_window.document.write("</body></html>"); 
> 
> // close the document
> new_window.document.close();
> } 
> 
> // This is the function that will close the
> // new window when the mouse is moved off the link
> function close_window()
> {
> new_window.close();
> } 
> 
> // -->
> </script> 
> 
> 
> <td>[if discount [item-code]]<a href="#" onClick="open_new_window()"><font
> size="1" color="red">Click Here for<br>Our Best Price</font></a>[/if]</td>

> 
> Thanx In Advance,
> Carol

I'm not sure if this would work. The results page is going through all 
results and for each new result things like [item-code] etc change ... 
Eventually you are at the end of the displayed results and [item-code] will 
remain keeping that value. So that makes sense that the popup will always 
show the last item. 

Did you find this code somewhere claiming this would work, or did you write 
it yourself? 

CU, 

Gert
_______________________________________________
interchange-users mailing list
interchange-users at icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users

Oh no, I muddled myself through this one :)

Carol



More information about the interchange-users mailing list