Help with my Widget!

Discussion in 'Mac Apps and Mac App Store' started by Kingsly, Mar 31, 2006.

  1. Kingsly macrumors 68040

    Kingsly

    #1
    I am [trying] to update my widget and its not working! Heres what's going on:
    First of all, I am terrible at HTML, java, etc. The only reason this widget exists is probably the massive RDF emitted my my MacBook Pro.
    Okay, heres what's going on:
    My widget, Tabit, searches for Guitar tab and chords via Ultimate guitar.com
    They recently changed their search function, leaving Tabit stuck searching for bands. I want to search SONGS.
    Here is what I've got going on, from tabit.js:
    Code:
    function perfomSearch(query){
    query = query.replace(/ /g,"+");
    var url = "http://www.ultimate-guitar.com/search.php?s="
    if (query == ""){
    		clearSearch() }
    	else {
    		widget.openURL(url + query) }
    
    U-G wants a song search to look like this:
    Code:
    http://www.ultimate-guitar.com/search.php?s=[B]place song title here[/B]&w=songs
    Soo... how do I add on that little bit to the end?
    I tried:
    Code:
    widget.openURL(url + query + &w=songs) }
    but it doesn't work, Tabit just sits there looking pretty.

    As a side note, I changed the info side to include a URL to my website. Sadly, it doesn't seem to work from dashboard. Heres what I've got, from tabit.html:
    Thanks, and PM me if you want the actual files to work with!
     
  2. GoCubsGo macrumors Nehalem

    GoCubsGo

    Joined:
    Feb 19, 2005
    #2
    Can't help you out, but I am excited to see this when it gets done.
     
  3. Kingsly thread starter macrumors 68040

    Kingsly

    #3
    Thanks, It was really cool when it worked!:eek:
    BTW, people that cruise Dashboardwidgets.com (EricNau, powermac99 and others) will recognise me as Mariposa. (I just figured that out. It was a strange sensation to realize that I ran into the same people on two different internet sites...)
     
  4. achunkymonkey8u macrumors newbie

    Joined:
    Apr 4, 2006
    #4
    Actually, I created a widget for the Yahoo! Widget Engine (formerly Konfabulator, very similar to Dashboard, but driven by xml/javascript) that does a search over multiple sites for guitar tabs, including UG. You've got the right idea, just throw some quotes around that &w=songs. Hopefully that'll do it for you...if not let me know, maybe there's another problem.
    Good Luck, check out my widget?

    http://www.widgetgallery.com/view.php?widget=36989
    -or-
    http://web.tampabay.rr.com/cbeauchamp/guitar_tab_search.html
     
  5. yg17 macrumors G5

    yg17

    Joined:
    Aug 1, 2004
    Location:
    St. Louis, MO
    #5
    Change:
    Code:
    var url = "http://www.ultimate-guitar.com/search.php?s="
    to:
    Code:
    var url = "http://www.ultimate-guitar.com/search.php?w=songs&s="
    Variables in the query string can be in any order, so that should work.
     
  6. Kingsly thread starter macrumors 68040

    Kingsly

Share This Page