The Joomla! Forum ™



Forum rules


Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 42 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Jun 24, 2008 7:39 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 12, 2008 11:21 am
Posts: 20
Hi,

I have a problem to show javascript or iframe codes in articles.
i am a little bit surprised that response is not really coming. It can't be that difficult as i excpect that i am not the only one who is using this type of codes? Can someone please inform me how i can display a banner that is using the following typ of code.

<script type="text/javascript">
var uri = 'http://impnl.tradedoubler.com/imp?type(js)g(17137476)a(1532223)' + new String (Math.random()).substring (2, 11);
document.write('<sc'+'ript type="text/javascript" src="'+uri+'" charset="ISO-8859-1"></sc'+'ript>');
</script>

I run joomla 1.5.3
editor >> no editor enabled

Thanx


Top
 Profile  
 
 Post subject: Dissapointed?
PostPosted: Wed Jun 25, 2008 8:53 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 12, 2008 11:21 am
Posts: 20
Although the topic has been read already 35 times i am rather surprised that no one of the joomla community is able to answer this,to my opinion, simple question, Simple meaning if you know something about coding ofcourse. I wonder if I have submitted this topic in the wrong section. Is there another section maybe where the coders are who know how to solve this issue??

Help would be very appreciated.

Thanx


Top
 Profile  
 
PostPosted: Wed Jun 25, 2008 1:05 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jan 10, 2008 9:07 am
Posts: 18
Hi Markyboy !

to use Javascript you can use JCE as WYSIWYG
this one allow javascript use into articles and it's free :)

Download plug-in, component and JCE Utilities on the website http://www.joomlacontenteditor.net/
(you have to register for downloading)

After installation go to Administrator and access Components > JCE Administrator > Configuration
and set Allow javascript to Yes :D

You can althought create users groups with specific rights. 8)

So past your script and enjoy !


Top
 Profile  
 
PostPosted: Wed Jun 25, 2008 2:31 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 12, 2008 11:21 am
Posts: 20
Hi Antoine,

Thanks for the information provided. I have installed the JCE component, plugin & utilities.
I have enabled the JCE editor in Global Configuration.
I have allow javascript set to "yes"

I have implemented the code by using the <> html icon
I updated the content file and saved.

Still no correct showing on the site?? I have no idear why? :(

It looks like this.
http://travel2.gr/index.php?option=com_ ... Itemid=216

The good news is that it doesn't mess up the codes anymore. ;)

Any other suggestions?

Thanks for your help.

Markyboy


Top
 Profile  
 
PostPosted: Wed Jun 25, 2008 3:00 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jan 10, 2008 9:07 am
Posts: 18
Ok, you should try to set Groups preferences and add your account. Maybe this overwrite your JCE configuration params.
You can access it via Components > JCE Administrator > Groups

If you are not sure for manipulation, you can create a new group and add your account.

I'm not sure this will work but it could be helpful :D

Keep me informed of issues


Top
 Profile  
 
PostPosted: Wed Jun 25, 2008 5:37 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 12, 2008 11:21 am
Posts: 20
Hi,

i tried to add a new user.. although i get the message that it is saved i also see the following error message

Quote:
DB function failed with error number 1054
Unknown column 'a.name' in 'order clause' SQL=SELECT g.*, u.name AS editor FROM jos_jce_groups AS g LEFT JOIN jos_users AS u ON u.id = g.checked_out GROUP BY g.id ORDER BY a.name , g.ordering ASC LIMIT 0, 20


Going again to groups will give the same error message.

???

Markyboy


Top
 Profile  
 
PostPosted: Thu Jun 26, 2008 7:18 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jan 10, 2008 9:07 am
Posts: 18
Wouah ! :eek:

never seen this yet ! I use JCE for a long time and groups function works well on my server.
Check on JCE forum, maybe there is a previous case
JCE Forum : http://www.joomlacontenteditor.net/inde ... &Itemid=63

Keep me informed :pop


Top
 Profile  
 
PostPosted: Thu Jun 26, 2008 2:47 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 12, 2008 11:21 am
Posts: 20
First a critical note:
I want to point out again that there is very little support from joomla coders around here. Many components, plugins etc. are not working properly or have conflicts in different surroundings and settings. As a joomla user this gets extremely frustrating, so some help or advice from the makers would be very much appreciated.

After pulling my hair out for 3 days i had made a small improvement for showing some javascript in the content.

I managed to show some javascript using joomlaFCK editor
To do this i had to disable the plugin content -embed
This is now the only way to see at least something.

http://travel2.gr/index.php?option=com_ ... &Itemid=81

But adding more than one script is messing up things again. It removes the content title and some other strange errors appear .

Anyone has an idear?


Marc


Top
 Profile  
 
PostPosted: Sun Jun 29, 2008 9:05 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sat Jun 14, 2008 11:24 pm
Posts: 111
ha, good to know that :)


Top
 Profile  
 
PostPosted: Thu Jul 03, 2008 3:11 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jun 08, 2008 5:18 pm
Posts: 7
From looking at your page, it's seems like you found a solution? Care to share it? I'm have the same problem :-[


Top
 Profile  
 
PostPosted: Fri Aug 15, 2008 2:20 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Aug 15, 2008 2:17 am
Posts: 1
JCE worked great for me but I accidentally skipped enabling it is as the wysiwyg editor at first and was having some problems of course. I know it was mentioned as a step on this forum but just in case someone else forgets that was my only problem.


Top
 Profile  
 
PostPosted: Thu Feb 19, 2009 6:24 am 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Wed Feb 18, 2009 2:50 pm
Posts: 51
Location: Toronto
Hi Alepee; without your assistance I would have never got the dang thing working lol ;)

but I have one question.

Do you know why it would in the JA_Purity template post the article that I inserted some javascript code into, why would it post it all the way over to the right hand side but ONLY in firefox? it's quite odd and I don't know why, it works fine in IE

http://www.ubetterbuy.com

_________________
http://DavidAllenNeron.com


Top
 Profile  
 
PostPosted: Wed Mar 25, 2009 4:49 pm 
Joomla! Intern
Joomla! Intern

Joined: Wed Aug 02, 2006 1:37 am
Posts: 99
Hi guys,

Do you know how I can use javascript but in modules? I have JCE and it doesn't work.


Top
 Profile  
 
PostPosted: Thu Mar 26, 2009 2:59 am 
Joomla! Explorer
Joomla! Explorer

Joined: Mon Aug 04, 2008 8:00 am
Posts: 327
Location: India
hi

try no editor.... it is simple, already installed and no side effects...it does work like a charm....

set the user editor to no editor... and switch back when done....

i know it is a crude solution...

sumeet

_________________
Sumeet Shroff
PSD to Joomla, Joomla Custom Template Design and Virtuemart Shopping Cart
http://www.prateeksha.com http://www.joomlawebsitedesigners.com


Top
 Profile  
 
PostPosted: Mon Aug 17, 2009 2:24 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 25, 2006 2:34 am
Posts: 16
prateekshaweb wrote:
hi

try no editor.... it is simple, already installed and no side effects...it does work like a charm....

set the user editor to no editor... and switch back when done....

i know it is a crude solution...

sumeet


Crude but very effect. Worked like a charm for me. Thanks!


Top
 Profile  
 
PostPosted: Fri Aug 21, 2009 5:09 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Aug 21, 2009 5:03 am
Posts: 4
Hi guys,

I have better solution for this problem. No need to choose No WYSIWYG editor in global configuration of site. You can also write javascript in articles using default editor(TinyMCE 2.0).

Steps ->

Go to plugin manager & click on TinyMCE 2.0
Go to plugin parameters
select " never " to Code cleanup on save option & save it.
Now you can write your javascript in articles(joomla).

I hope it ll be useful for you all.

Regards,
Always18


Top
 Profile  
 
PostPosted: Sat Sep 05, 2009 5:40 pm 
Joomla! Intern
Joomla! Intern

Joined: Fri Apr 03, 2009 9:33 am
Posts: 56
Thank you, always18! I have had so much trouble with the editor and I didn't know there was an option to turn off the cleanup (which seems mostly to be a 'dirtyup' or a 'break it'). Even just having my line breaks remain is so lovely, thank you again!


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 3:30 am 
Joomla! Explorer
Joomla! Explorer

Joined: Mon Aug 04, 2008 8:00 am
Posts: 327
Location: India
yes..it is good...

but there is a plugin Sourcer...that allows you to add css and script code to your code...works like a charm and with all editors

_________________
Sumeet Shroff
PSD to Joomla, Joomla Custom Template Design and Virtuemart Shopping Cart
http://www.prateeksha.com http://www.joomlawebsitedesigners.com


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 9:09 am 
Joomla! Intern
Joomla! Intern

Joined: Fri Apr 03, 2009 9:33 am
Posts: 56
Thanks - I'll give that a try.

I actually found I had to switch to "No Editor" (set it for the user under User Manager) to get the script to work. But the "never cleanup" is such a help anyway.


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 9:38 am 
Joomla! Intern
Joomla! Intern

Joined: Fri Apr 03, 2009 9:33 am
Posts: 56
I've installed sourcerer, and it is enabled, but it doesn't seem to work. I have pasted in my code at the end of the article, and surrounded it by tags (I thought there should be a button in the editor, but there isn't)

{source}<script type = "text/javascript" src = "/wychwoodcats/templates/my_javascript/calculator_utilities.js"></script>
<script type = "text/javascript" src = "/wychwoodcats/templates/my_javascript/due_date.js"></script>{/source}

But when I save the HTML and then reopen, MCE has messed it up again:

<p>{source}<mce:script type="text/javascript" src="/wychwoodcats/templates/my_javascript/calculator_utilities.js"></mce:script>
<mce:script type="text/javascript" src="/wychwoodcats/templates/my_javascript/due_date.js"></mce:script>{/source}</p>

Any ideas, anybody?


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 10:02 am 
Joomla! Intern
Joomla! Intern

Joined: Fri Apr 03, 2009 9:33 am
Posts: 56
I think I've got it working now - the button is at the bottom of the screen not in the toolbar. And in the Sourcerer editor, I turned off "colorize tags". Thanks.


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 11:15 am 
Joomla! Explorer
Joomla! Explorer

Joined: Mon Aug 04, 2008 8:00 am
Posts: 327
Location: India
hi.. little brain...

there is a module called "custom code"... it is similar to Custom html but that module allows all script and css also php code....

it is comes very handy ...try it

_________________
Sumeet Shroff
PSD to Joomla, Joomla Custom Template Design and Virtuemart Shopping Cart
http://www.prateeksha.com http://www.joomlawebsitedesigners.com


Top
 Profile  
 
PostPosted: Mon Sep 07, 2009 12:21 pm 
Joomla! Intern
Joomla! Intern

Joined: Fri Apr 03, 2009 9:33 am
Posts: 56
Does anybody know a way to stop Sourcerer from inserting <br> tags at the end of lines? It's a right pain because it invalidates the XHTML!


Top
 Profile  
 
PostPosted: Tue Sep 22, 2009 4:50 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Sep 22, 2009 2:50 pm
Posts: 1
hi all
i am a joomla newbie, so sorry for noobish questions..

i want to create a simple website with a prominent download button in the front page.
i am able to use a javascript to detect the visitors os and download the coressponding file, if i use "text" as the clickable entity..
however if i try to use an image instead, it doesnt show the image using document.write();

please point out some way to do it.
it would be nice if i am able to create a large and prominent button with the required javascript actind when it is pressed.
how can i use sourcerer for this?
thanx in advance


Top
 Profile  
 
PostPosted: Wed Sep 23, 2009 8:35 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Aug 07, 2009 12:12 pm
Posts: 1
Using java script is depend on there site page. First check that and then find out what working for them.


Top
 Profile  
 
PostPosted: Sun Nov 15, 2009 12:03 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Nov 15, 2009 12:01 am
Posts: 9
The tip about JCE configuration works like a charm! Cheers! I used it on http://www.sailingchannel.gr to add the facebook badge on the side

_________________
http://www.BankExpert.gr


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 3:46 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Jul 30, 2009 11:02 am
Posts: 1
You may try to solve this problem via reading this article:
http://docs.joomla.org/Why_does_some_HTML_get_removed_from_articles_in_version_1.5.8%3F

I find this really useful cause it solved my problem of using javascript in articles. :)


Top
 Profile  
 
PostPosted: Sat Feb 20, 2010 12:16 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Feb 20, 2010 12:15 am
Posts: 5
I'm trying to add 2 flash videos to a page via java script. When I put 1 on the page it works just fine. When I put both on the page only the first one alphabetically plays regardless of which one is first on the page. I get the same result inserting through JCE and Sourcer.

Here is the page: http://www.click2grow.com/video-marketing.html

/media/video/MassageByJJ.FLV is the first one on the page, but when I put both java script codes in the same article only this one Plays:

/media/video/bellwether.FLV

Right now both JS code has been inserted using sourcer and I get the same problem. I contacted my hosting company and they said I'm missing a plugin for joomla to make them both run. That's when I tried sourcer and I'm still stuck.


Top
 Profile  
 
PostPosted: Sat Feb 20, 2010 12:17 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Feb 19, 2010 11:59 pm
Posts: 2
vispi wrote:
hi all
i am a joomla newbie, so sorry for noobish questions..

i want to create a simple website with a prominent download button in the front page.
i am able to use a javascript to detect the visitors os and download the coressponding file, if i use "text" as the clickable entity..
however if i try to use an image instead, it doesnt show the image using document.write();

please point out some way to do it.
it would be nice if i am able to create a large and prominent button with the required javascript actind when it is pressed.
how can i use sourcerer for this?
thanx in advance


Vispi...the document.write method is usually only used during the page load event of a web page. I beleive that if you are putting javascript in the article body then the page load event has already finished by the time it runs your code. A more tradititional way of dynamically adding elements to a page would be:

Code:
  var el = document.createElement('input');
  el.type = 'button';
  el.value = 'Download';


and then give it an onclick event.

Code:
  el.onclick = myFunction();


The above code only creates your element...to add the element to your page you would need to find the element you want to add it after and:

Code:
var afterMe = document.getElementById(someId);
afterMe.appendChild(el);


I haven't tested this in Joomla! but it should work better for dynamic elements.


Top
 Profile  
 
PostPosted: Sat Feb 20, 2010 12:21 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Feb 19, 2010 11:59 pm
Posts: 2
click2grow wrote:
I'm trying to add 2 flash videos to a page via java script. When I put 1 on the page it works just fine. When I put both on the page only the first one alphabetically plays regardless of which one is first on the page. I get the same result inserting through JCE and Sourcer.

Here is the page: http://www.click2grow.com/video-marketing.html

/media/video/MassageByJJ.FLV is the first one on the page, but when I put both java script codes in the same article only this one Plays:

/media/video/bellwether.FLV

Right now both JS code has been inserted using sourcer and I get the same problem. I contacted my hosting company and they said I'm missing a plugin for joomla to make them both run. That's when I tried sourcer and I'm still stuck.


Hey click2grow...can you post the javascript code your using (of course removing any identifiable information from it first)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 42 posts ]  Go to page 1, 2  Next



Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group