| avatar variable problem | |
|
|
Author | Message |
---|
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: avatar variable problem Sat Mar 23, 2013 4:59 am | |
| ^ I follow that tutorial but it is not working for me. I'm using this JS script CODE: ----------SELECT CONTENT $(function() { var sidebar = document.getElementById('right'); var default = 'https://2img.net/h/i855.photobucket.com/albums/ab117/jan2xonline/default_avatar_zpsa91409e3.jpg'; if(!sidebar) return; var x = $('.module', sidebar)[0].getElementsByTagName('img'); $('.AVATAR').html(' '); }); And this for the html CODE: ----------SELECT CONTENT
testinggggggggI placed the "Log In" widget at the top right side of my forum so what's wrong? Here's my forum, http://animeph.4umer.com/. | |
|
| |
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: Re: avatar variable problem Sat Mar 23, 2013 4:59 am | |
| Try changing the widget to the left and do not forget to change it in the JavaScript. | |
|
| |
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: Re: avatar variable problem Sat Mar 23, 2013 5:00 am | |
| | |
|
| |
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: Re: avatar variable problem Sat Mar 23, 2013 5:00 am | |
| Where did you add the HTML code? | |
|
| |
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: Re: avatar variable problem Sat Mar 23, 2013 5:01 am | |
| | |
|
| |
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: Re: avatar variable problem Sat Mar 23, 2013 5:01 am | |
| | |
|
| |
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: Re: avatar variable problem Sat Mar 23, 2013 5:01 am | |
| ^ Yes and I'm not planning to make a last post avatar or avatar in chatbox. I'm just trying to make a custom user control panel sir. | |
|
| |
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: Re: avatar variable problem Sat Mar 23, 2013 5:01 am | |
| So this will be a widget? | |
|
| |
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: Re: avatar variable problem Sat Mar 23, 2013 5:02 am | |
| | |
|
| |
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: Re: avatar variable problem Sat Mar 23, 2013 5:02 am | |
| Have you checked that all your javascripts are error-free? | |
|
| |
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: Re: avatar variable problem Sat Mar 23, 2013 5:02 am | |
| I tried to check the error console and got this CODE: ----------SELECT CONTENT Failed to load resource http://an.z5x.net/ttj?id=1092879Uncaught SyntaxError: Unexpected token default 23325.js:1 I clicked this "23325.js:1" and got this CODE: ----------SELECT CONTENT $(function(){var sidebar=document.getElementById('right');var default='https://2img.net/h/i855.photobucket.com/albums/ab117/jan2xonline/default_avatar_zpsa91409e3.jpg';if(!sidebar)return;var x=$('.module',sidebar)[0].getElementsByTagName('img');$('.AVATAR').html(' ')}); And that's the script for the avatar variable right? | |
|
| |
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: Re: avatar variable problem Sat Mar 23, 2013 5:03 am | |
| Change everywhere in the avatar script where it says 'default' to something else like 'def' or just give it a capital 'D' or something. There's 2 places where you'll need to change it. | |
|
| |
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: Re: avatar variable problem Sat Mar 23, 2013 5:03 am | |
| I tried def like this CODE: ----------SELECT CONTENT $(function() { var sidebar = document.getElementById('right'); var def = 'https://2img.net/h/i855.photobucket.com/albums/ab117/jan2xonline/default_avatar_zpsa91409e3.jpg'; if(!sidebar) return; var x = $('.module', sidebar)[0].getElementsByTagName('img'); $('.AVATAR').html(' '); }); and still not working sir. | |
|
| |
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: Re: avatar variable problem Sat Mar 23, 2013 5:03 am | |
| Is there no error anymore then? | |
|
| |
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: Re: avatar variable problem Sat Mar 23, 2013 5:03 am | |
| | |
|
| |
Daichi Senior Member
Posts : 446 Join date : 2013-03-02 Location : Reykjavik
| Subject: Re: avatar variable problem Sat Mar 23, 2013 5:04 am | |
| | |
|
| |
Sponsored content
| Subject: Re: avatar variable problem | |
| |
|
| |
| avatar variable problem | |
|