Hey,

thats easy. First of all you do not need a form and no page reload - thats
why you are using javascript - right? :)

Im not the javascript guru but try this:

<body>

<a class="whiteButton" type="submit" onclick="addSomething();"
href="#home">Add Something</a>
<ul id="home">
<li>
Test
</li>
</ul>
<script language="javascript">
function addSomething()
{
    var elem = document.createElement("test");
    elem.innerHTML = "<li>New Element</li>";
    document.getElementById("home").appendChild(elem);
}
</script>
</body>

Hope it works for you!
K.

2009/6/22 phx <[email protected]>

>
> Hey Group,
>
> my problem is that i have a form with data and i want to update the
> #home list.
> But how to do this?
>
> I have a POST form with:
> <a class="whiteButton" type="submit" onclick="addSomething();"
> href="#home">Add Something</a>
>
> to submit it.
>
> But if pressed i only get a empty page only with the header.
>
> <a class="whiteButton" type="submit" onclick="addSomething();
> window.location.reload();" href="#home">Add Something</a>
>
> Works for me, but seems not to be a beautiful solution?
>
> Please point me to the right direction.
>
> Thanks!
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to