Navigating to an URL on click not working — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register
Get Started with Redwood: Oracle Cloud SCM and Purchasing

Navigating to an URL on click not working

edited Apr 8, 2019 12:23PM in Visual Builder 1 comment

Summary

Simple Navigation to different URL is not working in Shell JS

Content

My requirement is to navigate to the different URL on click of a link. It's not working in Shell JS. When I write the code like below. 

$(document).on("click", ".localeLink", function(e) { 
var localeCode = e.target.id; 
if (localeCode == "en-US") { 
console.log("Navigate to google"; 
var url = "http://google.com"
$(location).attr('href', url); 

}); 

Navigate to google log is getting printed in the console. but the current page is not getting navigate to google.com. 
 

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!