LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 806 users online 221808 members 1471 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
hannybananny
In a cakewalk she came through the dead and the lame ...
Mood: Shy
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
6 online / 36 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic

php problem
I don't know what's going on, I'm desperate
Replies: 0Last Post Mar. 12, 2007 5:58pm by Brandon Flood
Welcome to LiveWire!
We're Stronger Together.
Join the Community
Single page for this topic Email Print Favorite
( Brandon Flood )


Dairy Product Addict
Reply
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";
       }
     }


-------
yeah, and what color is the sky in your crazy little world, blue?
There's no better feeling, than to be in love,


5:58 pm on Mar. 12, 2007 | Joined: May 2006 | Days Active: 200
Join to learn more about Brandon Flood United States | Straight Male | Posts: 697 | Points: 2,722
Single page for this topic Email Print Favorite

Quick Reply

You are signed in as our guest.

Looking for something else?
 

  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic