Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Radio Button Click Does Not Update Text in IE

    http://globalconsultancy.net/Kinetic...ine_id=1&sku=1

    if this is viewed in Firefox or Safari, when a user selects between different processors the price and 'included in cost' tag is automatically appended to the each of each one.

    however, viewed in IE it does the opposite. for an example, change processors three times.

    i'm at a loss as to how to fix this and numerous hours of sleep have been lost. please help!

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    IE gives and error, when the execution reaches
    Code:
    var subid = this.parentNode.getAttribute('for').split("_");
    ... is null or not an object
    Anyway, it's always a good practice to rectify all errors in the markup, when using complex javascript operations.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    kitsch (02-19-2009)

  • #3
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    4
    Thanked 0 Times in 0 Posts
    hi there,

    yep, I found the error myself and have been tryingto replace with

    Code:
    document.getElementById
    but that doesn't seem to work. I need something that cab read the value of the 'for' attribute of a label (look at the markup for processors).

    any ideas are much appreciated

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    kitsch (02-19-2009)

  • #5
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    the link that page mentions as an example, doesn't work. and apparently Safari won't support attributes["for"].value

    htmlFor will work according to the quotes mentioned, but i'm not sure how best to implement it?

  • #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    I know it's not the correct solution, though how about
    Code:
    <label for="processor_10" class="processor_10">.....
    and
    Code:
    var subid = this.parentNode.className.split("_");
    ?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #7
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    4
    Thanked 0 Times in 0 Posts
    i was thinking that, but couldn't quite figure out how to access the class. the class name and for attribute will always marry up though.

    when I try this, it then throws an error

    Code:
    Line:  83
    Char: 4
    Error: 'PRICE(...)' is null or not an object.
    Code: 0
    i'm just working through PRICE now to see if there's maybe an error in the parameters.

  • #8
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    4
    Thanked 0 Times in 0 Posts
    when I inspect the contents of subid using

    Code:
    alert(subid)
    i get a blank alert box. is there anyway to see the value being assigned to this.parentNode.className.split("_"); ?

  • #9
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    It worked(got the correct alerts) for me for
    Code:
    var subid = this.parentNode.className.split("_");
    			alert(subid);
    and
    Code:
    <p><input name="processor" value="2" id="processor_10" type="radio">
    <label for="processor_10" class="processor_10">Intel Core 2 Duo E4600<span class="price-change-box included" id="price-change-box-processor_10">[included in total cost]</span></label></p>
    	<p><input name="processor" value="3" id="processor_11" type="radio">
    <label for="processor_11" class="processor_11">Intel Core 2 Duo E7300<span class="price-change-box adjust" id="price-change-box-processor_11">[ $3]</span></label></p>
    	<p><input name="processor" value="4" id="processor_12" checked="checked" type="radio">
    <label for="processor_12" class="processor_12">Intel Core 2 Duo E4700<span class="price-change-box adjust" id="price-change-box-processor_12">[ $25]</span></label></p>
    	<p><input name="processor" value="6" id="processor_13" type="radio">
    <label for="processor_13" class="processor_13">Intel Core 2 Duo E8200<span class="price-change-box adjust" id="price-change-box-processor_13">[ $44]</span></label></p>
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    kitsch (02-19-2009)

  • #10
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    4
    Thanked 0 Times in 0 Posts
    if you could have a look at the code here:

    http://kineticuk.com/Pilot/customisa...d=1&promo_id=1

    you'll see it throws an error straight away. something to do with the PRICE object, similiar to the piece of code I posted earlier

    i've made all the changes you suggested. any ideas why this isn't working here?


    thanks again

  • #11
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    I haven't checked the working/logic of your script/page, but here is a copy of your page at my end (saved from browser's Ctrl+S option)

    (see the attached zip)
    Attached Files Attached Files
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    kitsch (02-19-2009)

  • #12
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    4
    Thanked 0 Times in 0 Posts
    thanks.

    i've uploaded it to my server but, surprise surprise, it still doesn't work. ( http://kineticuk.com/Pilot/customisa...d=1&promo_id=1 )
    the text for processors and ram etc, isn't being generated. you'll notice it also doesn't work correctly in FF now. sorry for all this hassle but you've been a big help so far & i think it's nearly fixed!
    Last edited by kitsch; 02-19-2009 at 01:41 PM.

  • #13
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    4
    Thanked 0 Times in 0 Posts
    if it helps you can view an alternative design here:

    http://alienware.co.uk/configurator_...de=SKU-DEFAULT


  •  

    Posting Permissions

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