Shop OBEX P1 Docs P2 Docs Learn Events
Displaying links on a PINK to other sites....help.... — Parallax Forums

Displaying links on a PINK to other sites....help....

steve_bsteve_b Posts: 1,563
edited 2006-01-03 20:21 in General Discussion
Hey guys,

tearing in to my PINK and having some fun (once I realized I was talking to the right pins!).

Anyhow, rather than connecting a Real Time clock to my stamp...I was thinking, is there a way to display another pages info via a link?
I'm a total newb wrt html writing....but I'm thinking, "the PINK doesn't have a lot of memory to hold html codes....so why not have href's to many thinks....but href's are just links..."

Alright....I'm already rambling!
What I'm after is to display the NIST time on my page with each reload.
http://nist.time.gov/timezone.cgi?Eastern/d/-5·is the link I'm after.· Now, it's no good to have to click on it to see the time....so is there a way to have it like a dynamic window in that it will display that other pages information but not have anything resident on the PINK other than the reference to it!?

Thanks

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·

Steve

"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2006-01-03 02:19
    steve_b,

    Sounds like we're at about the same place in our exploration of the world of PINK.

    I need the same type of thing so that I can have the page auto-update every few seconds to display new field data the Stamp has read and transferred to the PINK.

    I got a book "HTML in easy steps" by Mike McGrath at Chapters a couple of days ago which has been a great help in coming up to speed on html. From what I've seen, I think you can do what you want as far as pulling data from another link. ....but I haven't tried it myself yet.

    Hopefully someone on the forums can join in and help out these Canucks!

    Happy New Year!

    Tom
  • DiablodeMorteDiablodeMorte Posts: 238
    edited 2006-01-03 13:12
    You may want to look into JAVASCRIPT
  • steve_bsteve_b Posts: 1,563
    edited 2006-01-03 13:26
    Will JAVASCRIPT work on the PINK?
    Some areas I'm knowledgable....HTML/Webstuff....nope!! haha So please go easy on me! [noparse];)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • DiablodeMorteDiablodeMorte Posts: 238
    edited 2006-01-03 15:55
    I will compress this script as much as possible:


    <script language="JavaScript">
    <!--var I =0;

    //BY DiablodeMorte
    function U() {
    if(I) {
    clearTimeout(I);
    I=0;
    }var t=new Date();
    document.c.t.value=""+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds();
    I=setTimeout("U()",1000);}
    function S() {
    I=setTimeout("U()", 500);}
    function K() {if(I) {
    U(I);
    I=0;}}
    //-->
    </script>
    <body onload="S()" onunload="K()">
    <form name="c">
    <input type=text name="t" size=8>
    <form>



    (375 Char)||4KB
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2006-01-03 16:01
    Yes, it is possible to make references to data/images/stuff stored on other servers- just like you can link to things not stored directly on a server...as long as the other data is web available.

    The PINK was designed as an interface, not to take over web-server needs per se- that is if you are looking beyond simple data/control interface pages, you really should have an honest-to-goodness webserver (such as Apache) that serves your 'main pages' and fill in the data/info/control with things referenced off of a PINK module. Is this "necessary"? No. It depends on how large your pages grow. The PINK is a hardware device, and it doesn't have gigs of storage for pages/data. The webserver is viewed as an interface, rather than something designed to fill all of your webserver needs.

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com
  • steve_bsteve_b Posts: 1,563
    edited 2006-01-03 16:06
    I was more or less looking to "gussy-up" (I'm honestly not old enough to use that term) the webpage and didn't want to bother hammering things down enough to fit on the PINK.

    I'm just not savvy enough about web designing to know how to reference images/etc off of other servers.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • DiablodeMorteDiablodeMorte Posts: 238
    edited 2006-01-03 17:17
    I acknowledge what Ryan Clarke said and I would like to make it clear that the PINK is indeed a interface but to those of your that need Time to be displayed for interface purposes can use such scripts as the one I have provided. It gets current system time of the user and not any time off the server thus it will work on ANY Javascript compliant browser and does not add any server load. IT is all handled client side. If one had a device such as a RTC on the basic stamp I could also right a script to show the STAMPS time and not just the clients time. This could help current RTC problems or just see RTC data. While this would add server side load I do not believe it would be much as long as the interval was set at maybe 2-10 seconds.
  • steve_bsteve_b Posts: 1,563
    edited 2006-01-03 19:28
    Thanks DiablodeMorte,

    I'll give it a try when I get home.
    Does this script just need to be dumped in the 'index.html' file?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2006-01-03 19:58
    For things as simple as images you can read about the IMG tags, and use the full address (from another server)- Try a Google on HTML and IMG...

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com
  • Mike CookMike Cook Posts: 829
    edited 2006-01-03 20:21
    Steve,

    Placing image tags in HTML is pretty easy. Look at the following code.

    <center>
    <img src="http://allsurplus.net/logos/felix.gif" >
    </center>
     
    

    If you add this to you html code, this will place the image 'felix.gif' in the center of the screen, of the browser. This file is stored on my web hosting service. Sorry I do not have a PINK module, but I have used the Ethernet enabled Z-World modules to do the same thing as the PINK module, by modifying·it's *.txt·html code.

    Hope this helps,

    Mike

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "OEM NMEA GPS Module" Now available on ebay for only $17.49

    Product web site: http://www.allsurplus.net/Axiom/
Sign In or Register to comment.