PDA

View Full Version : Join text to a Form field



GeraldLab
02-20-2005, 06:36 PM
:confused: Hi please help.

I would like to add a text advert being displayed on my webpage from a database into a form field called Message, after a person has type his text into the field. The advert must be attached so that it is hidden from the person typing the message into the message field.

IE: messageField = textfield1 + advert text

Thanks.

cr3ative
02-20-2005, 06:45 PM
Bad double poster. *smacks*

What language are you writing in? Javascript (or ECMAscript) would be something like so:

<script type="text/javascript">
var one="ONEH"
var two="ADFG"
document.write(one+two)
</script>

Would write ONEHADFG to the document.
Please further explain your question.

cr3ative

GeraldLab
02-20-2005, 07:09 PM
Hi there.

I writting in html and asp but can change the code to suit what will work best. I'm developing a website that can send SMS's from the internet to people in South Africa.
To help pay for the SMS's to be at a reduce price I have to add an advert. The advert is pulled from a Database and displayed above the form to the person typing a message. I need to add the advert to the message field when the person submits the form.

mwinter
02-20-2005, 08:06 PM
I would like to add a text advert being displayed on my webpage from a database into a form field called Message, after a person has type his text into the field. The advert must be attached so that it is hidden from the person typing the message into the message field.Then add it during processing on the server. If the advert must be added, you cannot rely on any client-side scripting to accomplish this.

Mike

GeraldLab
02-20-2005, 09:19 PM
I need a JavaScript function to join the hidden field called "Advert" with the filed called "Message1" into a filed called message when the user clicks the submit button so that all the fields are passed are sent to http://sms.smsmalls.co.za/

Here is the form I need help on.

<form method="POST" action="http://sms.smsmalls.co.za/">
<input type="hidden" name="Advert" value="Call me today">
<input type="text" name="Cell" size="19">
<textarea rows="7" name="Message1" cols="22" value=""></textarea>
<input type="hidden" name="Subscription" value="gg-ptay-l103">
<input type="hidden" name="User" value="2152005">
<input type="hidden" name="Password" value="1647">
<input type="hidden" name="Type" value="1">
<input type="hidden" name="SendDate" value="">
<input type="submit" value="Submit" name="B1">

Thank you for your help.
Gerald