A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Help With On Click Javascript Buttons

  1. #1
    Registered User
    Join Date
    Aug 2005
    Location
    Detroit
    Posts
    15

    Help With On Click Javascript Buttons

    Hello Folks,

    I'm in need of some coding advice. I'm currently hard at work building a wedding lead portal.

    I have most of the site done, but am stuck on how to make one of my pages work. What I need is a page that has a list of services for our clients to choose from. On that page my boss wants the list to highlight each category as someone clicks on it. Once a browser has selected all the categories they want a next button will pass the info to a back end that has already been built that will take care of the rest.

    Th eproblem is I'm not sure how to create the buttons. I can fathom how to do this with Flash, but am thinking this module would work better with javascript.

    I understand I might not be explaining this well, but if you click on the following link you'll get a jpg mock of the page I am wondering how to put together.

    http://www.yadaya.com/marlow/marlow_page3.jpg

    Should I use javascript to do this and if so does anyone have sample code I can tear apart to figure out how to make these buttons?
    Last edited by nonamenoslogan; 09-13-2005 at 03:33 PM.

  2. #2
    associate admedia's Avatar
    Join Date
    Oct 2001
    Location
    is
    Posts
    1,347
    You could have a them call a javascript function that would swap the blank heart with the checked hear, and set a hidden form field to true. if the heart was checked, it would swap it to a clear heart and set the corresponding hidden field to false. it would be a simple toggle function. toggle the image, toggle the form field...

  3. #3
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    I'm with admedia here, except for the javascript part (not sure it's needed).

    Why not have a checkmark or red dot if radio button or something in a sprite and make it visible if the radio button (or whatever) next to each category is checked. Have each button set an offstage variable that gets POSTed with the rest of the clump of choices (variables) to your backside. Have 2 buttons for each choice and reverse the code for the second set and swap them on and offstage depending on click status (user changed their mind...have it uncheck and clear that offstage textfield variable and put button 1 back).

    Just a ton of ways to accomplish what you want.

  4. #4
    Registered User
    Join Date
    Aug 2005
    Location
    Detroit
    Posts
    15
    Yeah Chris that's exactly what I need to do. I just started on this page today and wasnt sure how I was going to make this happen. Looks like now I just have to get into the nitty gritty of the js.

    Thanks guys.

  5. #5

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

HTML5 Development Center