Git Product home page Git Product logo

Comments (7)

Nickersoft avatar Nickersoft commented on May 18, 2024

Could you elaborate on what you mean by admin area?

from push.js.

2braincells2go avatar 2braincells2go commented on May 18, 2024

Hi Tyler. Thank you for replying.

Looking for simple way to send the actual push message. Maybe simple form? Since many of the students are in 12-16 year old range, looking to make things very simple.

Totally understand this is out of scope, but just hoping for some more in-depth tutorials and maybe working examples.

Cheers,

Woody

from push.js.

Nickersoft avatar Nickersoft commented on May 18, 2024

Depending on what you hope to achieve, you could just wire a button to send the message using a button onclick() method. So it might look something like:

<button onclick="Push.create('Hello World');">Click me</button>

That will give you a button that sends a notification when pressed. I seemed to run into problems when running the code locally, so it might have to be on an actual website to work properly. Hopefully this is along the lines of what you're looking for.

from push.js.

2braincells2go avatar 2braincells2go commented on May 18, 2024

Thanks again Tyler for input.

Yes something like that but, with form so message can be customized.

I tried onclick method very similar to what you show but also ran into problem of not working. Was on server when tried. Will review my code tomorrow at school and see if yours fixes issues.

Just looking for form that message is customized and submit button so very close:)

Cheers!

from push.js.

Nickersoft avatar Nickersoft commented on May 18, 2024

Oh, okay! You could always just do something like this (untested):

<form onsubmit="func();">
    <input type="text" id="name" />
    <input type="submit" value="Submit" />
</form>
<script type="text/javascript">
     function func() {
          Push.create(document.getElementById("name").value);
     }
</script>

For more information of HTML forms, see here. Hopefully this is a little more helpful.

from push.js.

2braincells2go avatar 2braincells2go commented on May 18, 2024

Hi Tyler. Sorry for no reply, been kind of crazy with end of year, school is out for summer.

Appreciate the input and will be exploring some ways to do an admin area over the summer.

Cheers!

from push.js.

Nickersoft avatar Nickersoft commented on May 18, 2024

No problem. I closed this issue because I hadn't heard from you and figured you had everything sorted out. If you have any further questions, just feel free to post on this issue and I'll reopen it :)

from push.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.