Hi,
I have been searching this forum, and found many JS related topics. Non were dealing with my problem, so I'll try to explain:
(The form is in hebrew language, but the funcionality is important here... try to overcome the encoding issue)
I want to implement this form into ChronoForms:
http://www.hedmusic.co.il/form/form.html
This form calls behaviour.js file, which makes the Dropdown function. It's not Validation - Just applying different part of form for each Dropdown selection.
In Chronoforms, I took the HTML part (w.out the tags) and pasted it in place. Same with the behaviour.js content. The result was that all form parts, regardless with the dropdown selection - are displayed one after another. This means that the JS isn't working.
I guess that there should be a correct JS call in the Form tag attachment, but I tried several things, with no success.
if this help, this is the Form implementation, in ChronoForms (again, Hebrew):
http://www.hedmusic.co.il/index.php?option=com_content&view=article&id=78&Itemid=81
Thanks in Advance,
Nir.
I have been searching this forum, and found many JS related topics. Non were dealing with my problem, so I'll try to explain:
(The form is in hebrew language, but the funcionality is important here... try to overcome the encoding issue)
I want to implement this form into ChronoForms:
http://www.hedmusic.co.il/form/form.html
This form calls behaviour.js file, which makes the Dropdown function. It's not Validation - Just applying different part of form for each Dropdown selection.
In Chronoforms, I took the HTML part (w.out the tags) and pasted it in place. Same with the behaviour.js content. The result was that all form parts, regardless with the dropdown selection - are displayed one after another. This means that the JS isn't working.
I guess that there should be a correct JS call in the Form tag attachment, but I tried several things, with no success.
if this help, this is the Form implementation, in ChronoForms (again, Hebrew):
http://www.hedmusic.co.il/index.php?option=com_content&view=article&id=78&Itemid=81
Thanks in Advance,
Nir.
Hi,
maybe you will need to add the JS include line in the form code box, this line :
maybe you will need to add the JS include line in the form code box, this line :
<script src="behaviour.js" type="text/javascript"></script>
Hi Admin,
Thanks for the reply.
Usually, the JS tags come before the <form> tag... if i'll put it inside the form code box (you ment he HTML one ? The JS doesn't get the script tags...) - its like inserting it inside.. which doesn't seems as a correct synatx or logic.
Tried to implement it, with no success.
Thanks for the reply.
Usually, the JS tags come before the <form> tag... if i'll put it inside the form code box (you ment he HTML one ? The JS doesn't get the script tags...) - its like inserting it inside.. which doesn't seems as a correct synatx or logic.
Tried to implement it, with no success.
tried to call the script file this way also:
or even call the JS file from the template... No success....
<?php
global $mosConfig_live_site;
$folder = $mosConfig_live_site.'/form';
echo "<script src='$form/behaviour.js' type='text/javascript'></script>";
?>or even call the JS file from the template... No success....
Hi,
if you have Joomla 1.5, look at this example how it inserts the JS file at the page header, you can add the same code to the form HTML box and the script will get inserted in the page header.
Regards
Max
if you have Joomla 1.5, look at this example how it inserts the JS file at the page header, you can add the same code to the form HTML box and the script will get inserted in the page header.
$document =& JFactory::getDocument();
$document->addScript(JURI::Base().'components/com_chronocomments/msg.js');Regards
Max
Hi Max,
I think something is missing with the code you're showing here... Tried to insert in the HTML code - it doesn't work, and shows the text in the front-end.
Tried to insert it between the <head> Tags in the Template... no help.😟
I think something is missing with the code you're showing here... Tried to insert in the HTML code - it doesn't work, and shows the text in the front-end.
Tried to insert it between the <head> Tags in the Template... no help.😟
Hi UpRaiser,
The code should go in the Form HTML inside php tags ( I think that Base may need to be base too).
Bob
PS Just for completeness you can use similar code to add a stylesheet
The code should go in the Form HTML inside php tags ( I think that Base may need to be base too).
<?php
$document =& JFactory::getDocument();
$document->addScript(JURI::base().'components/com_chronocomments/msg.js');
?>Bob
PS Just for completeness you can use similar code to add a stylesheet
<?php
$document =& JFactory::getDocument();
$document->addStyleSheet(JURI::base().'components/com_chronocomments/my.css');
?>Change the path to suit.
Thanks GreyHead,
But still ain't working..😶 . I've inserted your code (with "base") and changed the path to the correct one, leading to the js. file.
could there be any conflict, even though no JS or Ajax module is used ?
But still ain't working..😶 . I've inserted your code (with "base") and changed the path to the correct one, leading to the js. file.
<?php
$document =& JFactory::getDocument();
$document->addScript(JURI::base().'form/behaviour.js');
?>could there be any conflict, even though no JS or Ajax module is used ?
Hi, try with base and Base and check the file is loaded before you think about js conflicts since this is another issue!
This topic is locked and no more replies can be posted.
