LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 356 users online 225375 members 416 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
Sakayadream
Interests: Music, Computers, Animals, Peanut B...
Mood: Cheeky
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
1 online / 41 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Adding Reply

Adding Reply
Archived Topic: It will not be bumped to the top of the forum.
Topic php problem
Membername   Not a member? Sign Up Free (takes 20 seconds)
Password   Forgotten your password?
Post

Font:   Size:   Color:

FAQ Keyword Search:
Post Options
Favorites Manager
Notify me of new replies to this topic by email
Notify me of new replies to this topic by private message
Original Post
Brandon Flood Posted at 5:58 pm on Mar. 12, 2007
I have a function. Basically, this is to save me a lot of typing with dynamically created images.

I create two images, one is "off" and the other is "on" for swapping onMouseOver.

However, this is a particular button that I"m trying to single out within the function. It's the inbox button. If they have new messages, it's supposed to add " - $nmesses new". It adds everything but the number contained in $nmesses.

I've tested $nmesses by just echoing it on the page, and it holds the right value, but it won't show up in the image. Can someone please tell me what's going on before I lose it, I can't find any explanation for it.

Code:
function makesourceimage ($thetext, $theimage, $theform) {
      echo "<a onClick = 'document.".$theform.".submit();' onMouseOver='document.".$theform.$theimage."off.style.display = \"none\"; document.".$theform.$theimage."on.style.display=\"block\";' onMouseOut = 'document.".$theform.$theimage."off.style.display=\"block\"; document.".$theform.$theimage."on.style.display =\"none\";'><img name='".$thetype.$theimage."off' id = '".$theform.$theimage."off' src = '".$theimage."off.php?buttontext=".$thetext."";
     if ($theform == 'inbox') {
       if ($nmesses == '0') {}
       else {
        echo " - ";
        echo "$nmesses";
        echo " new";
       }
     }

Replies
There are no replies to this topic.