Javascript, Jquery and galleryview

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hi

I am a Newbie to ASP.Net and NopCommerce and I am struggling to get some javascript working, I have used before galleryview to present changing images on a page.

Unfortunatly i do not seem to be able to get it to work in NopCommerce probably because I do not understand yet Ajax, ASP.Net and visual studio.

The code that goes in the head is


    <script src="../Scripts/jquery-1.4.min.js" type="text/javascript"></script>
    <script src="../Scripts/js/jquery.easing.1.3.js" type="text/javascript"></script>
    <script src="../Scripts/js/jquery-galleryview-1.1/jquery.galleryview-1.1.js" type="text/javascript"></script>
    <script src="../Scripts/js/jquery-galleryview-1.1/jquery.timers-1.1.2.js" type="text/javascript"></script>
    
        <script type="text/javascript">
            $(document).ready(function() {
                $('#photos').galleryView({
                    panel_width: 552,
                    panel_height: 207,
                    frame_width: 100,
                    frame_height: 30,
                    background_color: 'transparent',
                    border: 'none',
                    nav_theme: 'light',
                    easing: 'easeInOutQuad',
                    pause_on_hover: true

                });
            });
    </script>

code that goes in the home page body

<div id="photos" class="galleryView">      
<div class="panel"> <img alt="pic" src="http://localhost/images/thumbs/0000246_250.jpeg" /></div>      
<div class="panel"> <img alt="pic" src="http://ocalhost/images/thumbs/0000245_250.jpeg" /></div>      
<div class="panel"> <img alt="pic" src="http://ocalhost/images/thumbs/0000244_250.jpeg" /></div></div> <br />
<br />

So I have put the java bit in the rootmaster in the head section and the DIV's in the welcome message topic (this is where I think I am going wrong) but looking at the source when the page loads looks correct.

Anyway the images load but the java does not seem to be working, have searched the web and I am getting so confussed, do i put code in the code behind that creates the java bits or do I need to load the java from the code behind, do i need to do something in visualstudio express 2008.

I need some help please as I am so close to going live with this sit, but need this bit to work.

Many Thanks Andy
13 years ago
Hi

I really do need some help with this I seem to be going round in circles, I  think that the way JQuery is used in NOP is different from other forum posts, but I still do not understand how Java works in NOP at all.

Any help would be greatly received, maybe some articles to read anything would be great.

Thanks in advance

Andy
13 years ago
hi Andy,



where are you inserting the script tags ?  eg

<script src="../Scripts/jquery-1.4.min.js" type="text/javascript"></script>



the problem you are having could be because of the relative urls to the scripts eg
       <script src="   ../   Scripts/jquer


If you are adding the scripts into default.aspx try :

<script src="Scripts/jquery-1.4.min.js" type="text/javascript"></script>
13 years ago
Hi

Thank you I will try your suggestion, I am putting these into the rootmasteraspx, should I put them into the default.aspx?

Andy
13 years ago
That has worked in the root master.

Thank you so much.

Andy
13 years ago
I also have problem with javascript.
I did paste the javascripts from google adsense on the product description(html). it works fine, ads are there but I'm not able to edit again the description on administration after adding the scripts from google adsense. it shows nothing.
Please help!
13 years ago
when you edit, are you remembering to click <> on the editor to display the html view ??

another possible problem is that the script is causing an error on the admin page when you reload it - if so, i don't think there is a work around other than hard coding the script into the site
13 years ago
I understand the your problem now, when you edit the topic the pages is blank?

I had this problem which is why I put the java script in the Rootmaster.aspx page.  I had to delete and re add the topic page that had been corrupted though and place only the html elements I needed into the new topic.

I am sure there is probably a work around for the corrupted page, but this worked for me.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.