Spinneret losing connection???
Tagamet
Posts: 22
Recently while running through my tests using Mike G's examples, my browsers haven't been able to stay connected. The Hello World (index.htm) would show, but as soon as I select the LED link, the page changes and the browser times out. Then the original page won't load again either. I've tried this on every port on my router, changed port addresses, same thing. The PWR, SPD, FDX led's stay lit on the Spinneret while RX & TX light up intermittently. Any help would be appreciated.
Thanks,
Tagamet
Thanks,
Tagamet
Comments
It's your out of the box HTTPServer.spin file. It worked fine before. Now I have some extensive coding for my HTML portion that I'm not able to test. I'm still trying to decide whether to use your Get & Post methods. These worked fine until today...
Thanks,
Tagamet
P.S. - I've saved the text files in ANSI & UTF in the xxxxx.htm format & have used both IE & FF previously.
Tagamet
Thanks for your time,
Tagamet
The browser requests led.htm?led=on or led.htm?led=off and the Led(id) method is invoked. The Led method reads the query string, changes the state of an LED, and returns true if all went well. Execution is passed back to the Dispatcher and since Led(id) == true, the Dispatcher returns. StaticFileHandler(id) is not invoked and the led.htm is not sent to the caller.
Clean up the Dispatcher method and include only the required filters.
In all HTTP transactions there is a request and a response. The Dispatcher method provides the programmer an opportunity to filter incoming requests and execute custom logic before sending a response. You must send a response or the browser will timeout.
I really appreciate it,
Tagamet
Thanks again,
Tagamet
Thanks,
Tagamet
I got the Spinneret up and working (partially) last night! I inserted your PRI SendLedResposne(id) | headerLen, qstr method from your services/ajaxled.htm page and the led turns on & off w/ no issues. For some reason, the much simpler PRI Led(id) | qstr method isn't working for me. In my html code, I'm wanting to query two radio button values and execute spin code based upon the selections. I don't think I would be able to use the a href anchor tag technique because I need to return 2 values to the Spinneret when the submit button is clicked. I'm going to try the POST option later this evening.
Thanks again,
Tagamet
GET Example
myurl.com?var1=1&var2=2&var3=3
For user entry, like radio buttons, set the method attribute of the form tag to get. Doing so will append user entry fields in the URL. Set method="post" to append the fields to the message body.
Check out w3schools for easy to follow HTML tutorials. Also see my Spinneret tutorial.
Please post your code if you need further assistance.
Thanks again,
Tagamet