What's new

Need help with Javascript!

Webfunk

Top Contributor
Yeah I had a look at that earlier but couldn't figure out how to integrate it into my html...

<a href="#TB_inline?height=360&width=380&inlineId=popup" class="thickbox">
<input type="button" name="Button" value="OK" class="OK" onClick="calculateTotal(); true;" /></a>
<div id="popup">
<p class="popuph1">Your Savings:</p>
<span class="symbols2">$</span><input name="total" id="total" type="text" class="result" readonly="readonly" />

I want the calculation (input class="result") to show the formatting.
 

Webfunk

Top Contributor
I'm trying to default a value of a text field to 0, if the user does not submit anything. Does the following code illustrate this or have I got it all wrong?

function checkValue() {
var defaultValue;

defaultValue = 0;

if ((document.getElementById("otherFees").value)=="")
(document.getElementById("otherFees"))=defaultValue;
}
 

sp@rky13

Top Contributor
I'm not someone who's coded very much javascript before (you've probably done more than me) so I'm just thinking out loud in terms of how it would work in any language
 

Community sponsors

Domain Parking Manager

AddMe Reputation Management

Digital Marketing Experts

Catch Expired Domains

Web Hosting

Members online

No members online now.

Forum statistics

Threads
11,099
Messages
92,050
Members
2,394
Latest member
Spacemo
Top