Not logged in. · Lost password · Register
Forum: General discussion RSS
Browser_enc_filename, HELP!?
Return database file in browser_enc_form
Greg B (Guest) #1
No profile available.
Link to this post
To Start Off,
VERY NICE WORK! Much thanks!! Paypal will be ringing if you can answer this one!!!

Now down to business.......
I am wondering if there is an easy way to browser_enc_filename from a file that is querried from a database.

Here's an example........

I can querry a database and insert the filename into the field below like so.......

<a href="http://localhost:8080/blankpage?add=<#<%=(rs2.Fields.Item("Filename").Value)%>>&playaddedifnotplaying">add</a>

where the
is the database querry that returns the value
C:\Music\Albums\Journey\Greatest Hits\Be Good To Yourself.mp3

The problem is that I cannot get the returned filename into the correct format

So that it can be submitted into Winamp with the correct format

Please HELP!!!!!
Greg B
Henry (Administrator) #2
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Thank you for admiring my work! :smart:

Unfortunately you forgot to write what database system you use. I am sure there is a function that escapes the special characters for you. If you can't find a function you must use some JavaScript, because BrowseAmp has nothing to do with the string at that position.
Guest_Greg B (Guest) #3
No profile available.
Link to this post
I am using a simple access database with vb script.  Are there any commands or a simple code in browseamp that would be able to convert the C:\Music\Albums\Journey\Greatest Hits\Be Good To Yourself.mp3 into
C%3A%5CMusic%5CAlbums%5CJourney%5CGreatest+Hits%5C15+%2D+Be+Good+To+Yourself%2Emp3 when it is returned from the database querry?
I'm just a beginner here but doesn't the returned database file above have to be in the browser_enc_format to be submitted to Winamp?  
If not, Is there anything I can do to work with javascript to encode the file to be able to add it to Winamp?
I'm still a beginner with javascript, so any help with a quick and dirty script would be greatly appreciated!!!
Thanks in advance!!
Much appreciated

Greg B
Greg B #4
Member since Jan 2004 · 3 posts
Group memberships: Members
Show profile · Link to this post
This is the only hurdle I need to get passed to get everything working!  Any suggestions would be greatly appreciated!
Greg B #5
Member since Jan 2004 · 3 posts
Group memberships: Members
Show profile · Link to this post
Welp, :blink:
It seems that after a little digging and debugging I have found a code snippet that works for an ASP VB script page that returns a URLencoded filename querried from an access database! Here it is..... for all to enjoy if you have a similar setup!

<a href="http://localhost:8080/generic.htm?add=<%= Server.URLEncode((rs2.Fields.Item("Filename").Value)) %>">PLAY</a> 

where localhost:8080 is the port my BrowseAmp listens to and  ((rs2.Fields.Item("Filename").Value)) is the MS Access recordset value to be encoded.

Have fun everyone, and thanks Henry for the fly program.......I'll be visiting Paypal within the next 2months or so when I can scrape together some money to give you a little gift for my thanks! 

Have fun and happy coding!
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Page created in 184 ms (102.8 ms) · 52 database queries in 94.3 ms
Current time: 2020-05-26, 23:46:34 (UTC +00:00)