Jump to content


Photo
- - - - -

Using Javascript as the header image


This topic has been archived. This means that you cannot reply to this topic.
8 replies to this topic

#1 gandhi

gandhi

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 12 October 2009 - 12:39 AM

I did this in the iblog2 theme, where I used a small Javascript to display an image on the header of the blog and another one when the mouse went over it. I just went through the code and put it there, but in the iblogpro 3 version the code is too complicated for me to figure this out... Could you help me out? The code would be something like this: <SCRIPT LANGUAGE="JavaScript"> <!-- Begin loadImage1 = new Image(); loadImage1.src = "

Please Login or Register to see this Hidden Content

staticImage1 = new Image(); staticImage1.src = "

Please Login or Register to see this Hidden Content

// End --> </script> Thanks

#2 arpowers

arpowers

    Founder

  • Administrators
  • 3254 posts

Posted 12 October 2009 - 04:23 AM

Hey Gandhi,

Here is the code that controls what your 'logo' looks like:

Please Login or Register to see this Hidden Content


if you're not using the 'custom header' option you would want to replace this section of code with your own :)

#3 arpowers

arpowers

    Founder

  • Administrators
  • 3254 posts

Posted 12 October 2009 - 04:24 AM

Ps. This code is in 'header.php'

#4 gandhi

gandhi

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 12 October 2009 - 11:21 PM

It doesn't work! It might be because of the small icons of Twitter/Facebook that are on top of the header image? Where excatly should I replace the code? Under the if or the else?

#5 arpowers

arpowers

    Founder

  • Administrators
  • 3254 posts

Posted 13 October 2009 - 06:40 PM

Just replace or comment out the above code, and replace it with your own. It controls how the logo/title appear on your site. If it still doesn't work, feel free to post the code you tried, and the results. Screenshots always help.

#6 gandhi

gandhi

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 15 October 2009 - 11:50 PM

I've tried all combinations:
Posted Image
Posted Image

#7 gandhi

gandhi

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 15 October 2009 - 11:55 PM

Whenever the javascript is supposed to appear, I get nothing. I know it's trying, but it seems like for some reason the code doesn't load...

#8 arpowers

arpowers

    Founder

  • Administrators
  • 3254 posts

Posted 16 October 2009 - 01:31 AM

Can you give me a 'live' link? Have you tried using FireBug for Firefox to see if your getting any JS errors? The second one is the correct implementation...

#9 gandhi

gandhi

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 21 October 2009 - 04:54 AM

Ok, got it working. It turned out to be a JavaScript error... If anyone has the same problem, ask me!