Script code doesn't work & is changed upon saving


  • Topic Author
  • Visitor
  • Visitor
12 years 4 months ago - 4 years 3 months ago #20846 by
I am trying to add a Java code that worked perfectly in a different template in Joomla 1.5. When I add it to this template in 2.5, the code is completely changed upon saving. I have tried 3 different editors, turned off all "auto correction" of code, no editor, and absolute link addresses. I have also tried saving in HTML and in Editor mode.

Here is the code on the new sample page, with neither calendar nor search button working:
Code:
http://spanishvacationrental.com/joomla25/reservation.html

Here is the same code on the top of our current page:
Code:
http://spanishvacationrental.com/

Any ideas?


Before saving this is the code:
Code:
<input type=hidden name=respage id=respage value="http://v2.reservationkey.com/SpanishVacationRental/Oasis"> <script src="http://v2.reservationkey.com/inc/dpicker.js"></script> <script src="http://v2.reservationkey.com/inc/jsdate.js"></script> <link REL="stylesheet" HREF="http://v2.reservationkey.com/inc/dpicker.css" TYPE="text/css" /> Arrival Date: <input type=text name="checkin" id="checkin" value="" size=7 maxlength=20 onclick="displayDatePicker('checkin', false, 'mdy', '/');"> <a href="javascript:void(0)" onclick="displayDatePicker('checkin', false, 'mdy', '/');"><img src="http://v2.reservationkey.com/i/cal.gif" border=0></a>    Departure Date: <input type=text name="checkout" id="checkout" value="" size=7 maxlength=20 onclick="displayDatePicker('checkout', false, 'mdy', '/');"> <a href="javascript:void(0)" onclick="displayDatePicker('checkout', false, 'mdy', '/');"><img src="http://v2.reservationkey.com/i/cal.gif" border=0></a>    Guests: <select name="numguests" id="numguests"><option value="1">1</option><option value="2" selected>2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select> <input type=button value="Search" onclick="window.location=document.getElementById('respage').value +'/s|'+ document.getElementById('checkin').value.replace(/\//g,'.')+'|'+ document.getElementById('checkout').value.replace(/\//g,'.')+'|'+ document.getElementById('numguests').value">


After saving, this is the code:
Code:
<p><input id="respage" type="hidden" name="respage" value="http://v2.reservationkey.com/SpanishVacationRental/Oasis" /></p> <p>Arrival Date: <input id="checkin" type="text" name="checkin" value="" size="7" maxlength="20" /> <a><img src="http://v2.reservationkey.com/i/cal.gif" border="0" /></a>    Departure Date: <input id="checkout" type="text" name="checkout" value="" size="7" maxlength="20" /> <a><img src="http://v2.reservationkey.com/i/cal.gif" border="0" /></a>    Guests:</p> <select id="numguests" name="numguests"> <option value="1">1</option> <option selected="selected" value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> <p><input type="button" value="Search" /></p>
Last edit: 4 years 3 months ago by milos.

Please Log in to join the conversation.

More
12 years 4 months ago #20864 by ivan.milic
You have to tune your editor settings to allow script, also turn of all falterings in "Text Filters" in global configuration

Please Log in to join the conversation.


  • Topic Author
  • Visitor
  • Visitor
12 years 4 months ago #20876 by
Here is the issue: As stated above, all editor settings have been set to not filter. If I change the template from HOTel to one of the standard ones that come with Joomla 2.5 then the code saves perfectly and nothing is changed. It appears that it is the template that doesn't allow the code.

Please Log in to join the conversation.

More
12 years 4 months ago #20884 by ivan.milic
No, hot hotel does not have layout overrides, so article and blog presenting engine is core joomla's, you are missing something see this nice guide:

www.timelordz.com/blog/2011/02/adding-ja...to-a-joomla-article/

Please Log in to join the conversation.

Time to create page: 0.136 seconds
Powered by Kunena Forum