oulan / iui

Automatically exported from code.google.com/p/iui
MIT License
0 stars 0 forks source link

Dynamique update the contents of the page with ASP.net #244

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello, i recently use the iui framework and it looks cool.

In the tag "li" which is clickable, i want to change the content before 
the animation of slide: when i click one "li" in a "ul", i want to get the 
data from SQL Server, then show it in the screen, i want to remain the 
slide animation, so i can only change dynamiquely the content of the html.

I can add a onclick event on "li" or "ul", but onclick just work in 
javascript which is client-side, now i want to get the data from the sql 
server, i have to idea how to do it? Anyone can help me? thanks

Original issue reported on code.google.com by iyurn...@gmail.com on 4 May 2010 at 1:59

GoogleCodeExporter commented 9 years ago
hi,

well, i'm a beginner too, but here's how i proceed:

index.html:
<html>
...
<body>
<div class="toolbar">
        <h1 id="pageTitle"></h1>
        <a id="backButton" class="button" href="#"></a>
    </div>
    <div id="myliste" title="MyListe" selected="true">
...
<li><a href="data.php" target="_self">my liste item</a></li>
...
</div>
...
</body>
</html>

data.php:
<html>
...
<body>
<div class="toolbar">
        <h1 id="pageTitle"></h1>
        <a id="backButton" class="button" href="#"></a>
    </div>
    <div id="mycode" title="Mycode" selected="true">
<?php
 my code
?>
</div>
...
</body>
</html>

make sure you put all your code inside the div with the id=mycode (which you can
modify, it's just for exemple)
any variable definition or file include outside the layer won't be considered 
(don't
know why, it happened to me ;-) )

good luck.

Original comment by slak.bou...@gmail.com on 18 May 2010 at 12:44

GoogleCodeExporter commented 9 years ago
oups, sorry, i give an exemple with php code. did'nt see you use Asp.net :-)

but it's the same principle i think

Original comment by slak.bou...@gmail.com on 18 May 2010 at 1:00

GoogleCodeExporter commented 9 years ago
Thanks for your help, slak.bouchra. I have figured it out last week.

Original comment by iyurn...@gmail.com on 18 May 2010 at 7:03

GoogleCodeExporter commented 9 years ago
Doesn't sound like this was a bug.

Original comment by msgilli...@gmail.com on 24 Jan 2012 at 7:20