Jump to content

Fetch info without reloading page (when clicking submit button - AJAX?)


Recommended Posts

Hi,

Need some help here again.

 

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.

 

 

	<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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.