0

Hi,

I want to create list of items on my header to which if selected sends that value to my Div class where my search code is there as input to it.

I have seen href works for pointing to.php with id value as parameter. but what is syntax for pointing to div class with parameter value.

my href would look like this but this doesn't work: 
<a href=#hovergallery?var="furniture">furniture</a>

my div class is:
<div class="hovergallery" id="hovergallery">
    <?php

                        include('connection.php');
                        $ecategory_search=$_GET['id'];
....

Kindly send me href syntax for it.

Regards,
Ankit

4
Contributors
9
Replies
29
Views
2 Years
Discussion Span
Last Post by pixelsoul
0

You'll need Javascript/jQuery to achieve what you need IMO. Am I right, that if you click the link you want to prefill a textbox with "furniture"?

0

list would be displayed like : furniture cosmetics interior

if user cicks on furniture in backend code this selection goes as input to my search query and it displays picture of furniture shops. it will dsplay images at bottom of page where my DIV is placed.
I was able to do same with dropdown menu bar but I thought displaying list on top would be easier for my user than drop down.

0

href: is it not possible to use reference to DIV as well as pass variable through it?

0

if I use this syntax it gives me error saying no access on your server
Syntax:
<a href=\"#_hovergallery?id=Furniture\">Furniture</a></p>

output:
http://localhost/%22#_hovergallery?id=Furniture\"

Forbidden
You don't have permission to access /" on this server.

If I user this syntax
<a href="#hovergallery?id=Furniture\">Furniture</a></p>
it goes to no where

Edited by ankit.baphna

0

href: is it not possible to use reference to DIV as well as pass variable through it?

Not possible. A DIV is a HTML block and cannot accept parameters like a script can. You'll need to use Javascript/jQuery/AJAX.

0

thanks,
I am not very familiar with javascripts can someone give code for it.

0

but if I pass value through drop down selection within form action then DIV is receiving value and able to run my search query.
so why is that through href its not possible. drop down and href both are html syntax.

0

You can bind an ajax call on the selector of your choice with the event of your choice. Using jQuery helps stream line the code for making a call with AJAX to your script that runs the query, then returns the results back to the page, in the div, table, whatever you choose.

You're going to have to do a little reading and experimenting to get started.

http://api.jquery.com/jquery.ajax/

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.