Onclick event doesn't work

Discussion in 'C#' started by Supremus, Oct 28, 2006.

  1. #1
    G'day,

    movemap is a function that requires 2 parameters.

    This works ...
    <%movemap 20,20 %>

    This works
    <td><img src="<%= maparray(xloc-1,yloc-1)%>" onclick="history.go(-1)" ></td>

    This doesn't
    <td><img src="<%= maparray(xloc ,yloc-1)%>" onclick="<%movemap 20,20 %>" ></td>
    <td><img src="<%= maparray(xloc ,yloc-1)%>" onclick="<%=movemap(20,20)%>" ></td>

    Those lines add an extra "> in my display and don't call movemap. I have tried all the different syntax combinations except one ... the one that works.
     
    Supremus, Oct 28, 2006 IP
  2. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #2
    ludwig, Oct 29, 2006 IP
  3. Supremus

    Supremus Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    My code is messy and includes several includes and some unwritten routines.

    Players click on a link in the menu to go to the map page.

    I read the database and finds out where they are.

    I use a 3 * 3 table to display the map squares using 9 jpg's. This works fine - see code in earlier post.

    Now comes the problem.

    The player will click on one of the 9 squares ....
    I have to update the database with his movement points and new x,y location
    I must then reload the page.

    If I knew which square he clicked in, I could use a case statement and update the database and reload the page.
     
    Supremus, Oct 29, 2006 IP
  4. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #4
    well, thats a bit messy for me also :( can't understand and thus can't help, sorry
     
    ludwig, Oct 29, 2006 IP