Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
First of all sorry for my English. I'm working on a little website (I'm learning web design and PHP). As you can see in the page index.php, there are three buttons: login, registration (register) and guest. I've three scripts, one for login, one for register and one for guest access to site.
How can I show the script "login.php" or "register.php" or "guest.php", just under the buttons, when I click on the corresponding button?
Here are index.php and css files:
Download
use jQuery http://www.jquery.com makes life soo much easier
$(document).on("click","#login-btn",function(){
$("#div-where-to-load-stuff").load("url/to/login.php");
})
this is very bare bones. there are better ways to do it tho.
http://api.jquery.com/load/
You will have to either use AJAX or an IFRAME to load content asynchronously.
I really like to use the jQuery Forms plugin (in case you are able to use jQuery). Otherwise you have to look into AJAX or iFrame.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I would like to know if it is possible with the help of a button for example, to allow the user to enable javascript or disable it (but only enable it interests me) directly from our site.
That is to say, I have a website that needs javascript for animations or whatever and I would like everyone to be able to access it.
So make available to people a button to enable javascript if it is disabled.
Do you know what I'm talking about?
Is this possible? Or am I dreaming?
And if so, do you have any leads?
Not possible, but the best you can do is add a <noscript> tag with a message specifically for people without JS enabled. A huge majority of people keep JS enabled and never change this preference though.
Example:
<noscript>
<h1>Please enable JavaScript in your browser for the best possible experience.</h1>
</noscript>
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Thank you in advance for your help!
For a project I'm building a page for an animal shelter. On a page I have a list of available animals generated from JSONP data, with a picture and basic data.
I would like to create something so that if the user clicks on the animals picture, it shows the full info for the animal, and all the available pictures.
I'm not sure what the best way to do this would be? A modal? A new html page? We're only using front end (html, CSS, javascript).
you can use bootsrap modal as it fits perfectly to your needs and you can customize it the way you want :
https://v4-alpha.getbootstrap.com/components/modal/
Bootstrap modal is best to show full details.Because users dont want to load pages all the time.
For Bootstrap modal go to this link
https://www.w3schools.com/bootstrap/bootstrap_modal.asp
When you want to display with comments of that blog use new html page.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I would like to verify that a string is valid HTML, like the W3C Service does. I specifically don't want any browser corrections (like closing open tags), which precludes options that create DOM elements and read the HTML from them. It will run very frequently, so I really need to run it locally. Libraries are OK, jQuery is OK.
Edit #1: I'm asking about HTML validation, not form or input validation.
Edit #2: What I need is basically a Javascript implementation of the Nu HTML Checker.
Provided you're running node.js or python on the server side you can use a library like html5-lint by Mozilla to do all the heavy lifting for you. And for the java world there is a similar library jtidy and there are countless of similar libraries out there.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Is there any possibility to save a DIV, that has contenteditable="true", to a MySQL Table? I need to use PHP for this (and JS as a "helper").
I though of doing something like this:
Putting a button on the site that copies the content of the contentEditableDIV to a formDIV (a DIV that is in a form with method="POST" action="send_to_mysql.php").
The button is supposed to auto-trigger the submit button/function at the same time.
But is there any other, more convenient way? I am quite a beginner in MySQL, so I couln't think of any other way yet.
I appreciate any kind of help or response.
With best regards,
Dave
Conceptually...
//contenteditable element
//read element with JS
//URIencode to PHP via JS/AJAX
//Send to database with PHP/PDO
You're in for a real can of worms if you want this to work well. Especially if you want this to work well AND be able to accept pasted content from MS Word.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
This is a little hard to explain.
I want to have a separate home page depending on where people are coming from. For example, if they come from FaceBook, I'd like a special home page for FaceBook users. If they come from Google, I'd like another home page for them.
Here's an example of a website that does this. It will be the normal site at first, but once you've clicked the link thru FaceBook, your browser will only load the FaceBook version.
Normal:
http://www.protectyourhome.com/
From FaceBook:
http://www.protectyourhome.com/Facebook
Any ideas on the codes I'd need for this?
I figured out another way to do this, it's not exactly what I wanted but I made a copy of the website with the index page as indexFB.php and only linked that version of the site with Facebook.