Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > Choice of weapons
User Name
Password
REGISTER NOW! Mark Forums Read




Reply Bookmark and Share
1 20th November 23:56
thomas heckmann
External User
 
Posts: 1
Default Choice of weapons



Hi everybody,

I'm not shure if this is the right place, so directions to another newsgroup
are welcome.

I run a website that offers audioclips for download (http://port5.de if
you're interested) and would like to create a 'charts' database. Obviously,
it is important to capture whether a download has been completed ´(as
opposed to canceled), because this means the user liked the clip well enough
to listen to the end.

I found a way to make a db entry when the download starts via PHP, but PHP
cannot handle events (like document loaded). Javascript could do this, but
this cannot access a database. I could write a java class for the db access
and trigger that via javascript, but this would require the jdbc driver on
the client side, and I cannot assume my users have one and I don't want to
confuse them with download messages for .jar-files.

So what would the enlighted round of experts suggest as the appropriate tool
for this task (that I considered trivial two days ago) ?

Thanks

Tommi

P.S.: I usually write C++ for embedded systems so maybe this question *is*
silly for you ;o)
  Reply With Quote


 


2 20th November 23:56
thomas heckmann
External User
 
Posts: 1
Default Choice of weapons



Hi everybody,

I'm not shure if this is the right place, so directions to another newsgroup
are welcome.

I run a website that offers audioclips for download (http://port5.de if
you're interested) and would like to create a 'charts' database. Obviously,
it is important to capture whether a download has been completed ´(as
opposed to canceled), because this means the user liked the clip well enough
to listen to the end.

I found a way to make a db entry when the download starts via PHP, but PHP
cannot handle events (like document loaded). Javascript could do this, but
this cannot access a database. I could write a java class for the db access
and trigger that via javascript, but this would require the jdbc driver on
the client side, and I cannot assume my users have one and I don't want to
confuse them with download messages for .jar-files.

So what would the enlighted round of experts suggest as the appropriate tool
for this task (that I considered trivial two days ago) ?

Thanks

Tommi

P.S.: I usually write C++ for embedded systems so maybe this question *is*
silly for you ;o)
  Reply With Quote


 


3 20th November 23:56
nathanz
External User
 
Posts: 1
Default Choice of weapons


I don't know now you can trigger Javascript once a file is downloaded,
but assuming you can, you can just make an http call to a Java servlet
or PHP (*shudder*) script. That servlet can update your database,
then redirect to... what ever you want.

Personally, I wouldn't bother with all this. Just update your
database when they start the download. If the download fails or the
user cancels it, who cares? They obviously _wanted_ to listen to the
song, so it makes sense that it counts on your charts.

//Nathan
  Reply With Quote
4 20th November 23:56
thomas heckmann
External User
 
Posts: 1
Default Choice of weapons


Thanks!
I'l try to follow your advice and see where it takes me. I hope I find a way
without much screen change.
For triggering I thought about the "onload" handler of the document (or
window).
But I think it is necessary to count only the completed downloads, because
when the user starts the download he doesn't know anything about the song.
So when he listens and cancels after a few seconds because he doesn't like
it, this sure doesn't deserve points for the charts ;o)
.... not that it was that important!

Tommi

"Nathan Zumwalt" <nathanz@hotmail.com> schrieb im Newsbeitrag
news:521673fd.0405030813.a1fc72@posting.google.com ...


*is*
  Reply With Quote
5 20th November 23:56
nathanz
External User
 
Posts: 1
Default Choice of weapons


I don't know now you can trigger Javascript once a file is downloaded,
but assuming you can, you can just make an http call to a Java servlet
or PHP (*shudder*) script. That servlet can update your database,
then redirect to... what ever you want.

Personally, I wouldn't bother with all this. Just update your
database when they start the download. If the download fails or the
user cancels it, who cares? They obviously _wanted_ to listen to the
song, so it makes sense that it counts on your charts.

//Nathan
  Reply With Quote
6 20th November 23:57
thomas heckmann
External User
 
Posts: 1
Default Choice of weapons


Thanks!
I'l try to follow your advice and see where it takes me. I hope I find a way
without much screen change.
For triggering I thought about the "onload" handler of the document (or
window).
But I think it is necessary to count only the completed downloads, because
when the user starts the download he doesn't know anything about the song.
So when he listens and cancels after a few seconds because he doesn't like
it, this sure doesn't deserve points for the charts ;o)
.... not that it was that important!

Tommi

"Nathan Zumwalt" <nathanz@hotmail.com> schrieb im Newsbeitrag
news:521673fd.0405030813.a1fc72@posting.google.com ...


*is*
  Reply With Quote
Reply


Thread Tools
Display Modes


Some other forums that might be of your interest : Development, Ada, Apple script, Assembler, Awk, Beos, Basic, C, C++, C#, C# .net, .net, .net frameworks, Asp .net, Clarion, Clipper, Clos, Clu, Cobol, Coldfusion, Delphi, Dylan, Eiffel, Forth, Fortran, Haskell, Hermes, Icon, Idl, Java, Java script, Jscript .net, Jcl, Linoleum, Lisp, Lotus, Limbo, Logo, Ml, Mumps, Oberon, Postscript, Pop, Pl1, Prolog, Python, Ruby, Pascal, Perl, Php, Rebol, Rexx, Sed, Sather, Scheme, Smalltalk, Tcl, Vhdl, Vrml, Visual basic, Visual basic .net, Yorick, Mysql, Omnis, Postgresql, Xbase, Access, Oracle, Adabas, Berkeley, Btrieve, Filemaker, Gupta, Db2, Informix, Ingres, Mssql server, Object, Olap, Paradox, Rdb, Revelation, Sybase, Theory, Dbase, Html, Java script, Css, Flash, Photoshop, Corel script, Xml, Tech, Beos, Gem, Hp48, Hpux, Linux, Mac, Ms-dos, Os2, Palm, Solaris, Ti99, Windows, Xenix, Aos, Chorus, Geos, Inferno, Lantastic, Lynx, Mach, Minix, Netware, Os9, Parix, Plan9, Psos, Qnx, Xinu, Sco, Unix, Aix, Aux, 386bsd, Bsdi, Freebsd, Netbsd, Openbsd, Ultrix, Amd, Intel, Aptiva, Buz, Deals, Homebuilt, Overclocking, Programming, Extra forums


Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666