Welcome Guest, Not a member yet? Register   Sign In
CI/jQuery
#1

[eluser]beasten[/eluser]
Hi all,

Im new here and at CodeIgniter. Im doin a little project and ran into som problems. Donno if this question is OK with you, it contains a little bit of jQuery too.

I have a jQuery list (not really important if its jQ or not..) with "expenses", when I click one of my expenses theres a little dropdown-form (jQuery) with the values of my expense. (Its an economy project)

My question is how do I get the value from my expense to be filled in to my form so that I can edit the expense? Ive tried the urisegment, tho I dont get it to work. Code Below.

Thank you, Beasten

Code:
<div id="top10">
                <ul>
                    &lt;?
                    $this->load->database();
                    $user_id = $this->session->userdata('USERID');
                    $query = mysql_query("SELECT * FROM EXPENSES WHERE USERID =     $user_id ORDER BY DATE DESC LIMIT 10");
                        while ($result = mysql_fetch_array($query)) {
                            echo ("<li><a href='$result[0]/#editField'>$result[2]
                                  $result[3],-</a></li>");
                        }
                    ?&gt;
                </ul>
            </div>
          
            <div id="editField">
            &lt;form&gt;
              
                &lt;input name="edit" type="text" value="&lt;? echo $this-&gt;uri->segment(4); ?&gt;">
                &lt;input type="submit" value="Change"&gt;
            &lt;/form&gt;
            </div>


Messages In This Thread
CI/jQuery - by El Forum - 05-22-2009, 01:45 AM
CI/jQuery - by El Forum - 05-22-2009, 02:09 AM
CI/jQuery - by El Forum - 05-22-2009, 02:13 AM
CI/jQuery - by El Forum - 05-22-2009, 02:31 AM
CI/jQuery - by El Forum - 05-22-2009, 02:58 AM
CI/jQuery - by El Forum - 05-22-2009, 03:04 AM
CI/jQuery - by El Forum - 05-22-2009, 03:51 AM
CI/jQuery - by El Forum - 05-22-2009, 05:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB