Pre Populating a HTML Form From the URL - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Pre Populating a HTML Form From the URL

Hi, This is my first post.

We are running a case management system and on one of our screens we link to a engineers site where there is a HTML form. We simply open this site using a URL.

My question is...Is there anyway to send information to a HTML form using the URL. For example "HTTP://www.myform.htm" (then put information you want to populate the form with here) I know how to do this using ASP but i just need to do it using standard HTML with a URL.

Thanks for any feedback,



Comments

  • zibadianzibadian Posts: 6,349Member
    : Hi, This is my first post.
    :
    : We are running a case management system and on one of our screens we link to a engineers site where there is a HTML form. We simply open this site using a URL.
    :
    : My question is...Is there anyway to send information to a HTML form using the URL. For example "HTTP://www.myform.htm" (then put information you want to populate the form with here) I know how to do this using ASP but i just need to do it using standard HTML with a URL.
    :
    : Thanks for any feedback,
    :
    :
    I don't think it is possible with only HTML, but you can use javascript for it. With the right script you can place the initial values using an URL query: http://www.mysite.com?username=someone&domain=private

  • mac_doggiemac_doggie Posts: 488Member
    : Hi, This is my first post.
    :
    : We are running a case management system and on one of our screens we link to a engineers site where there is a HTML form. We simply open this site using a URL.
    :
    : My question is...Is there anyway to send information to a HTML form using the URL. For example "HTTP://www.myform.htm" (then put information you want to populate the form with here) I know how to do this using ASP but i just need to do it using standard HTML with a URL.
    :
    : Thanks for any feedback,
    :
    :
    :
    :
    Try this...
    Put in the parameters ?name=MyName&email=[email protected]
    to your URL
    [code]

    var params = document.location.search.substr(1,document.location.search.length).split('&');
    var arguments = Array();
    for(var i=0;i<params.length;i++) {
    var arg = params[i].split("=");
    arguments[arg[0]] = arg[1];
    }
    alert(arguments['name']);
    alert(arguments['email']);
    [/code]

    ;-)
    -mac-
    mailto:[email protected]
    the Netherlands...


Sign In or Register to comment.