PDA

View Full Version : Manipulating data inside of vb's default post input boxes


jwocky
12-06-2007, 02:03 AM
Hi, i'm writing some custom javascript code that will attempt to pull data and replace data from the post input box.

Now I tried something very simple,

<INPUT type="button" name="change" value="Click to see new text!" onClick="document.vbform.vbtextanswer.value='You are cool too!!'">

I'm using that to try to pull info from the vb input box which is inside a custom form (thx to the forms hack by Abe.

Anyways, this obviously doesn't work. So i'm wondering if anyone knows what the name of the object is that vb uses when it constructs the input box? I used 'vbtextanswer' in my example, but thats not it, neither is 'message'.

Thanks for any help!@

Opserty
12-06-2007, 02:44 PM
Why don't you just modify server side?

jwocky
12-06-2007, 04:02 PM
Why don't you just modify server side?

What do you mean exactly ?

Opserty
12-06-2007, 05:20 PM
I'm guessing the form is going to post to a server side script (E.g. a PHP file) so instead of try to get edit the data using JS (which won't take place if the user has JS disabled I think) edit the data when it is being processed in the server side script.