NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

daarsk's avatar
daarsk
Tutor
Oct 21, 2016
Solved

ReadyNAS 102 host website including JavaScript

Hi,

I want to build and host a website from my ReadyNAS 102.

I have a basic index.php file as follows...

<!DOCTYPE html>
<html>
<body>

<h1>JavaScript Test</h1>

<?php
echo "<p>Text by PHP</p>";
?>

<button type="button"
oneclick="document.getElementById('demo').innerHTML = Date()">
Click me to display date and time.</button>

<p id="demo"></p>

</body>
</html> 

Clicking the button does nothing.

Is this because I need to install JavaScript or something?  If so, how do I do that.

Thanks

  • Hi daarsk,

     

    Are you still referring to the date not showing? If you are, I think you just missed the command. Instead of "oneclick" it should be "onclick".

     

    <button type="button" onclick="document.getElementById('demo').innerHTML = Date()"> Click me to display date and time.</button>

     

    Hope this helps.

     

     

    Regards,

7 Replies

Replies have been turned off for this discussion
  • FramerV's avatar
    FramerV
    NETGEAR Employee Retired

    Hi daarsk,

     

    I tried checking steps on how to host a website via the ReadyNAS and found no instructions to install JavaScript. Below is the overall process that you would need to accomplish:

     

    1. Create a share on the ReadyNAS where you want to put your website files.
      See the Create a Website Share section.
    2. Redirect default HTTP access to your ReadyNAS to this website share.
      See the Redirect Default HTTP Access section.
    3. Create a test index.html web page and verify access.
      See the Create a Test index.html Web Page section.
    4. Forward external HTTP access to your ReadyNAS unit.
      See the Forward External HTTP Access to Your ReadyNAS Unit section.
    5. (Optional) Set up your own Hostname.
      See the Set Up Your Own Hostname section.

    For further instructions, please check the link below:

     

    http://kb.netgear.com/app/answers/detail/a_id/24829

     

    You probably would be needing JavaScript for the creation of the website itself and if you are open for other option; I believe there are some apps that are available for the ReadyNAS for website editing.

     

     

    Regards,

    • daarsk's avatar
      daarsk
      Tutor

      I followed those instruction.  works fine.

      what i found amusing is the link to install PHP at the bottom of the instuctions takes you to a page not found???

      not to worry though, i have php installed :)

      if there are apps available for the ReadyNAS for website editing, i would very much like to know about them if anyone can point a direction. Thanks.

      • StephenB's avatar
        StephenB
        Guru - Experienced User

        daarsk wrote:

        the link to install PHP at the bottom of the instuctions takes you to a page not found

         


        Thx for reporting this, I've escalated it to Netgear.

  • No problem.
    Now, can anyone help me with the JavaScript issue I have?
    • FramerV's avatar
      FramerV
      NETGEAR Employee Retired

      Hi daarsk,

       

      Are you still referring to the date not showing? If you are, I think you just missed the command. Instead of "oneclick" it should be "onclick".

       

      <button type="button" onclick="document.getElementById('demo').innerHTML = Date()"> Click me to display date and time.</button>

       

      Hope this helps.

       

       

      Regards,

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More