youtube / spfjs

A lightweight JS framework for fast navigation and page updates from YouTube
https://youtube.github.io/spfjs/
MIT License
2.23k stars 147 forks source link

?spf=navigation between form response and redirected page #428

Open andrewfluck opened 8 years ago

andrewfluck commented 8 years ago

It would be very useful to have a class to add to a form that will allow for similar behavior as a link. Ex: you have a form that posts data to the server and redirects you to a URL parameter according to what you type. ex: /weather/:zip I would like to send data to the page through SPF to transition between the content which is my main purpose for using this library.

RoneyThomas commented 7 years ago

Did you look into spf.navigate and spf.load??? By using the following functions you can load or navigate based on your form data.

andrewfluck commented 7 years ago

see what I was thinking was automatically intercepting post and get requests built in to the library, that way it will send the for data via xhr and send the ?spf=navigate along with it