Discussion Locked

Insert value from a PC app into web page

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a PC app that generates a registration string that I would like to insert into a field on a purchase page on my web site. The user has clicked a button that will take him to the page. I am stuck at trying to get the value into the field on the form. Can anybody provide any help?

Thanks, Steve

3 replies

by jay eckles

In the app, if the user is clicking on a button to launch a web page, then there's clearly a URL somewhere. Could you append the registration number to the URL, like this:
http://server/path/file?0123456789
(note the ?)
Then, use Javascript to retrieve the registration number from teh URL and enter it into the form field.

Jay
www.jayeckles.com

by steveinvegas

Yes, I can append the registration # to the URL...I just have no idea what to do beyond this point. What should the Java script look like.

Thanks, Steve

by jay eckles

The property document.location contains the URL for the current page. You can search that property for the ?, and assume everything after that is the registration number. Then assign that value to one of your input fields.

Jay

This discussion is closed to new replies.