• Page:
  • 1

Using JRoute() inside Javascript

ONLINE

Using JRoute() inside Javascript

2 months ago
Hello Team,

If want to pass link to JRoute inside Javascript,
you can try using

	<script>
        var link = "index.php?option=com_invoices&controller=quote&task=edit&cid[]="+check;
	// 'check' is a javascript variable 
        
	var sef_link = '<?php echo JRoute::_("'+link+'")?>';
	</script>

Hope this helps...
Last Edit: 2 months ago by Abhinav Jaiswal.
ONLINE

Re: Using JRoute() inside Javascript

2 months ago
I do not think this will work....instead just put the non sef url in JavaScript
ONLINE

Re: Using JRoute() inside Javascript

2 months ago
Yes Sir.. figured that
  • Page:
  • 1
Moderators: Pooja Menon

Upcoming Events

No events found.

Who's Online