Closed Thread Icon

Topic awaiting preservation: Programatically create form variables (not values) Pages that link to <a href="https://ozoneasylum.com/backlink?for=22641" title="Pages that link to Topic awaiting preservation: Programatically create form variables (not values)" rel="nofollow" >Topic awaiting preservation: Programatically create form variables (not values)\

 
Author Thread
Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 07-21-2004 05:09

Greets

I'm trying to write a script that basically submits data to different search engines. However, the query variable name is different for each search engine.

Rather than put all of the possibilities in my form, I'd rather create the variable on-the-fly based on which seach engine is selected.

How can I create form variables from within javascript? I know how to set a form variable value, action, method, etc. Just not create the variables.

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 07-21-2004 08:36

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

DmS
Paranoid (IV) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 07-21-2004 09:35

If it's a PHP-script you can dynamically create the variables in the script and then use CURL to POST it.
/Dan

{cell 260}
-{ a vibration is a movement that doesn't know which way to go }-

BillyRayPreachersSon
Nervous Wreck (II) Inmate

From: London
Insane since: Jul 2004

posted posted 07-21-2004 11:08
quote:
document.forms["myform"].addChild(myinput);



You would want to use "appendChild(myinput);" - addChild() is not a valid method.

Dan

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 07-21-2004 11:23

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

« BackwardsOnwards »

Show Forum Drop Down Menu