Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [javascript]

JavaScript is a dynamically-typed language commonly used for client-side scripting. Unless a tag for a framework/library is also included, a pure JavaScript answer is expected.

2
votes
1answer
926 views

Stop Joomla! 3.4.1 from including scripts in custom component pages [duplicate]

I'm trying to prevent Joomla! 3.4.1 from loading certain default scripts in the front-end template when a custom component is displayed. I am excluding the scripts in the template index.php file as ...
2
votes
1answer
848 views

How can two libraries avoid loading the same Javascript library twice?

Let's say my extension makes use of a popular JQuery plugin. I can include the Javascript file in my extension and link to it using JHtml::script or another method. The trouble is that for all I know,...
1
vote
3answers
1k views

How do I use Javascript to find the baseurl, add some other parts of a url and open in a new page?

I'm using Joomla 3 and want to use Javascript to find the base url of the page, extend this url with some other bits and send a variable through the url. Then open this page in the same window. ...
0
votes
0answers
473 views

How do I make a system message appear with Javascript with the right CSS?

I would like to make a system message appear using Javascript. I have used the following code so far to make the system message appear: var jmsgs = ['Deletion cancelled - no records deleted.']; ...
1
vote
1answer
41 views

ReferenceError: 'getMainImage' is not defined but it is

There is a problem with this page: http://www.pubsaregreat.co.uk/culture?category=18&view=pubs It is not showing images or the Google map, I've debugged it in the Console and it is showing: ...
3
votes
1answer
664 views

How to detect the current site/frontend language within Javascript

I want to detect the current site/frontend language within Javascript. How can I do to register the language for use within?
1
vote
2answers
336 views

Click login button programmatically

For testing purposes on joomla default login file here: (/templates/theme718/html/com_users/login/default_login.php), I run the following successfully to generate the username and change the language ...
1
vote
1answer
346 views

Defer mootools-more.js jquery.min.js

When I Defer mootools-more.js jquery.min.js in joomla i start to get errors from javascript. Is there a way to add something to a javascript that after defer the script work normaly? I know there is ...
1
vote
3answers
184 views

Joomla component include JavaScript, pop error

I'm new in Joomla, I have try to build my Joomla component, however, when I try to include Jquery ptTimeSelect library into front end it shows javascript error Uncaught TypeError: Cannot read ...
4
votes
2answers
382 views

How to load a page with a System Message

How can I load a page with a system message? Specifically I have a link and I would like that when a user clicks on the link it opens a specific page with a system message I pass it. I can see ...
0
votes
2answers
430 views

How can I add the typed.js plugin into a joomla module

I really love the typed.js plugin which can be found here(http://www.mattboldt.com/demos/typed-js/). I really want to use it on the front page of a joomla webpage I am building. However, I have been ...
1
vote
1answer
232 views

Click button and select menu programmatically

This question is based on previous question here where I managed to populate username from the opener/source to the destination window, using the following code in the destination window using ...
1
vote
1answer
718 views

Adding Data-Attribute value to XML field does not work

I have a form with dynamic fields. some items contain this input fields, some don't. Here is my code for the XML : $field = '<field name="id_'.$filter_record['id'].'_from" type="text" ...
0
votes
1answer
1k views

Adding a timepicker to a datepicker

Has anybody used a time picker in this link? http://trentrichardson.com/examples/timepicker/ I have already followed the steps in the link, I added the add-on.js file to my component and the css ...
1
vote
2answers
1k views

Login to Joomla website from mobile App

Background I have Joomla website and mobile App that's running on different server (programmed using JavaScript). Both belong to the same party, and the users have similar accounts on both with ...
1
vote
2answers
155 views

Removing script tags from variable values

I have a variable containing javascript code which looks like this: $this->item->test_script = '<script type = "text/javascript">code for url</script>' However when I view it in ...
2
votes
2answers
2k views

Limiting Values for Calendar DatePicker

Has anybody tried manipulating the DatePicker in Joomla? For example, In my datepicker, I am only able to select the date not greater than or equal than the current date, or from the datepicker, based ...
5
votes
2answers
764 views

Get access to php variable in Joomlas addscriptdeclaration for Javascript

How do I get access to php variables in Joomlas approach to integrate Javascripts with addScriptDeclaration? $document = JFactory::getDocument(); $variable = "test"; $document->...
0
votes
2answers
344 views

Where can I find piwik JavaScript code

I have installed piwik in my Joomla page using nfrPiwik plugin in order to insert the JavaScript code in order to interact my Joomla page with piwik statistics. However where can I find this code? ...
0
votes
0answers
401 views

How to disable fields in a fieldset?

I am using this code to disable fields in the form based from what I have searched in stackoverflow: jQuery('#reportFilters').children(':input').prop("disabled", "disabled"); But it does not work. ...
2
votes
1answer
129 views

Designing selectbox in joomla

I have a selectbox in which options are coming from a module. Following is its code. <div id="dropdown"> <form action="" method="post" name="country"><label for="country"></label&...
0
votes
4answers
2k views

About jquery and $document->addScriptDeclaration($js) by developing a plugin

I seem to be having an issue when using jQuery in my plugin, which results in a blank page. When I delete the last line $document->addScriptDeclaration($js);, the site display but the code doesn't ...
1
vote
1answer
412 views

Joomla 3 - Print/Send icons not showing

I recently upgraded a 2.5 Joomla installation to the latest Joomla 3. Everything went pretty well but one error exists that I cannot solve: All the articles show a small gear in the top right corner ...
0
votes
1answer
59 views

*.obj file extension is filtered in Joomla 3.x and browser [closed]

It seems that Joomla is set by default to filter the some of the files with different file extensions. Physically the file in question with *.obj(Wavefront) extension exist on server side but I can ...
3
votes
4answers
2k views

Dynamic JS and CSS combining without JCH Optimize

I know JCH Optimize is a very good plugin to compress and minify JS and CSS files but I noticed it also adds time to the page to be rendered. For example, WITHOUT JCH OPTIMIZE my TTFB is 200ms but ...
1
vote
2answers
445 views

XMLHttpRequest and Joomla global variables

I have a system Joomla 3.x plugin with a restore its settings option. For this I use XMLHttpRequest to load a backup file. No problem this side. The problem is in the php file used to update the ...
2
votes
2answers
385 views

Dropdown Value not loading on page's first load

I have a dropdown which has a value saved from the database. The problem is, when I go to the page to view the values it returns to the default. Here are my screenshots: On my 1st image, it displays ...
0
votes
1answer
785 views

Disabling a dropdown list

First of all, I posted this in Joomla Stackexchange because I have created a simple html file and the disabling of the dropdown works. I have this javascript code right here: function disable() { ...
1
vote
1answer
171 views

Configuration of open web analytics locally

I try to run the openwebanalytics software locally under wampserver and joomla using the instructions of this video. I have created the db. I have insert the owa file under the joomla site. I type ...
1
vote
1answer
512 views

Open Web Analytics in Joomla

How can I run Open Web Analytics software through Joomla? Is there any plugin? For example in order to run piwik through Joomla you can use the plugin named nfrPiwik.
2
votes
1answer
81 views

In what order do the different parts of Joomla insert javascript into the FIFO stack?

There is a lot of confusion on J.S.E about how to include javascript into Joomla in the correct order. I’ve seen a number of questions on J.S.E about it, but they never cover everything completely. ...
0
votes
2answers
93 views

Javascript in custom content plugin output

I want to use javascript in my custom Joomla content plugin, but I can't get my custom text when type text in my input by using getElementById. My code is: <?php $output = ' <input ...
1
vote
0answers
182 views

Change menu display [closed]

I'm trying to change the way my menu is being displayed. It works now like this: The first level is just displayed on home page. Children items are being displayed as a dropline bar under the header. ...
3
votes
1answer
516 views

Content Modal Popup fails due to Javascript error

Using my own answer for What is best approach to show the component page in popup-modal window without header and footer?, I mentioned that I was getting JS errors, so when as I further investigate, ...
3
votes
1answer
2k views

How can I save multiple values selected in a list?

I have a form with the dynamically generated XML and by dynamically, it was programmatically created during getForm function. I want to save the value I selected as a key:value pair to be stored in a ...
3
votes
1answer
1k views

How to hide/show input fields in form?

Good Day guys, I have this code right here in javascript on hiding/showing an input field: function HideShow() { var Type = document.getElementById("jform_subscription_type"); if(Type.value=...
0
votes
1answer
231 views

Realtime Push Popup window for website [closed]

Is there a way to trigger a popup on an end users browser in real time, not just when page loads, sort of like a live push notification but instead a popup window (modal) opens up on the end users ...
-1
votes
1answer
1k views

Backend module does not run jQuery / JavaScript script?

I have made a module that in the backend, the user selected from 2 dropdown multi select lists, some names and photos and in the frontend I print the selected names/photos. To make it easier for user ...
2
votes
1answer
679 views

Refreshing a part of the page after Dropdown list selection

How can I refresh a part of the page when I select from a dropdown list using the onchange in HTML? I have a Reports dropdown list. Once I select a Report, a list refreshes only displaying those that ...
2
votes
1answer
242 views

Add javascript after a form or at the end of the page

I have a javascript code and it's necessary load my code after my form or in end of my page. When I use this code load before my form in my page: <script type="text/javascript"> /// my code &...
8
votes
3answers
1k views

Optimizing frontend load, how do I properly combine and compress my JS?

My website for an enterprise client has approximately 90 assets that download on load, 35 or so are JS files. Even "optimizing" extensions that are made for Joomla only seem to get me down to 31 or ...
2
votes
1answer
112 views

Joomla 3.x and SSE

Is it possible to implement SSE on Joomla, like how it is implemented in pure PHP here? Here is what I have so far: administrator/components/com_component/controllers/sync.php class ...
2
votes
1answer
577 views

RokSprocket automate Load More

for people that have used Joomla for a while you are probably familiar with RokSprocket - a content module from RocketTheme, very useful. It has a 'Load More' button, that can load the next bit of ...
2
votes
2answers
856 views

Changing order of javascripts on load

I have written my own template and some part of the content is as the following: <?php // Add JavaScript Frameworks JHtml::_('bootstrap.framework'); // Add Stylesheets JHtmlBootstrap::loadCss(); /...
1
vote
1answer
272 views

Javascript validation check box issue with Joomla v3.3

I tried to implement a check box to go to the products pages of this joomla v3: http://www.nordicpharma.com/es/nuestros-productos.html Two methods was used without success ! http://jsfiddle.net/moja/...
5
votes
2answers
2k views

Unsetting javascript added to head data by ->addScriptDeclaration() in template

I'm trying to unset all javascript declarations in the document head. By this I mean inline javascript that is added by 3rd party extensions using ->addScriptDeclaration(), and not javascript files ...
2
votes
2answers
637 views

2.5 template/css issues: article links not working in Chrome, link colors locked globally to white and email cloaking

I'm a Joomla, CSS and php newbie. I was tasked with creating a site for the school I just started working for based on its already hacked-up Joomla 2.5 template. I hacked it some more to get the ...
2
votes
1answer
870 views

RSForms Pro changing the class of Radio Group label

I am setting up an RSForm! Pro form using Radio buttons, but I want to hide the radio buttons input and use the label for the selection, the HTML for the question is: <div class="rsform-block ...
0
votes
1answer
691 views

RSForm Pro Search form

I have created a search form with RSForm Pro, unfortunately it isn't working. The concept is to do a TAG Search all the Fields of the Form (Select and Radio) have values which are part of a URL which ...
1
vote
1answer
1k views

Add onclick/onsubmit event to form submit

I have made a plugin that add few fields on joomla registration form. Now I need to add a javascript event on submit that will handle those extra fields I added, but I couldn't find any way to ...