Welcome to Geeklog, Anonymous Wednesday, April 24 2024 @ 04:23 am EDT
Geeklog Forums
set_var is killing me!
Dmite
Anonymous
I am using plugin_templatesetvars_menu to set a variable. I place some javascript in $menuhead then $template->set_var ('menuhead', $menuhead).
I know $menuhead has the full javascript. But once I place {menuhead} in the heading, the ending is chopped off. Oddly, I can place random characters on the ending and they appear. But the term 'this.ClassName=""' will not enter into {menuhead}.
Any thoughts - anyone?
I know $menuhead has the full javascript. But once I place {menuhead} in the heading, the ending is chopped off. Oddly, I can place random characters on the ending and they appear. But the term 'this.ClassName=""' will not enter into {menuhead}.
Any thoughts - anyone?
8
8
Quote
Status: offline
Roccivic
Forum User
Moderator
Registered: 05/19/10
Posts: 136
Can you please post all the relevant snippets of code, including the all JS in question (and how it is generated), and the steps to reproduce the problem? Also please include the names of all the files that you are editing.
Rouslan
Rouslan
8
7
Quote
Status: offline
jmucchiello
Forum User
Full Member
Registered: 08/29/05
Posts: 985
My suggestion is to put most of your javascript and include as a separate file. Then just have a small javascript section to set whatever variables you need. In other words, avoid putting js functions through the template engine. Also, look into changes for Geeklog 1.8 for a class for adding javascript to a page.
<script> var myvar = '{value}'</script>
Text Formatted Code
<link ...><script> var myvar = '{value}'</script>
7
5
Quote
All times are EDT. The time is now 04:23 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content