Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need a little help

Featured Replies

hi evryone this is my first post (please be kind and understanding with me)

 

im makeing a single web page for a friend of mine and im just not sure how to go about it.

 

the page idealy should have an interactive feel to it smothing like what im going to try and layout for you below.

Page loads.

Welcome to (websitenamehere)
What is your name (user input goes here)
Thank you (user input is printed here)

(some text is scroling accros the screen like a typwrighter)

thats the basic content of the page, with that said it needs to grab the attention of the user, im just not sure how to do that :(

 

my problem is that i only know basic (verry basic) html and that it, i was hopeing that you could give me an idea how to acomplish the task at hand.

 

Thanks for reading

Purity

  • Author

Hi! I'm new here myself. :)

 

It's impossible for you to achieve what you're looking for with HTML alone. HTML is used for structuring web pages, not interactivity. You'll need to look at something like JavaScript or PHP to do that, I'm afraid.

thanks for the help samllerz, how would i achieve my task using html and JavaScript?

You'd need to use some script, but I would suggest against having pop up login boxes, drives users mad. You could use javascript or php to name just two options, it its javascript users can disable your script.

 

I see Smallerz beat me too it. :)

Edited by WBC

  • Author

You'd need to use some script, but I would suggest against having pop up login boxes, drives users mad. You could use javascript or php to name just two options, it its javascript users can disable your script.

 

I see Smallerz beat me too it. :)

yea pop up boxes usualy drive me insane so i wont be useing them in my project.

 

which language would give me a more flexible aproach to this project

Edited by purity

which language PHP or JavaScript would give me the best result?

as said before javascript can be turned off by the user, so php would be the better option

Edited by pat24

You could try googling what you want and maybe come a cross a pre-made one or if you are after doing it yourself try w3schools

heres the basics of what you want in javascript (annoying pop-up box version):

 

<html>
 <head>
   <script type="text/javascript">
     function show_prompt()
     {
       var name=prompt("Please enter your name","name...");
       if (name!=null && name!="")
       {
         document.write("Thank you " + name);
       }
     }
   </script>
 </head>
 <body>
   <input type="button" onclick="show_prompt()" value="Show prompt box" />
 </body>
</html>

 

 

 

 

 

and for php you could do something like this:

 

<html>
<head>
   <?php
       if($_POST){
           $username = $_POST['username'];
       }
   ?>
</head>
<body>

   <?php
       if($username != ""){
           echo 'Thank you '.$username;
       }
   ?>
   <form action="urlOfThisPage" method="POST">
       <h1>Please enter name</h1>
       <input type="text" name="username"/>
       <input type="submit"/>
   </form>
</body>

 

The example above will take the users input in the text field and send it too itself when submited. The php in the head of the document will check to see if this has happened, if it has it will store the user input in the variable '$username'.

The php in the body of the document will check if there is any data in the variable and if there is it will print Thank you 'userInput'.

Note: in order for php to run you need to have the pages extension as .php not .html... it also needs to be on a server with php installed

Edited by frupence

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.