Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
Hi Guys.

I've been working on this for like a week now and it's giving me a problem with the selected item. It's not working, please can you assist?

XML
   <script src="https://pcmchatproxy3.valueactive.eu/js/MgsLiveChatControl.js" type ="text/javascript"></script>  
<script type ="text/javascript">
        
        function nav()
        {
           var w = document.jump.menu.selectedIndex;
           var url_add = document.jump.menu.options[w].value;
           
//           nav1(url_add);
//     
//        }
//        
//        function nav1(url_add)
//        {
            if (url_add == 0)
            {   
                LoadPromotions();
            }
            else if (url_add == 1)
            {
                LoadBanking();
            }
            else if (url_add == 2)
            {
                LoadFAQS();
            }
            else if (url_add == 3)
            {
                LoadSupport();
            }
        }
        
     function LoadSupport()
     {  
		try
		{
		    
	        var CasinoId = "322";
	        var BrowserLanguage = "En"; 
	        var SessionLanguage = "En";                
	        var TopPosition = "350";
	        var LeftPosition = "300";   
	        var Resource = "Website: Contact US";        
	        var AutoLogin = true;
	        var DisableProxyPopUp = false;
	        var ProxyPageURL = "     ";
	        var TrackingGuid = ""; 
	        var PlayerLoginName = "";
	        var SystemType = "2";
	        var SessionId = "";
	        var SessionType = "";
	        var NotificationURL = ""
	        var PSLLoginName = "";
		    var stepId = "1420";
	        
	        MgsLiveChatControl.InitializeMgsLiveChatControl(CasinoId, BrowserLanguage, SessionLanguage, TrackingGuid, PlayerLoginName, SystemType, SessionId, SessionType, AutoLogin, TopPosition, LeftPosition, Resource, DisableProxyPopUp, ProxyPageURL, PSLLoginName,NotificationURL,CasinoId, stepId);
	     }
		catch(Error)
		{
		}		
     } 
 
     function LoadPromotions()
     {  
		try
		{
		    
	        var CasinoId = "322";
	        var BrowserLanguage = "En"; 
	        var SessionLanguage = "En";                
	        var TopPosition = "350";
	        var LeftPosition = "300";
	        var Resource = "Website:Promotions";        
	        var AutoLogin = true;
	        var DisableProxyPopUp = false;
	        var ProxyPageURL = "     ";
	        var TrackingGuid = "";
	        var PlayerLoginName = "";
	        var SystemType = "2";
	        var SessionId = "";
	        var SessionType = "";
	        var NotificationURL = ""
	        var PSLLoginName = "";
		    var stepId = "1438";
	        
	        MgsLiveChatControl.InitializeMgsLiveChatControl(CasinoId, BrowserLanguage, SessionLanguage, TrackingGuid, PlayerLoginName, SystemType, SessionId, SessionType, AutoLogin, TopPosition, LeftPosition, Resource, DisableProxyPopUp, ProxyPageURL, PSLLoginName,NotificationURL,CasinoId, stepId);
		}
		catch(Error)
		{
		}		
     }
</script>
</head>
<body>
<form name="jump">
<select name="menu" onchange = "javascript:nav()">
<OPTION VALUE="javascript:LoadPromotions()">Promotions</OPTION>
<OPTION VALUE="javascript:LoadBanking()">Banking</OPTION>
</select>


Thanks,
Ndeza
Posted
Updated 7-Mar-11 23:28pm
v2
Comments
LittleYellowBird 8-Mar-11 5:29am    
Hi, it would be a big help to people if you could explain in what way it does not work and what you have tried. I think you will get hep more quicly that way. :)
m@dhu 8-Mar-11 7:31am    
From OP: Hi Alison, This code will be bring up a chat service pop when they select a value from the drop down list. this will automatically redirect them to the chat service. Thanks, Monde
@nuraGGupta@ 8-Mar-11 7:12am    
From OP: Hi Alison,

This code will be bring up a chat service pop when they select a value from the drop down list. this will automatically redirect them to the chat service.

Thanks,
Monde
m@dhu 8-Mar-11 7:30am    
Use reply at right corner to reply to the op.
ndeza 8-Mar-11 9:17am    
Hi Alison, This code will be bring up a chat service pop when they select a value from the drop down list. this will automatically redirect them to the chat service. Thanks, Monde

1 solution

Hi,

Here is the corrected version of your code. But I am not sure about your chat control. The selection box will work fine now.
C#
<script src="https://pcmchatproxy3.valueactive.eu/js/MgsLiveChatControl.js" type ="text/javascript"></script>  
<script type ="text/javascript">
        
        function nav(dropDown)
        {
 		   
		   var w = dropDown.selectedIndex;
           var url_add = dropDown.options[w].value;
        
//           nav1(url_add);
//     
//        }
//        
//        function nav1(url_add)
//        {
            if (url_add == "Promotions")
            {   
                LoadPromotions();
            }
            else if (url_add == "Banking")
            {
                LoadBanking();
            }
            else if (url_add == 2)
            {
                LoadFAQS();
            }
            else if (url_add == 3)
            {
                LoadSupport();
            }
        }
        function LoadBanking()
     {
	 
	 }
     function LoadSupport()
     {  
		try
		{
		    
	        var CasinoId = "322";
	        var BrowserLanguage = "En"; 
	        var SessionLanguage = "En";                
	        var TopPosition = "350";
	        var LeftPosition = "300";   
	        var Resource = "Website: Contact US";        
	        var AutoLogin = true;
	        var DisableProxyPopUp = false;
	        var ProxyPageURL = "     ";
	        var TrackingGuid = ""; 
	        var PlayerLoginName = "";
	        var SystemType = "2";
	        var SessionId = "";
	        var SessionType = "";
	        var NotificationURL = ""
	        var PSLLoginName = "";
		    var stepId = "1420";
	        
	        MgsLiveChatControl.InitializeMgsLiveChatControl(CasinoId, BrowserLanguage, SessionLanguage, TrackingGuid, PlayerLoginName, SystemType, SessionId, SessionType, AutoLogin, TopPosition, LeftPosition, Resource, DisableProxyPopUp, ProxyPageURL, PSLLoginName,NotificationURL,CasinoId, stepId);
	     }
		catch(Error)
		{
		}		
     } 
 
     function LoadPromotions()
     {  
	 try
		{
		    
	        var CasinoId = "322";
	        var BrowserLanguage = "En"; 
	        var SessionLanguage = "En";                
	        var TopPosition = "350";
	        var LeftPosition = "300";
	        var Resource = "Website:Promotions";        
	        var AutoLogin = true;
	        var DisableProxyPopUp = false;
	        var ProxyPageURL = "     ";
	        var TrackingGuid = "";
	        var PlayerLoginName = "";
	        var SystemType = "2";
	        var SessionId = "";
	        var SessionType = "";
	        var NotificationURL = ""
	        var PSLLoginName = "";
		    var stepId = "1438";
	        MgsLiveChatControl.InitializeMgsLiveChatControl(CasinoId, BrowserLanguage, SessionLanguage, TrackingGuid, PlayerLoginName, SystemType, SessionId, SessionType, AutoLogin, TopPosition, LeftPosition, Resource, DisableProxyPopUp, ProxyPageURL, PSLLoginName,NotificationURL,CasinoId, stepId);
		}
		catch(Error)
		{
			alert(Error);
		}		
     }
</script>

XML
</head>
<body>
<form name="jump">
<select name="menu" onchange = "javascript:nav(this)">
<OPTION VALUE="Promotions">Promotions</OPTION>
<OPTION VALUE="Banking">Banking</OPTION>
</select>
 
Share this answer
 
Comments
ndeza 10-Mar-11 3:12am    
Hi AlbinAbel,

Thank you for your reply will test it out and let you know.
Thanks,
Ndeza

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900