Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-10-2011, 09:36 PM   PM User | #1
kalender
New to the CF scene

 
Join Date: Mar 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
kalender is an unknown quantity at this point
Exclamation Fetch info without reloading page (when clicking submit button - AJAX?)

Hi!
Coding-gurus, Need some serious help.

If you guys take a look at:
http://83.233.5.191/crurre/index.php

There is a field called "Personnummer". Fill this with:
440611-1890
Then press "Hämta personuppgifter"

It will then fetch/recieve some personal data and fill the correct fields.


But.. as you can see.
The number disappear when the site reloads, but the info fills in which is good at least. So how do I solve this? The number have to stay in the "Personnummer" field without reloading the whole page and still fill in the info.


PHP Code:
<h1>Registrering</h1>
<
form action="index.php" method="post">
<
div class="input text">
<
label for="DataNum">Personnummer</label>
<
input type="text" name="personnr" id="data" value=""/>
</
div>

<
input type="submit" id="GetData" value="Hämta personuppgifter" /> 

Thats how the Personnummer (civic number) field and Hämta personuppgifter (get personal data) looks like.


Hmm hope you guys know how to fix this.. Please write it all simply. Im probably the no1 newbie in here.



Thanks in advance!!

Regards,
K

ps. Would be awesome if You (hope its not too much to request) could post what to add where etc. Since Im a total noob at this.. Thanks. Really appreciate the help!!!
kalender is offline   Reply With Quote
Old 03-10-2011, 09:41 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
This has nothing to do with PHP. If you can execute the PHP script with the proper input and receive the proper output, then there is no problem here. Doing it in the background is all client side.
Moving from PHP forum to AJAX forum.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:30 PM.


Advertisement
Log in to turn off these ads.