Results 1 to 5 of 5
  1.    #1  
    Simply put: you have a sharklink to google. You click on it, and then you wait for the search form to come up. Stop right there.

    How about you click the google sharklink you instantly get this:
    http://tinyurl.com/mw7da
    You'll notice you are ready to make your query and it hasn't even connected to the internet yet!

    You can guess that typing in a query and pressing OK will connect and get you your requested information. This is accomplished by placing an html file on your SD card that uses javascript in Blazer to prompt you for information and instantly redirect you.

    I call these guys 'slinks'. So, let's say we have a google slink:

    1. Create and Place the HTML file on the SD card
      Since I'm looking to have a few of these, so I'm placing the html files in <SD CARD>:/Palm/Programs/Slinks
    2. Create the sharklink.
      Blazer can open html files on the SD card, so make the url in sharklinks:

      file:///Palm/Programs/Slinks/google.htm


    And that's it! I'm including two slinks in this message: google search and mobile.answers.com (a very good mobile dictionary and more). As you know, each slink package consists of an html file and its corresponding sharklink.
    Also, the board doesn't allow posting of html files by extension, so just rename the .txt files to .htm and put them in the slinks SD folder. I'm also including their sharklinks pointing to the location on the SD card I used above, in case you don't have sharklinks installed.

    Some will be able to figure out how to create the slinks by looking at the html, but somewhere later on in this thread I'll create a little tutorial on how to create your own, like this one (scroll down a bit) which makes logging into your bank account's web site much easier.

    ok, I hope you like the idea and perhaps we can see a few more of these posted here.

    -G

    Update: URL Syntax Fixed
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by g-funkster; 04/01/2006 at 11:20 AM.
    My Freebie Java Widgets (Compatible with 650, 680, 700p & 755p)
    HourlyXCast - Hourly & 7 Day Forecasts! Weather Graphics, Radar Images & Alerts. "When 'PM Showers' just doesn't cut it"
    - RottenTomatoMeter - Movie Ratings, Reviews, Showtimes for New Movies & DVDs
    - TV2Nite - Calendar Events for your Favorite TV Shows!
  2. #2  
    Way too cool! That's what I love about TC. Someone is always coming up with a great idea.
  3. #3  
    erm, b:? Just put file:///path/file.html

    Unless Shark Links is slightly different, but that's what I use in Blazer for loading a static local set of pages. Those pages have links to various things, but also include a small google search form that is offline until I put in a query. But Shark Links has its merits I guess.
    Last edited by khaytsus; 04/01/2006 at 11:06 AM.
  4.    #4  
    Quote Originally Posted by khaytsus
    erm, b:? Just put file:///path/file.html
    Hey look at that, it works without the B. i'll update that now.
    My Freebie Java Widgets (Compatible with 650, 680, 700p & 755p)
    HourlyXCast - Hourly & 7 Day Forecasts! Weather Graphics, Radar Images & Alerts. "When 'PM Showers' just doesn't cut it"
    - RottenTomatoMeter - Movie Ratings, Reviews, Showtimes for New Movies & DVDs
    - TV2Nite - Calendar Events for your Favorite TV Shows!
  5.    #5  
    This is actually really easy, so let's get started with an example, the google search slink.

    1. Browse to the web page and view the source
      In this case, http://www.google.com/pda. In Internet Explorer, right click -> view source.
    2. Find the form section
      The source code that relates to the searching is surrounded by <form..>..</form> tags, there may be multiple forms per page so you must find the right one, though that's usually simple. Here's the source section:
      [HTML]<form method="get" action="/pda"><p><input type="text" name="q" maxlength="2048" size="15" value="" /><input type=hidden name=hl value="en"><input type=hidden name=lr value=""><input type=hidden name=safe value=off><br /><input type="submit" name="btnG" value="Search" /><br /><input type="radio" name="site" value="search" checked="checked" />&nbsp;Web<br /><input type="radio" name="site" value="images" />&nbsp;Images</p></form>[/HTML]Yuck! Let's clean it up. Each "<input..." area gets its own line and everything that's not an "<input.../>" gets deleted.
      [HTML]<form method="get" action="/pda">
      <input type="text" name="q" maxlength="2048" size="15" value="" />
      <input type=hidden name=hl value="en">
      <input type=hidden name=lr value="">
      <input type=hidden name=safe value=off>
      <input type="submit" name="btnG" value="Search" />
      <input type="radio" name="site" value="search" checked="checked" />
      <input type="radio" name="site" value="images" />
      </form>[/HTML]Nice!
    3. Find the right elements
      We have to send the right information to the server to process our request, so let's look at what's being sent, the "<input" areas.

      The first is a "text" type called q, with no default value. This is our search query. This is definately required.

      There a few "hidden" ones there, I don't know what they do, so I'm ignoring them, assuming the search will work anyway (sometimes trial and error is involved, but since you can test these with your home pc, it's a quick fix when necessary)

      The "submit" type sends the form to the server, we'll do that ourselves so you can usually ignore it.

      The last is a radio button option, which on the page we use to select whether this is a google web search or image search. Since we're doing web search, we'll note we want a field with the name "site" with a corresponding value of "search".
    4. Change the form tag information
      You'll find forms do have "name=" tags, but this one doesn't. We'll create one (called googleSearch) in this case, but keep the original in case it comes with one. Also, the default 'action=' assumes the page is being sent from the server, but it's not in our case, it's our SD. So make sure you append to the 'action=' attribute the server's address:
      [HTML]<form method="get" name="googleSearch" action="http://www.google.com/pda">[/HTML]
    5. Convert chosen elements to hidden types.
      To save poor slow Blazer from having to sweat, we won't render any of these elements on the screen, so we change them to hidden types. Our final form looks like this:
      [HTML]<form name="googleSearch" method="get" action="http://www.google.com/pda">
      <input type="hidden" name="q" value=""/>
      <input type="hidden" name="site" value="search"/>
      </form>[/HTML]
    6. Putting it together
      Paste it together with the following code:
      [HTML]<html>
      <head>
      <SCRIPT language=JavaScript>
      function autoMagic()
      {
      var searchQuery = prompt("Google Search:","");
      document.googleSearch.q.value = searchQuery;
      document.googleSearch.submit();
      }
      </SCRIPT>
      </head>
      <body onload="JavaScript:autoMagic()">
      <form name="googleSearch" method="get" action="http://www.google.com/pda">
      <input type="hidden" name="q" value=""/>
      <input type="hidden" name="site" value="search"/>
      </form>
      </body>
      </html>[/HTML]
      I won't go into how all of it works, but in general, when the page finishes loading the secret form, it calls a function called autoMagic().
      [HTML]<body onload="JavaScript:autoMagic()">[/HTML] The code in the function does the following things:
      1. Prompt for Information
        The first line of the function declares a variable named searchQuery that receives the response from a prompt. The prompt function can take as the first parameter some guide words, like "Google Search:" or "Password" if you're doing a login to a bank. The second parameter that I'm sending blank, "", can contain a default value.
      2. Assign the value to the form
        The result of what you typed gets assigned to the variable q in the form we called googleSearch.
      3. Submit
        Then finally the form gets submitted.


      You can play around with this part, get multiple prompts (google local's what & where come to mind), etc.


    I hope that's not too much for some, but it really is quite simple, and for me I love how easy it is to log into my bank's site.
    My Freebie Java Widgets (Compatible with 650, 680, 700p & 755p)
    HourlyXCast - Hourly & 7 Day Forecasts! Weather Graphics, Radar Images & Alerts. "When 'PM Showers' just doesn't cut it"
    - RottenTomatoMeter - Movie Ratings, Reviews, Showtimes for New Movies & DVDs
    - TV2Nite - Calendar Events for your Favorite TV Shows!

Posting Permissions