Note that there are some explanatory texts on larger screens.

plurals
  1. POJavascript in lightbox
    primarykey
    data
    text
    <p>I have a problem while using a JavaScript in lightbox: I have implemented a rating function to my site. When I use the functionality in the normal embedded html it works great but the user is taken to the feedback page. I wanted to use lightbox for the feedback to give the possibility to the user to give feedback and stay where he actually is. </p> <p>The status quo: Everything works fine but the JS-script does not start in lightbox. Means that the radio buttons for the rating are not replaced by the script with the star images. Finally I receive this error:</p> <blockquote> <p>TypeError: starRating is undefined starRating.create('.feedbackSelect');</p> </blockquote> <p>and when I copy the error out of Firebug I receive this:</p> <blockquote> <p>TypeError: starRating is undefined <a href="http://xxx.xxx.xxx.xxx/xxxx/interface/themes/blueprint/js/jquery.min.js/eval/seq/2" rel="nofollow">http://xxx.xxx.xxx.xxx/xxxx/interface/themes/blueprint/js/jquery.min.js/eval/seq/2</a> Line 2</p> </blockquote> <p>The var starRating is defined in the further lines: </p> <pre><code>var starRating = { create: function(selector) { ... </code></pre> <p>What confuses me is that Firebug is referring to another file, namely the jQuery library and again: without lightbox it works as it should. I'd be thankful for any hints how to solve this!</p> <p>p.d.: Here is the smarty html code:</p> <pre><code>{js filename="feedback.js"} {* &lt;div class="span-5 {if $sidebarOnLeft}pull-18 sidebarOnLeft{else}last{/if}"&gt; {include file="MyResearch/menu.tpl"} &lt;/div&gt; *} &lt;div class="span-18{if $sidebarOnLeft} push-5 last{/if}"&gt; {if $user-&gt;cat_username} &lt;h1&gt;{translate text='Feedback'}&lt;/h1&gt; &lt;br&gt; {if $success} &lt;p class="success"&gt;{translate text='feedback_thanks'}&lt;/p&gt; {else} {if $errorMsg} &lt;p class="error"&gt;{translate text=$errorMsg}&lt;/p&gt; {/if} &lt;form method="post" action="{$url}/Feedback/Feedback" id="feedback_form"&gt; &lt;input type="hidden" name="hash" value="{$hash|escape}" /&gt; &lt;table id="feedback" class="citation"&gt; {if $feedbackIssues} {foreach from=$feedbackIssues item=issue} &lt;tr&gt; &lt;th&gt;{translate text=$issue-&gt;title}:&lt;/th&gt; &lt;td class="feedbackSelect"&gt; &lt;label for="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-1"&gt;&lt;input id="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-1" name="issue{$issue-&gt;id|escape}" type="radio" value="1"/&gt;0.5&lt;/label&gt; &lt;label for="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-2"&gt;&lt;input id="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-2" name="issue{$issue-&gt;id|escape}" type="radio" value="2"/&gt;1&lt;/label&gt; &lt;label for="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-3"&gt;&lt;input id="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-3" name="issue{$issue-&gt;id|escape}" type="radio" value="3"/&gt;1.5&lt;/label&gt; &lt;label for="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-4"&gt;&lt;input id="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-4" name="issue{$issue-&gt;id|escape}" type="radio" value="4"/&gt;2&lt;/label&gt; &lt;label for="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-5"&gt;&lt;input id="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-5" name="issue{$issue-&gt;id|escape}" type="radio" value="5"/&gt;2.5&lt;/label&gt; &lt;label for="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-6"&gt;&lt;input id="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-6" name="issue{$issue-&gt;id|escape}" type="radio" value="6"/&gt;3&lt;/label&gt; &lt;label for="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-7"&gt;&lt;input id="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-7" name="issue{$issue-&gt;id|escape}" type="radio" value="7"/&gt;3.5&lt;/label&gt; &lt;label for="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-8"&gt;&lt;input id="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-8" name="issue{$issue-&gt;id|escape}" type="radio" value="8"/&gt;4&lt;/label&gt; &lt;label for="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-9"&gt;&lt;input id="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-9" name="issue{$issue-&gt;id|escape}" type="radio" value="9"/&gt;4.5&lt;/label&gt; &lt;label for="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-10"&gt;&lt;input id="{$issue-&gt;title|lower|regex_replace:'/[^a-z0-9]/':''|escape}-10" name="issue{$issue-&gt;id|escape}" type="radio" value="10"/&gt;5&lt;/label&gt; &lt;/td&gt; &lt;/tr&gt; {/foreach} {/if} &lt;tr&gt; &lt;th&gt;{translate text="Comments"}:&lt;/th&gt; &lt;td&gt;&lt;textarea name="comment" class="formularLarge"&gt;{$comment}&lt;/textarea&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt;&amp;nbsp;&lt;/th&gt; &lt;td&gt;&lt;input type="submit" name="submitFeedback" value="{translate text="submit_feedback"}" class="senden"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; {/if} {else} {include file="AJAX/login.tpl"} {/if} &lt;/div&gt; &lt;div class="clear"&gt;&lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload