When we checked the Radio Button Want to redirect to other page in other window

Asish1
Tera Contributor

Hi,

We have 3 radio buttons in a form, whenever I checked the 3rd radio button then it should be redirected to a page in other window is it possible, if yes please help...

 

Thanks,

Asish

1 ACCEPTED SOLUTION

Aman Kumar S
Kilo Patron

@Asish 

Have a onChange client script on the checkbox add below lines

  if (newValue == "true") {
        var url = "https://community.servicenow.com/"
	
         top.window.open(url);
    }
Best Regards
Aman Kumar

View solution in original post

12 REPLIES 12

Taranjeet Singh
Giga Expert

Hi Asish,

 

You can create an onChange client script and use below code in the script:

window.open("https://community.servicenow.com/","_blank");

 

Replace "https://community.servicenow.com/" with the url you want.

 

If my answer helped you in any way, please then mark it as helpful.

Taranjeet

Hi @Taranjeet Singh 

Thanks for the reply !!!!!

I tried this bur not working any suggestions...

find_real_file.png

Thanks,

Asish

Try this:

 

function onChange(control, oldValue, newValue, isLoading) {
	if (isLoading || newValue == '')
		return;
	
	if (newValue == 'value') { // value of the radio button
		window.open("https://community.servicenow.com/","_blank");
	} 
		
}

Hi @Taranjeet Singh 

Thanks for the reply !!

Tried with the script you have kept.. but operation is not happening.

 

Thanks,

Asish