Click to See Complete Forum and Search --> : send the name of a button to the form it will open
mm091266
03-13-2003, 10:01 AM
hello,
I'd like to send the name of a button wich open a new form to this new form as a var.
How can I manage this?
Thank you
gil davis
03-13-2003, 10:15 AM
That depends on what you mean by "send", what you think a "button" is, and how you think it will "open a new form".
Show us what you have so far.
mm091266
03-14-2003, 02:17 AM
I've got this line in a php file :
<td> <input name=\"$ref $depot\" onclick=\"planning();\" type=\"button\" value=\"Planning Article\">
I gave the name of the button with 2 variables and Iwould like to get back this name in a new form opened by the planning function wich is :
function planning(){ window.open(\"planning.php\",\"fenplan\",\"width=800,height=500,toolbar=no,menubar=no,location=no,directorie=no,status=no,top= 100, left= 100\"); }
how can i do ?
gil davis
03-14-2003, 06:26 AM
Try this:
<input name=\"$ref $depot\" onclick="planning(this.name)" type="button" value="Planning Article">
...
function planning(nm){
window.open("planning.php?name=" + nm, "fenplan", "...");}
mm091266
03-14-2003, 07:55 AM
it doesn't seem to work.
this.name is not recognize.
gil davis
03-14-2003, 08:15 AM
Try this, then:<input name=\"$ref $depot\" onclick="planning(\"$ref $depot\")" type="button" value="Planning Article">The idea is to get the name of the button into the function call. I don't know the syntax for the includes.
mm091266
03-14-2003, 09:40 AM
oops, sorry,
your first solution was the good one.
Thanks anyway.