Results 1 to 3 of 3

Thread: script doesn't work in <span>!

  1. #1
    Join Date
    Apr 2006
    Location
    London
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default script doesn't work in <span>!

    I'm using a calculator script inside a <span>, and it seems javascript:void(0); dosent work when inside the <span>, but it does when I remove the <span> and <div> tags. Here is the <span> code i'm using:

    The CSS for <span>:
    Code:
    span.left {
    position: absolute;
    left: 0;
    }
    span.right {
    position: absolute;
    right: 0;
    }
    div.line {
    position: relative;
    text-align: center;
    width: 100%;
    }

    The code I use on the page:

    Code:
    <div class="line">
    <span class="left">
    stuff on the left side
    </span>
    
    <span class="right">
    stuff on the right side
    </span>
    </div>

    and here is the calculator script I want to use, (by replacing "stuff on right side" in the <span class="right">
    http://www.jtricks.com/javascript/forms/calculator.html


    Clicking in the litttle calculator icon beside the form doesn't work, and the div with the calculator buttons dosen't open up if I place the whole thing inside the <span>..

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    it seems javascript:void(0); dosent work
    Doesn't work? It's not meant to do anything. A link to your page would be much more helpful.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Apr 2006
    Location
    London
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry for not being precise earlier, I meant that the <div> for the calculator buttons didn't appear.

    I just realised, that it did appear, but I didnt see it as I had <body scroll=no>.

    However, due to the <span class="right">, the <div> for calculator buttons does appear, but far far on the right, scrolling itself horizontally out of the page.

    here s the example page:
    http://www.b3ta.cr3ation.co.uk/data/htm/calc.htm

    I just need it to appear just underneath the text box on the right side.
    What modifications should be done to the calculator js, if any?

    thanks,
    VatsaL

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
  •