I am new to this, and after I've searched a bunch of forums and tried it on my own I didn't succed in accomplishing what I wanted, i.e. :
I want to have a text field, in which I will write a number. Then i want a Button to have a MM_goToURL on click action to a Link which has a variable in it with the value from the input text field.
To be more precise here is a part of the code:
the MM_goToURL function:
<script type="text/javascript">
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args+".location='"+args[i+1]+"'");
}
</script>
My text field:
<input name="12" type="text" id="ip" value="1" />
My Button:
<input name="3" type="submit" id="GO" onclick="MM_goToURL('parent','1.1.1.my_var');return document.MM_returnValue" value="Submit" />
<label for="1"></label>
So how can I declare my_var so it will always take the value inside the Input text field, and how do I include that variable inside the link, because just plain writing the name of the variable in there like :MM_goToURL('parent','1.1.1.my_var') won't work.
Thank you.
I want to have a text field, in which I will write a number. Then i want a Button to have a MM_goToURL on click action to a Link which has a variable in it with the value from the input text field.
To be more precise here is a part of the code:
the MM_goToURL function:
<script type="text/javascript">
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args+".location='"+args[i+1]+"'");
}
</script>
My text field:
<input name="12" type="text" id="ip" value="1" />
My Button:
<input name="3" type="submit" id="GO" onclick="MM_goToURL('parent','1.1.1.my_var');return document.MM_returnValue" value="Submit" />
<label for="1"></label>
So how can I declare my_var so it will always take the value inside the Input text field, and how do I include that variable inside the link, because just plain writing the name of the variable in there like :MM_goToURL('parent','1.1.1.my_var') won't work.
Thank you.