![]() |
|
Add text from textbox behind URL. - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Webmasters (https://hackforums.net/forumdisplay.php?fid=141) +---- Forum: Website Construction (https://hackforums.net/forumdisplay.php?fid=50) +---- Thread: Add text from textbox behind URL. (/showthread.php?tid=5904839) |
Add text from textbox behind URL. - Frankey - Nov 7, 2018 Hi, I am currently 'developing' my website but I have a small problem. This is what I currently have, also what I want is showcased in this. ![]() I want the number/text that is written in those 3 texts boxes added behind the URL. So it would become tr.wqeqe.io/tr?offer_id=323728&pub=116&aff_subid1=INPUTBOX1&aff_subid2=INPUTBOX2&aff_subid3=INPUTBOX3 I am not really keen on sending my full code, since it is based on a paid source, and I do not know what is needed to be sent. Please send me a PM if you can help me with this (or post below) and I'll send you a message. RE: Add text from textbox behind URL. - DrDoof - Nov 7, 2018 So you want the "share it" link to be updated as you type in those three boxes? RE: Add text from textbox behind URL. - Abruptum - Nov 7, 2018 You can do this over javascript. you can send me a pm. RE: Add text from textbox behind URL. - Frankey - Nov 7, 2018 (Nov 7, 2018 01:34 PM)DrDoof Wrote: So you want the "share it" link to be updated as you type in those three boxes? Yea, sorry. I am a bit retarded in explaining stuff. RE: Add text from textbox behind URL. - DrDoof - Nov 7, 2018 (Nov 7, 2018 01:35 PM)Frankey Wrote: Yea, sorry. I am a bit retarded in explaining stuff. Easy enough, you'll have to use some JS witchcraft then. Check input change for the three boxes and update the value for the text field with the url. https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/oninput https://stackoverflow.com/a/7609144/7739134 RE: Add text from textbox behind URL. - Nachfolger - Nov 7, 2018 Literally just use JavaScript to append the textbox values to the end of the URL. This is base level stuff, and PHP is not needed. This is a basic example of doing it for one of the textboxes. If you have the baselevel URL I would recommend rebuilding the value from scratch (baseurl + "xyz="), instead of just appending onto the box. If you opt to not rebuild the URL, then you will need to verify that the variable is not already included in the URL when updating the share textbox value (So it doesn't include it twice). Code document.getElementById('textbox-1').onblur = function() { |