Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    18
    Member #
    28662
    I'm trying to get my shopping cart script to pop open a window for checkout when linked from an ImageMap, only it won't do this.

    It works fine if I post the code as-is on a blank page, but when linked from the ImageMap it won't pop-up the window, only opens the cart in a new tab.

    How can I get javascript to launch from an ImageMap Link? If anyone needs me to post the code let me know.

  2.  

  3. #2
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    depends on the Javascript that is used to open the new window... most modern browsers have a "pop up" blocker built in...

    turn that off and try the code... if it opens in a pop up window, then your javascript is one that is being blocked... usually not a problem for pages from the "same site" being called... but the whole reason for killing pop-ups was the fact so many site were being hacked and using javascript to open tons of "ad windows"...

    you could just do a straight "image map" instead of using javascript... you can't control the window size.. and browser elements.... ( status bar, nav buttons, etc...) but it will work...

  4. #3
    Junior Member
    Join Date
    Jul 2011
    Posts
    18
    Member #
    28662
    I have turned off the popup blocker, the code works fine when linked directly however when I link it from an image map it won't do the popup, only opens a new tab. I want it to pop-up whenever possible since my shopping cart is hosted and I don't want the customer seeing the URL initially, does not look as professional. Here is the actual code.

    It should be noted that this code will popup the window regardless if I have popups turned off or not, so I guess it's not a pop-up window in the traditional sense..I'm not sure what to call it. I tested it in Firefox and Opera with popups blocked and it still opens. (awesome!)

    Add to Cart Code Java
    Code:
    <a href="https://HOST URL/ecom/gb.php?c=cart&i=LFR-1&cl=HIDDEN&ejc=2" target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img src="HOST URL/ej/ej_add_to_cart.gif" border="0" alt="Add to Cart"/></a>
    View Cart Code Java
    Code:
    <a href="HOST URL/ecom/gb.php?c=cart&cl=HIDDEN&ejc=2" target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img src="HOST URL/ej/ej_view_cart.gif[/URL]" border="0" alt="View Cart"/></a>
    <script language="javascript" type="text/javascript">
    <!--
    function EJEJC_lc(th) { return false; }
    // -->
    </script>
    <script src='HOST URL/ecom/box.js' type='text/javascript'></script>

  5. #4
    Junior Member
    Join Date
    Jul 2011
    Posts
    18
    Member #
    28662
    I'm really very desperate to get this to work, my whole company is on hold until I can get this to function normally when linked from an image map, so if somebody could assist I would deeply appreciate it.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:54 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com