Page 1 of 1

hash value in html

Posted: Tue Mar 19, 2019 6:31 am
by johan
Hi

In my subform I want to set an html link to my server using the hash value of the field bl_name. Bl_name is part of the subtable
This isn't working. Any idea how to set my url?

<a href="https://myserver/uploads#bl_name">Download</a>

Johan

Re: hash value in html

Posted: Tue Mar 19, 2019 6:50 am
by kev1n

Re: hash value in html

Posted: Tue Mar 19, 2019 3:03 pm
by johan
Kevin
I'm almost there but I know nothing about JavaScript :(

with

Code: Select all

var p = $(this).attr('data-nu-form') + $(this).attr('data-nu-prefix').slice(-3) + 'bl_name'; window.open($('#'+p).val());
I get url myserver/filename

What i need is myserver/uploads/filename.

Can you help me wth that?
Thanks
Johan

Re: hash value in html

Posted: Tue Mar 19, 2019 4:00 pm
by kev1n
What value does the field bl_name contain? A screenshot might help to understand the problem better.

Re: hash value in html

Posted: Tue Mar 19, 2019 4:21 pm
by johan
Kevin

bl_name contains the name of the pdf-file on my server

Re: hash value in html

Posted: Tue Mar 19, 2019 4:31 pm
by kev1n
So you need to add the 'myserver/uploads/' string (replace with your server of course)

Code: Select all

window.open('myserver/uploads/' + $('#'+p).val());

Re: hash value in html

Posted: Tue Mar 19, 2019 7:38 pm
by johan
works fine thanks.

Re: hash value in html

Posted: Fri Mar 22, 2019 2:31 am
by admin
.