jon31
05-25-2005, 02:13 AM
Hey guys,
I'm trying to write a very simple javascript function, and here goes:
function insertURL(form_id, field_id) {
var linkURL = prompt ("Please enter website URL:","http://");
document.form_id.field_id.value = document.form_id.field_id.value + "" + linkURL + "";
}
Now, if I put form_id or field_id in an alert, it display the proper value, but it doesn't work when I try to return the results of the function to the field_id's value.
Can someone show me what I'm doing wrong?
Thanks,
Jon
I'm trying to write a very simple javascript function, and here goes:
function insertURL(form_id, field_id) {
var linkURL = prompt ("Please enter website URL:","http://");
document.form_id.field_id.value = document.form_id.field_id.value + "" + linkURL + "";
}
Now, if I put form_id or field_id in an alert, it display the proper value, but it doesn't work when I try to return the results of the function to the field_id's value.
Can someone show me what I'm doing wrong?
Thanks,
Jon
