Professional Web Applications Themes

order table result without reloading - PHP Development

I've a page wich show the result of a query in a table. I want to provide a way to order the way the result are shown, something like: <table> <tr><td><a href="myself.php?order=\"price\">price</a></td>.... The problem is that for having the query fired, I've to provide "POST" values. How can I do so ??? <input type="hidden" value="<?php echo(ID);?>"> .... for passing the value I must use a form, but I can't create a link with <a href> that fires a form !!! How to do so ?...

  1. #1

    Default order table result without reloading

    I've a page wich show the result of a query in a table. I want to provide a
    way to order the way the result are shown, something like:

    <table>
    <tr><td><a href="myself.php?order=\"price\">price</a></td>....

    The problem is that for having the query fired, I've to provide "POST"
    values. How can I do so ???
    <input type="hidden" value="<?php echo(ID);?>">
    ....

    for passing the value I must use a form, but I can't create a link with <a
    href> that fires a form !!!

    How to do so ?


    Bob Bedford Guest

  2. #2

    Default Re: order table result without reloading

    <form method="post" name="orderform">
    <input type="hidden" name="ID" value="<?php echo(ID);?>">
    <input type="hidden" name="order" value="price">
    </form>

    <a href="javascript:doent.forms['orderform'].submit();">price</a>


    "Bob Bedford" <bedford1YouKnowWhatToDohotmail.com> wrote in message
    news:3ff941ce$0$718$5402220fnews.sunrise.ch...
    > I've a page wich show the result of a query in a table. I want to provide
    a
    > way to order the way the result are shown, something like:
    >
    > <table>
    > <tr><td><a href="myself.php?order=\"price\">price</a></td>....
    >
    > The problem is that for having the query fired, I've to provide "POST"
    > values. How can I do so ???
    > <input type="hidden" value="<?php echo(ID);?>">
    > ...
    >
    > for passing the value I must use a form, but I can't create a link with <a
    > href> that fires a form !!!
    >
    > How to do so ?
    >
    >

    Dmitry Ruban Guest

  3. #3

    Default Re: order table result without reloading

    Hi Dmitry,

    It's exactly what I want, ans thanks a lot for your help, but how to do if
    I've more than one choice?

    Here is my table (the actual code):



    "Dmitry Ruban" <dimaregion35.ru> a écrit dans le message de
    news:btbhl9$15vi$1gavrilo.mtu.ru...
    > <form method="post" name="orderform">
    > <input type="hidden" name="ID" value="<?php echo(ID);?>">
    > <input type="hidden" name="order" value="price">
    > </form>
    >
    > <a href="javascript:doent.forms['orderform'].submit();">price</a>
    >
    >
    > "Bob Bedford" <bedford1YouKnowWhatToDohotmail.com> wrote in message
    > news:3ff941ce$0$718$5402220fnews.sunrise.ch...
    > > I've a page wich show the result of a query in a table. I want to
    provide
    > a
    > > way to order the way the result are shown, something like:
    > >
    > > <table>
    > > <tr><td><a href="myself.php?order=\"price\">price</a></td>....
    > >
    > > The problem is that for having the query fired, I've to provide "POST"
    > > values. How can I do so ???
    > > <input type="hidden" value="<?php echo(ID);?>">
    > > ...
    > >
    > > for passing the value I must use a form, but I can't create a link with
    <a
    > > href> that fires a form !!!
    > >
    > > How to do so ?
    > >
    > >
    >
    >

    Bob Bedford Guest

  4. #4

    Default Re: order table result without reloading

    "Bob Bedford" <bedford1YouKnowWhatToDohotmail.com> wrote in message
    news:3ff96442$0$724$5402220fnews.sunrise.ch...
    > Hi Dmitry,
    >
    > It's exactly what I want, ans thanks a lot for your help, but how to do if
    > I've more than one choice?
    >
    <input type="hidden" name="order" value="price">
    <A HREF="javascript:order("price")">Price</A>

    <A HREF="javascript:order("desc")">Price</A>



    <SCRIPT>
    function order(item)
    {
    orderform.order.value = item;
    orderform.submit();
    }

    </SCRIPT>
    --
    Mike Bradley
    [url]http://www.gzentools.com[/url] -- free online php tools


    CountScubula Guest

  5. #5

    Default Re: order table result without reloading

    Dmitry Ruban wrote upsidedown:
    > <a href="javascript:doent.forms['orderform'].submit();">price</a>
    Will you please point me in the direction of the doent(s) that
    define the javascript URI scheme?

    --
    Jock
    John Dunlop Guest

Similar Threads

  1. Get result from temporary Oracle Table
    By Franck in forum ASP.NET Web Services
    Replies: 0
    Last Post: April 28th, 07:48 AM
  2. How to display result from two different table
    By vasu in forum ASP.NET Data Grid Control
    Replies: 2
    Last Post: November 24th, 08:19 PM
  3. Replies: 5
    Last Post: August 11th, 02:56 PM
  4. Expression result not entered in table
    By Kerman in forum Microsoft Access
    Replies: 1
    Last Post: July 22nd, 05:02 PM
  5. Result of Mysql Query in a PHP table
    By Felix in forum PHP Development
    Replies: 2
    Last Post: July 8th, 01:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139