Disabling Javascript Buttons
<p>The following code provided is for buying packages on my website. For an example of my issue, go to <a href="http://www.gldesert.com/donate/packages/ranks/?checkbox1=on&amp;checkbox2=on&amp;checkbox3=on&amp;submit=PROCEED+%3AD" rel="nofollow">http://www.gldesert.com/donate/packages/ranks/?checkbox1=on&amp;checkbox2=on&amp;checkbox3=on&amp;submit=PROCEED+%3AD</a>. When clicking the Add to Cart button, it opens the pop-up to Buycraft, a Minecraft shopping cart. But if you add another item to the cart, it closes the pop-up. How do I keep it open?</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html&gt;&lt;head&gt;
&lt;html class="no-js" lang="pt-BR" dir="ltr" xml:lang="pt-BR"&gt;
&lt;meta name="google" value="notranslate"&gt;    
    &lt;link rel="stylesheet" href="/css/reset.css" type="text/css" media="screen"&gt;
    &lt;link rel="stylesheet" href="/css/ranksstyle.css" type="text/css" media="screen"&gt;
    &lt;link rel="stylesheet" href="/css/grid.css" type="text/css" media="screen"&gt;    
    &lt;script src="/js/jquery-1.6.2.min.js" type="text/javascript"&gt;&lt;/script&gt; 
    &lt;script src="/js/jquery.easing.1.3.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;script src="/js/tms-0.3.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;script src="/js/tms_presets.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;script src="/js/cufon-yui.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;script src="/js/cufon-replace.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;script src="/js/FF-cache.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;script src="/js/Kozuka_Gothic_Pro_OpenType_700.font.js" type="text/javascript"&gt;&lt;/script&gt;        
    &lt;script src="/js/Kozuka_Gothic_Pro_OpenType_500.font.js" type="text/javascript"&gt;&lt;/script&gt;            
    &lt;script src="/js/tabs.js" type="text/javascript"&gt;&lt;/script&gt;      
    &lt;script src="/js/superfish.js" type="text/javascript"&gt;&lt;/script&gt;         
    &lt;script src="/js/jquery.mousewheel.js" type="text/javascript"&gt;&lt;/script&gt;              
    &lt;script src="/js/jScrollPane.js" type="text/javascript"&gt;&lt;/script&gt;         
    &lt;script src="/js/script.js" type="text/javascript"&gt;&lt;/script&gt; 
    &lt;script src="/js/jquery.iframe.js"&gt;&lt;/script&gt;   
    &lt;script src="/js/jquery.collapse.js"&gt;&lt;/script&gt; 

&lt;style type="text/css"&gt; 
.menutitle{ 
cursor:pointer; 
margin-bottom: 5px; 
background-color:#ECECFF; 
color:#000000; 
width:140px; 
padding:2px; 
text-align:center; 
font-weight:bold; 
/*/*/border:1px solid #000000;/* */ 
} 

.submenu{ 
margin-bottom: 0.5em; 
} 
&lt;/style&gt;   
&lt;script type="text/javascript"&gt;

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-30249399-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

&lt;/script&gt;
&lt;script type="text/javascript"&gt;

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-30249399-2']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

&lt;/script&gt;
&lt;script type="text/javascript"&gt; 

var persistmenu="no" //"yes" or "no". Make sure each SPAN content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc) 
var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page only 

if (document.getElementById){ //DynamicDrive.com change 
document.write('&lt;style type="text/css"&gt;\n') 
document.write('.submenu{display: none;}\n') 
document.write('&lt;/style&gt;\n') 
} 

function SwitchMenu(obj){ 
if(document.getElementById){ 
var el = document.getElementById(obj); 
var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change 
if(el.style.display != "block"){ //DynamicDrive.com change 
for (var i=0; i&lt;ar.length; i++){ 
if (ar[i].className=="submenu") //DynamicDrive.com change 
ar[i].style.display = "none"; 
} 
el.style.display = "block"; 
}else{ 
el.style.display = "none"; 
} 
} 
} 

function get_cookie(Name) { 
var search = Name + "=" 
var returnvalue = ""; 
if (document.cookie.length &gt; 0) { 
offset = document.cookie.indexOf(search) 
if (offset != -1) { 
offset += search.length 
end = document.cookie.indexOf(";", offset); 
if (end == -1) end = document.cookie.length; 
returnvalue=unescape(document.cookie.substring(offset, end)) 
} 
} 
return returnvalue; 
} 

function onloadfunction(){ 
if (persistmenu=="yes"){ 
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname 
var cookievalue=get_cookie(cookiename) 
if (cookievalue!="") 
document.getElementById(cookievalue).style.display="block" 
} 
} 

function savemenustate(){ 
var inc=1, blockid="" 
while (document.getElementById("sub"+inc)){ 
if (document.getElementById("sub"+inc).style.display=="block"){ 
blockid="sub"+inc 
break 
} 
inc++ 
} 
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname 
var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid 
document.cookie=cookiename+"="+cookievalue 
} 

if (window.addEventListener) 
window.addEventListener("load", onloadfunction, false) 
else if (window.attachEvent) 
window.attachEvent("onload", onloadfunction) 
else if (document.getElementById) 
window.onload=onloadfunction 

if (persistmenu=="yes" &amp;&amp; document.getElementById) 
window.onunload=savemenustate 

&lt;/script&gt; 
&lt;body&gt;
&lt;center&gt;
&lt;div class="main"&gt;
  &lt;header&gt;
        &lt;div class="inner"&gt;
            &lt;div class="container"&gt;
                &lt;h1&gt;&lt;a href="/"&gt;GLD&lt;/a&gt;&lt;/h1&gt;
                &lt;ul class="login_panel"&gt;
                    &lt;li&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;/li&gt;
                &lt;/ul&gt;
                &lt;ul class="links"&gt;
                &lt;img style="width: 360px; height: 75px;" src="http://cache.multiplayuk.com/b/1-218175-560x95-2173-FFD117-FFFFFF.png" alt="" /&gt;
                &lt;/ul&gt;
            &lt;/div&gt;
        &lt;/div&gt;        &lt;div class="menu_block"&gt;
            &lt;div class="container"&gt;
                &lt;nav&gt;
                    &lt;ul class="sf-menu"&gt;
                        &lt;li class="active"&gt;&lt;a href="/donate"&gt;Donate&lt;/a&gt;
                        &lt;li&gt;&lt;a href="/donate/packages/special"&gt;Special Packages!&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="/donate/packages/upgrades"&gt;Rank Upgrades&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="/donate/packages/mcmmo"&gt;McMMO Points&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a href="/donate/packages/lightstones"&gt;Lightstones&lt;/a&gt;&lt;/li&gt;
    &lt;p&gt;&amp;nbsp;&lt;/p&gt;
                    &lt;/ul&gt;
                    &lt;div class="clear"&gt;&lt;/div&gt;
                &lt;/nav&gt;
            &lt;/div&gt;
        &lt;/div&gt;
&lt;/a&gt;
&lt;/b&gt;
&lt;/ul&gt;
&lt;div id="main"&gt;&lt;/li&gt;
&lt;center&gt;
&lt;div id="main"&gt;&lt;/li&gt;
    &lt;center&gt;
    &lt;p&gt;&amp;nbsp;&lt;/p&gt;
    &lt;p&gt;&amp;nbsp;&lt;/p&gt; 
&lt;div class="block small left" style="width:99%;"&gt;               
        &lt;table cellpadding="0" cellspacing="0" width="99%"&gt;
&lt;div id="masterdiv"&gt; 

&lt;div onclick="SwitchMenu('sub1')"&gt;&lt;/div&gt; 
&lt;span class="submenu" id="sub1"&gt; 
&lt;h2&gt;
&lt;script&gt;
$("iframe").src(url, optionalCallback, options); $("iframe").squirt(html, optionalCallback, options);
&lt;/script&gt;
&lt;script&gt;
$("&lt;iframe name='ajaxForm' /&gt;").src("http://gldesert.com/donate/transfer.php").attr('scrolling','no').width("1000").height("620").appendTo("h2");

$("iframe").src("http://gldesert.com/donate/transfer.php", function(iframe, duration) {;
}, {
  timeout: function() { alert("Oh no! The donation page is having an issue :( It will surely get fixed soon! Check back later and tell Joan!"); },
  timeoutDuration: 10000
});
&lt;/script&gt;
&lt;/h2&gt;
            &lt;tbody&gt;

                        &lt;tr&gt;
                            &lt;td style="text-align:left;"&gt;&lt;strong&gt;Sand Traveler&lt;/strong&gt;&lt;/td&gt;
                            &lt;td style="text-align:right;"&gt;&lt;strong&gt;4.99 USD&lt;/strong&gt;&lt;/td&gt;            
                            &lt;td style="text-align:right;"&gt;
                                &lt;form method="POST" action="https://buycraft.net/redirect/addcart/2031/2511" target="ajaxForm"&gt;
                                    &lt;input type="submit" value="Add to Cart" class="submit" class="menutitle" onclick="SwitchMenu('sub1')"&gt;
                                &lt;/form&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;                                   
                        &lt;tr&gt;
                            &lt;td style="text-align:left;"&gt;&lt;strong&gt;&lt;span style="color: #7FF07F;"&gt;VIP&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
                            &lt;td style="text-align:right;"&gt;&lt;strong&gt;14.99 USD&lt;/strong&gt;&lt;/td&gt;            
                            &lt;td style="text-align:right;"&gt;
                                &lt;form method="POST" action="https://buycraft.net/redirect/addcart/2031/2489" target="ajaxForm"&gt;
                                    &lt;input type="submit" value="Add to Cart" class="submit" class="menutitle" onclick="SwitchMenu('sub1')"&gt;
                                &lt;/form&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;               
                        &lt;tr&gt;
                            &lt;td style="text-align:left;"&gt;&lt;strong&gt;&lt;span style="color: #00BF00;"&gt;Premium&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
                            &lt;td style="text-align:right;"&gt;&lt;strong&gt;29.99 USD&lt;/strong&gt;&lt;/td&gt;            
                            &lt;td style="text-align:right;"&gt;
                                &lt;form method="POST" action="https://buycraft.net/redirect/addcart/2031/2517" target="ajaxForm"&gt;
                                    &lt;input type="submit" value="Add to Cart" class="submit" class="menutitle" onclick="SwitchMenu('sub1')"&gt;
                                &lt;/form&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;                       
                        &lt;tr&gt;
                            &lt;td style="text-align:left;"&gt;&lt;strong&gt;&lt;span style="color: #5252FA;"&gt;Exiled&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
                            &lt;td style="text-align:right;"&gt;&lt;strong&gt;39.99 USD&lt;/strong&gt;&lt;/td&gt;            
                            &lt;td style="text-align:right;"&gt;
                                &lt;form method="POST" action="https://buycraft.net/redirect/addcart/2031/2520" target="ajaxForm"&gt;
                                    &lt;input type="submit" value="Add to Cart" class="submit" class="menutitle" onclick="SwitchMenu('sub1')"&gt;
                                &lt;/form&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;


                        &lt;tr&gt;
                            &lt;td style="text-align:left;"&gt;&lt;strong&gt;&lt;span style="color: #B500B5;"&gt;Captain [Most Popular!]&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
                            &lt;td style="text-align:right;"&gt;&lt;strong&gt;69.99 USD&lt;/strong&gt;&lt;/td&gt;            
                            &lt;td style="text-align:right;"&gt;
                                &lt;form method="POST" action="https://buycraft.net/redirect/addcart/2031/2521" target="ajaxForm"&gt;
                                    &lt;input type="submit" value="Add to Cart" class="submit" class="menutitle" onclick="SwitchMenu('sub1')"&gt;
                                &lt;/form&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td style="text-align:left;"&gt;&lt;strong&gt;&lt;span style="color: #00AAAA;"&gt;Veteran! [NEW!]&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
                            &lt;td style="text-align:right;"&gt;&lt;strong&gt;99.00 USD&lt;/strong&gt;&lt;/td&gt;            
                            &lt;td style="text-align:right;"&gt;
                                &lt;form method="POST" action="https://buycraft.net/redirect/addcart/2031/70786" target="ajaxForm"&gt;
                                    &lt;input type="submit" value="Add to Cart" class="submit" class="menutitle" onclick="SwitchMenu('sub1')"&gt;
                                &lt;/form&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td style="text-align:left;"&gt;&lt;strong&gt;&lt;span style="color: #E3C100;"&gt;1337&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
                            &lt;td style="text-align:right;"&gt;&lt;strong&gt;133.70 USD&lt;/strong&gt;&lt;/td&gt;            
                            &lt;td style="text-align:right;"&gt;
                                &lt;form method="POST" action="https://buycraft.net/redirect/addcart/2031/2522" target="ajaxForm"&gt;
                                    &lt;input type="submit" value="Add to Cart" class="submit" class="menutitle" onclick="SwitchMenu('sub1')"&gt;
                                &lt;/form&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;

                        &lt;tr&gt;
                            &lt;td style="text-align:left;"&gt;&lt;strong&gt;&lt;span style="color: #FF5757;"&gt;Desert Sage&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
                            &lt;td style="text-align:right;"&gt;&lt;strong&gt;79.99! &lt;del&gt;159.99 USD&lt;/del&gt;&lt;/strong&gt;&lt;/td&gt;            
sale                            &lt;td style="text-align:right;"&gt;
                                &lt;form method="POST" action="https://buycraft.net/redirect/addcart/2031/2524" target="ajaxForm"&gt;
                                    &lt;input type="submit" value="Add to Cart" class="submit" class="menutitle" onclick="SwitchMenu('sub1')"&gt;
                                &lt;/form&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td style="text-align:left;"&gt;&lt;strong&gt;&lt;span style="color: #0000E3;"&gt;Dark King&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
                            &lt;td style="text-align:right;"&gt;&lt;strong&gt;99.99! &lt;del&gt;199.99 USD&lt;/del&gt;&lt;/strong&gt;&lt;/td&gt;            
                            &lt;td style="text-align:right;"&gt;
                                &lt;form method="POST" action="https://buycraft.net/redirect/addcart/2031/3100" target="ajaxForm"&gt;
                                    &lt;input type="submit" value="Add to Cart" class="submit" class="menutitle" onclick="SwitchMenu('sub1')"&gt;
                                &lt;/form&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;



&lt;/center&gt;
&lt;/body&gt;
      &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/blockquote&gt;
    &lt;/div&gt;
&lt;h3&gt;&lt;p style="color:#FF0000"&gt;IMPORTANT!: Please Do NOT Use Internet Explorer! It will not work...!  CHROME, FIREFOX, ETC WILL WORK!&lt;/p&gt;&lt;/h3&gt;
&lt;h3&gt;&lt;p style="color:#FF0000"&gt;IF YOU REALLY MUST, GO TO THIS PAGE:&lt;a href="http://gldesert.buycraft.net/"&gt;CLICK HERE&lt;/a&gt;&lt;/p&gt;&lt;/h3&gt;
&lt;h3&gt;&lt;a&gt;&lt;p style="color:#FF0000"&gt;50% OFF DESERT SAGE &amp; DARK KING!&lt;/a&gt;&lt;/p&gt;&lt;/h3&gt;
&lt;br&gt; 

&lt;/span&gt; 


&lt;/div&gt;
&lt;/html&gt;
</code></pre>
