JavaScript create input fields - php

At the moment i create this page here: http://skeptar.bplaced.net/Design_1.0/index.php?content=create_tutorial
If you press on the button "schritt hinzufügen" you will get one more step. I did it complete with PHP, but now i want to do it with JS. But im a totaly noob in JS. Should i use normal JS or jquery? I found many jsfiddles in the Internet, but im to low to use it. Maybe ssomeone of you can help me a bit.

Here is what I did.
I started with jQuery, because it is much less typing (and I found it easier to learn). Don't listen to those who say you must learn javascript first -- I didn't and I am now filling-in what I missed about javascript after having designed numerous sites.
I also found these great tutorials:
PHPAcademy.org
jQuery Basics
TheNewBoston.com
Intro to jQuery

Related

DropTile in PHP or simple HTML

Features like window 8 tiles are very much in now-a-days.Drop tiles allow to ahve feature like this.Is there anyway to havr website like droptiles.com in PHP or HTML.Idid lot of googling but in vain.any one who used such thing before
how can I get onclick JS of this site?
Thanks
In answer to how can I get onclick JS of this site?
It will be very difficult to get their code because they made that with their own concepts.Even if you will be able to their js code it will be very difficult to code that according to your needs.So better you try to implement the code with your own imagination.Try to learn advanced javascript or try jquery(which will be easy compared to js).
Best of luck!!!
Your question is a bit broad, there are numerous ways to implement this. However, PHP is not a relevant language for this because PHP is just server side and can't be used to change what happens on the client side. To implement this you would need to use JavaScript. If you don't know JavaScript, http://codecademy.com Would be a great place to learn it, or you could just google JavaScript.

Unknown Technologies for Web Forms

I am trying to get to grips with various forms of web design and build. I have looked around and still cannot get a useful answer on what technology is best to create a Dynamic Submission form (that doesn't look like crap).
I want to build a sumitable form that is aesthetically pleasing. I have planned and sorted out that I will use PHP and AJAX so it can be interactive but I am lost on what technology to use to actually code/script the design of the form. If anyone can help it would be greatly appreciated, thanks in advance!
If anyone who reads this uses Virgin Media as their internet provider and they use their card details form online, that is my ultimate goal to make the form similar too (with different questions and submission details, but that isn't important). The look is what I am after.
you are on the right track actually.
for aesthetics, you should research more about designing in HTML/CSS
JS is used for the dynamic user interface
PHP and AJAX are all that's needed for a dynamic form submission
google is your friend. go ask him.
other than that, it's up to your imagination and originality how you implement it.
you would need to use html and css to actually build the form.
Javascript to possibly validate the form on the persons browser (client side)
php would submit and send the form.
If you like the look of the virgin media form you can find out how it was done by using developer tools on chrome (f12 on a windows machine, cmd, alt and I on a mac) or firebug pluign on firefox. Others are available but these are two of the best. This wll show you the html mark up the css and how it all works.
Here you have some examples of interactive forms: http://www.catswhocode.com/blog/10-jquery-tutorials-for-working-with-html-forms
Your best bet will be with ASP.NET.
Its easy to set up and the software is easy to use and is free.
You should use Microsoft web developer express.
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-web-developer-express
You will have the choice to code in c# or visual basic , c# will be the beter choice.
ASP.net is the new generation of website development.

Jquery Autocomplete+Mysql

I'm looking for a location that can show me how to do this.
I have two text fields, one is a name. The other is a zip. I'm searching businesses that might have more then one office in a state and wanted to use the zip to further narrow down the result. I want to use a Jquery auto complete that is also querying the Mysql DB with 3000 rows.
I'm not a big developer. Are there any URLS that someone could point me to or someone I could pay to do this for me over a few hours for the right person?
Thanks,
I'm sure you could find a developer to do it for you, but this isn't the place to look.
MySQL allows you to do full text search on databases (3,000 lines is a small db, so efficiency definitely won't be a problem). What is your server technology? That'll make a big difference upon how you actually set the whole thing up.
As far as the autocomplete in jQuery, jQueryUI has an excellent autocomplete widget.
This example may help point you in the right direction. Like others have suggested, it uses the jquery ui autocomplete:
Using jQuery Autocomplete to Populate Another Autocomplete
Or, if that's overkill, try this one:
jQuery UI Autocomplete Widget with PHP and MySQL
Oh, I think the other answers are great, but I also want to recommend Better Autocomplete, a customizable jQuery plugin (still under active development) that I am currently maintaining.

Change elements upon button press?

I am getting started with HTML and PHP. Doing alright, I understand the syntax and everything. But... what I know is simply how to build page elements that may interact with other .php files in my site. But what if I want to interact with other elements in the same page?
This is what I'm trying to achieve:
I got some text and a button. I want to press the button, and that will cause my text to become a textbox which I can edit, and afterwards press the button again to convert the textbox back to plain text.
That is what I don't quite get: interacting with other elements to change their attributes/values, seems to be little documentation about that, or I am looking in the wrong place. If that is the case, can someone point me to the correct learning source?
Thanks.
You need javascript for that.... There are loads of examples online and everywhere:
http://www.w3schools.com/js/tryit.asp?filename=tryjs_dom
You are looking at the wrong place as you can't do that with PHP. Changing elements on the client side will involve JavaScript. There are a lot of ways to change elements with JS and to get a quick start I'd suggest you take a look at jQuery, a JS library that will make it easy for you to access and change elements.
What you're looking for is client side interaction. Javascript is the ticket for this and you'll have to include a tag in the head of your html doc.
Look up javascript on w3schools.com and then learn jQuery which is a great implementation of key javascript principles with a lot of extra features like animation and client/server side interaction.
You are moving into the realms of Dynamic HTML. The easiest way I have found to manipulate elements within an HTML page is to use JQuery.
PHP is a predominantly a server scripting language and has very little impact on browser-centric behavior. HTML is a markup language, but with few exceptions isn't dynamic. You want to look into content/browser scripting languages - depending on your medium, the two more popular for the time being are Javascript and Actionscript.
PHP does not allow you to change your HTML dynamically. As the other people mentioned, you need Javascript for that.
What you could do is reload the page on button click and change a session variable (for example) to decide wether the text is displayed as a textbox or just text.

How do you make a web page change without reloading the page?

What should I look into to accomplish this.
When you select an input field some text to the right shows up.
For example: https://twitter.com/signup
Anyway i need something like that works with PHP. What should I look in to?
And also How can you query the database and not have to reload the page to see result? For example i have seen on many sites registration you can check if the a username is used without the page reloading. Dont know how to explain better.
Thanks
Like Arkain said, they are making the text appear with JavaScript. PHP is server-side only, meaning it can't make any changes to the page once it has loaded.
You can however, call a PHP script dynamically (to check if a username is registered) using a technique called AJAX.
I'd look into Ajax using jQuery. I had done some things with ajax before trying jQuery but jQuery made it so easy that I found it enjoyable to keep implementing things using it.
You need to use JavaScript, look at this source for instance, for some beginner tutorials.
Learn JavaScript. You can start with jQuery (a pre-made javascript toolkit of functions that help you do many things without reloading the page).
Google for a jQuery Ajax tutorial.

Categories