SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast Zaphod's Avatar
    Join Date
    Jul 2001
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    E-commerce - checkbox - pricing update - Query

    Hi,

    I want to change the existing code of our company e-commerce site so that the pull down menues are now checkboxes (will make life easier for sales to work with).

    The pull down menu's must automatically submit, as the pricing changes with each selection.

    Is there a way of auto submiting when a checkbox is ticked / unticked? Have tried using the "onChange=" that I nicked from the pull down...

    Current checkbox code below.

    Cheers in advance,

    Zaph

    ##################################################
    <INPUT TYPE="checkbox"
    onChange="CalculateTotal('<%=FormatNumber(sKitPrice,2,,,0)%>','<%=sKitC
    lubTotal%>','<%=Application("Locale")%>','<%=FormatNumber(sKitAddCurrPr
    ice,2,,,0)%>')" value=<%=(chr(34) & Server.URLEncode(rsUpg("UPG_CODE"))
    & "#" & iUpgradePrice & "#" & rsXkit("ITEM_QTY") & "#" &
    rsUpg("WEB_ACTIVE") & "#" & iAddUpgradePrice & chr(34))%>>
    No matter how fool proof you make it, someone will always make a bigger fool.

    touchscreen monitors www.protouch-uk.com

  2. #2
    SitePoint Evangelist
    Join Date
    Sep 2003
    Location
    San Diego, CA
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could try:
    Code:
    <INPUT TYPE="checkbox" 
    onclick="if(this.checked==true){CalculateTotal('<%=FormatNumber(sKitPrice,2,,,0)%>','<%=sKitC
    lubTotal%>','<%=Application("Locale")%>','<%=FormatNumber(sKitAddCurrPr
    ice,2,,,0)%>')}" value=<%=(chr(34) & Server.URLEncode(rsUpg("UPG_CODE")) 
    & "#" & iUpgradePrice & "#" & rsXkit("ITEM_QTY") & "#" & 
    rsUpg("WEB_ACTIVE") & "#" & iAddUpgradePrice & chr(34))%>>
    But this is more of a javascript problem, not asp.

  3. #3
    SitePoint Enthusiast Zaphod's Avatar
    Join Date
    Jul 2001
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Erm, thanks I'll try it...

    Java script! dam.
    ahh life was so simple with plain html. :-)
    No matter how fool proof you make it, someone will always make a bigger fool.

    touchscreen monitors www.protouch-uk.com

  4. #4
    SitePoint Evangelist
    Join Date
    Sep 2003
    Location
    San Diego, CA
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    LOL! You might also want to change the value=... to value="...", that way it knows what is the whole value.

  5. #5
    SitePoint Enthusiast Zaphod's Avatar
    Join Date
    Jul 2001
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


    Microsoft VBScript compilation error '800a0400'


    Expected statement

    /AMAZING/customkititems.asp, line 271 =sKitC^
    I have been trying to do this for about week now (yea, I know I should have posted it here before)So much other stuff that I have to do at work that I don't get a chance to just sit down and think these things through. Let alone learn Javascript or asp!
    No matter how fool proof you make it, someone will always make a bigger fool.

    touchscreen monitors www.protouch-uk.com

  6. #6
    SitePoint Evangelist
    Join Date
    Sep 2003
    Location
    San Diego, CA
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats not a javascript error, are your response.write ing the information?


Bookmarks

Posting Permissions

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