mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
07/12/12 08:37 AM (13 years ago)

Simple web script (some help needed)

Hey all, long time since I had a question myself! I need a script that functions like this: There's a text box, type in some text: "hello", then hit the submit button. A link gets created: http://buzztouchmods.com/hello and then redirects you to said link automatically. I know this is a simple one, but its stumping me, and I have to be out all day - so I was hoping some bt members here could offer some solutions? Cheers, David buzztouchmods.com
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
07/12/12 09:01 AM (13 years ago)
I believe document.write could create the link. Fred
 
lsills81
Apple Fan
Profile
Posts: 469
Reg: Mar 19, 2012
location unknow...
14,090
like
07/12/12 09:04 AM (13 years ago)
Apple script? What kind of script?
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
07/12/12 09:07 AM (13 years ago)
HTML Script, looking into write.document, any further help would be greatly appreciated, will post the code when I get the working solution, right now I have the redirect down, the link creation 50% done. Cheers, David. buzztouchmods.com
 
lsills81
Apple Fan
Profile
Posts: 469
Reg: Mar 19, 2012
location unknow...
14,090
like
07/12/12 09:09 AM (13 years ago)
very cool....thank you
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
07/12/12 09:13 AM (13 years ago)
http://www.sitepoint.com/forums/showthread.php?233491-document-write-on-submit-form Getting close! Might be able to pull this off before I head to work! David buzztouchmods.com
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
07/12/12 09:40 AM (13 years ago)
<html> <head> <title></title> </head> <body> <script type="text/javascript" language="javascript"> <!-- Begin function resolution(){ document.getElementById('Result').innerHTML='LINK HERE with FORM VALUE?'; } // End --> </script> <form method=post> <input type=text name="myurlform" size="20" value="typeawordfortheurl" onFocus="select()"> <input type=button value="go to pre-made link" onClick="resolution(this.form,'result')"> </form> <div id="Result"></div> </body> </html> The goal here is for the user to type a word, hit submit, and the link http://buzztouchmods.com/WHATEVERHEENTERED to be created and redirected too. Still stumped. David. buzztouchmods.com
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.