PDA

View Full Version : script doesn't work in <span>!



VatsaL
11-25-2006, 03:27 PM
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>:

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:


<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>..

Twey
11-25-2006, 03:57 PM
it seems javascript:void(0); dosent workDoesn't work? It's not meant to do anything. A link to your page would be much more helpful.

VatsaL
11-25-2006, 05:25 PM
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