Buy Now
Sign in

Please, can i get some help

mcfrojd , January 13 2008, 16:48
M
mcfrojd 12
January 13 2008, 16:48 #4903
Can someone help me with this form.
When i paste all this in the form HTML box, i get the "date" button to work only if i am logged in to the homepage.
But it does not respond at all if im not logged in to my homepage.

<script language="javascript" type="text/javascript" src="http://www.brakelessmc.se/includes/js/overlib_mini.js"></script>
<script language="javascript" type="text/javascript" src="http://www.brakelessmc.se/includes/js/overlib_hideform_mini.js"></script>
<head>
<link rel="stylesheet" type="text/css" media="all" href="http://www.brakelessmc.se/includes/js/calendar/calendar-mos.css" title="green" />
<script type="text/javascript" src="http://www.brakelessmc.se/includes/js/calendar/calendar_mini.js"></script>
<script type="text/javascript" src="http://www.brakelessmc.se/includes/js/calendar/lang/calendar-en.js"></script>
</head>
<div align="center">
<table border="0" width="400">
<tr>
<td><font face="Verdana" size="2">Namn/klubb</font></td>
<td><font face="Verdana"><input type="text" name="Namn_Klubb" size="20" tabindex="1"></font></td>
</tr>
<tr>
<td>
<font face="Verdana" size="2">Datum</font></td>
<td><font face="Verdana">
<input class="inputbox" type="text" name="Datum" id="Datum" size="20" maxlength="10" onchange="checkPublish();" tabindex="2" /><font size="2">
</font>
<input type="reset" class="button" value="..." onclick="return showCalendar('Datum', 'y-mm-dd');" /></font></td>
</tr>
<tr>
<td>
<p><font face="Verdana" size="2">Skriv i koden</font></td>
<td>
<font face="Verdana" size="2">{imageverification}</font></td>
</tr>
<tr>
<td colspan="2" align="center"><font face="Verdana">
<input type="submit" value="Skicka" name="Skicka" tabindex="7"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</font>
<input type="reset" value="Återställ" name="Reset"></font></td>
</tr>
</table>
</div>
GreyHead 64
January 13 2008, 17:59 #4905
Hi mcfrojd,

It looks most likely that you have a Javascript conflict of some kind. Do you get any errors when you look at the Firebug console?

You aren't allowed to stick <head> tags in the middle of a page. You'll either need to include the various includes in your template header or call them using the Joomla header code.

It might work if you take the <head> tags out but that's almost impossible to say without having all the code to test.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
admin 28
January 14 2008, 19:59 #4917
Hi,

Please removet he head tags and why do you include those 2 files :


<script language="javascript" type="text/javascript" src="http://www.brakelessmc.se/includes/js/overlib_mini.js"></script>
<script language="javascript" type="text/javascript" src="http://www.brakelessmc.se/includes/js/
overlib_hideform_mini.js"></script>


??

Max<br><br>Post edited by: admin, at: 2008/01/14 14:59
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
M
mcfrojd 12
January 14 2008, 23:17 #4928
I've removed the head tag and the 2 lines of code.
(the code i found someware and modified to make it work, have no idea what lines i need and dont...)

The calendar still dont appear if not logged in.
Tried both firefox and explorer..
GreyHead 64
January 15 2008, 00:04 #4932
Hi mcfrojd,

Please take a Form backup of your from in the form manager and post the cfbak file here or email it to me at the address in my sig.

Bob

PS It's a really bad idea to take code that you don't understand and expect it to work smoothly in something as complex as Joomla!!
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
M
mcfrojd 12
January 15 2008, 03:06 #4937
Here is the file.
[file name=test.cfbak size=3494]http://www.chronoengine.com/components/com_fireboard/uploaded/files/test.cfbak[/file]
M
mcfrojd 12
January 15 2008, 03:07 #4938
Yea.. but if you don't try you don't fail :-)
GreyHead 64
January 15 2008, 06:05 #4942
Hi mcfrojd,

OK cracked it - you owe me a large schnapps next time I'm in Ängelsberg.

You need to include the joomla.javascript.js file as well. This contains the showCalendar function that your form is calling.

I guess that you have it installed on your home page to support some other module.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
M
mcfrojd 12
January 15 2008, 14:29 #4951
Thanks man that did the trick..
One big cold one is waiting for you in Ängelsberg..
GreyHead 64
January 15 2008, 17:57 #4952
Hi mcfrojd,

Just to clean up. You can include the js files using this code block in J1.5
<?php
global $mainframe;  
$document = & $mainframe->getDocument();
$js_path = $mainframe->getCfg('live_site').'/includes/js/';
$document->addScript($js_path.'joomla.javascript.js');
$document->addScript($js_path.'joomla/calendar/calendar.js');
$document->addScript($js_path.'joomla/calendar/calendar_mini.js');
$document->addScript($js_path.'joomla/calendar/lang/calendar-en.js');
$document->addStyleSheet($js_path.'joomla/calendar/calendar-mos.css');
?>
Bob<br><br>Post edited by: GreyHead, at: 2008/01/15 12:58
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
M
mcfrojd 12
January 15 2008, 18:38 #4955
Is it possible ta have one of theese code cleanup blocks in joomla 1.0.13 too?
GreyHead 64
January 15 2008, 20:59 #4956
Hi mcfrojd,

Ahhh . . . I was afraid that you might ask that . . . I think it goes like this
<?php
global $mainframe;
$js_path = $mosConfig_live_site.'/includes/js/';
$mainframe->addCustomHeadTag ('<script type="text/javascript" src="'.$js_path.'joomla.javascript.js"></script>');
$mainframe->addCustomHeadTag ('<script type="text/javascript" src="'.$js_path.'calendar/calendar.js"></script>');
$mainframe->addCustomHeadTag ('<script type="text/javascript" src="'.$js_path.'calendar/calendar_mini.js"></script>');
$mainframe->addCustomHeadTag ('<script type="text/javascript" src="'.$js_path.'calendar/lang/calendar-en.js"></script>');
$mainframe->addCustomHeadTag ('<link href="'.$js_path.'calendar/calendar-mos.css" rel="stylesheet" type="text/css" media="screen" />');
?>
Bob

PS neither of these have been tested so they may need de-bugging.<br><br>Post edited by: GreyHead, at: 2008/01/15 16:06
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much