Results 1 to 7 of 7

Thread: (javascript) Can onClick be in a TD? **Resolved**

  1. #1

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057

    (javascript) Can onClick be in a TD? **Resolved**

    I cant get a function to fire and am trying to narrow it down... Can onClick be in a TD?
    Thanks in advance,
    michael
    Last edited by msimmons; Jun 13th, 2002 at 02:19 PM.
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  2. #2
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    yes and no. No it Netscape 4. The onclick event is one of the html 4.01 core attributes os it should work fine.

    Test it by putting an alert in it.
    eg.

    <td onclick="alert('test');">
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  3. #3
    Addicted Member TheGoldenShogun's Avatar
    Join Date
    Mar 2001
    Location
    VA/MD... anywhere around the beltway
    Posts
    236
    if you're making that selectRate function in JavaScript, should you be using the dollar sign as your variable names. I thought that was only for scripting languages like PHP or Perl.. try this.

    function selectRate(one, two, three){
    alert('test');
    alert(one);//room
    alert(two);//rate
    alert(three);//date
    }

  4. #4
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    You cannot tell javascript to run a php function or vice versa, you cannot tell php to run a javascript function.
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

  5. #5

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    I can't recall where I picked up the habit of using $ for my passed variables but I've been doing it for a while. I did try it w/o the $ as you suggested and it still did not work. Any other ideas?
    Thanks
    Michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  6. #6

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    I KNEW IT WAS SOMETHING STUPID!!! I don't even want to say what it is but I don't feel so bad because no one else saw it either.

    onClick="selectRate= ('1','1','6/25/2002')"


    Michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  7. #7
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    omg! how did I miss that??
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width