PDA

View Full Version : javascript probs.


pie
06-12-2003, 03:50 PM
I've put this in the newthread template:


<!---Testing--->
if (theform.message.value) {
"REQ: " + theform.message.value
} [else {
"GOT: " + theform.message.value
}]


It'll end up as radio buttons but i just want to know how to add a prefix onto the beginning. :)

I am no good at javascript, whats wrong, where do i put, how do i fix? :D

pie
06-20-2003, 12:32 PM
any help guys.

Chris Gwynne
06-20-2003, 12:44 PM
By prefix I'm assuming you mean...

<script language="javascript" type="text/javascript">
<!--// -->
</script>

Put your code inside of the JavaScript tags, so your code will look like so...


<script language="javascript" type="text/javascript">
<!--
if (theform.message.value) {
"REQ: " + theform.message.value
} [else {
"GOT: " + theform.message.value
}]
// -->
</script>


This is will work assuming your code is right. :)

pie
06-20-2003, 12:47 PM
LMFAO! cant beleive.... /me hangs head on desk. lol.

Cheers

Chris Gwynne
06-20-2003, 12:51 PM
No problem. :)