![]() |
|
[Help] Print Javascript in img src - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5) +---- Thread: [Help] Print Javascript in img src (/showthread.php?tid=5941334) |
Print Javascript in img src - Grey Goose - Feb 15, 2019 Hi, I'm working on a tracking mechanism to a affiliate script and need a unique ID in my src. I have the following code: Code <script type="text/javascript">I need the uuidv()) function to be inserted into the src where it says VAR HERE - How the f... do i do that? RE: Print Javascript in img src - I337 - Feb 15, 2019 Do you have access to the js on the same page?? I think you need to use onclick and change the src and add UUID RE: Print Javascript in img src - Grey Goose - Feb 15, 2019 (Feb 15, 2019 07:56 AM)thelastone1 Wrote: Do you have access to the js on the same page?? I don't think onclick is an option. The script is going to be on a "succes page" from when you're signing up for a newsletter. RE: Print Javascript in img src - Abruptum - Feb 15, 2019 (Feb 15, 2019 08:14 AM)Grey Goose Wrote: I don't think onclick is an option. I think it would be better to generate the ids server side or there will be duplicates. Possible Solution without server side checking: Code <img id="partner-ads" src="" width=0 height=0 style="display:none"> |