Page 1 of 1

hash value in html

PostPosted: Tue Mar 19, 2019 3:01 pm
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?

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

Johan

Re: hash value in html

PostPosted: Tue Mar 19, 2019 3:20 pm
by kev1n

Re: hash value in html

PostPosted: Tue Mar 19, 2019 11:33 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

PostPosted: Wed Mar 20, 2019 12:30 am
by kev1n
What value does the field bl_name contain? A screenshot might help to understand the problem better.

Re: hash value in html

PostPosted: Wed Mar 20, 2019 12:51 am
by johan
Kevin

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

Re: hash value in html

PostPosted: Wed Mar 20, 2019 1:01 am
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

PostPosted: Wed Mar 20, 2019 4:08 am
by johan
works fine thanks.

Re: hash value in html

PostPosted: Fri Mar 22, 2019 11:01 am
by admin
.