SitePoint Sponsor |
|
User Tag List
Results 1 to 8 of 8
Thread: drop down search
-
Jul 1, 2007, 09:48 #1
- Join Date
- Aug 2004
- Location
- India
- Posts
- 94
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
drop down search
I tried to make a drop down search as its here in the left side
http://www.indianartcollectors.com/v...s.php?arid=818
my trial is here:
http://www.jalsaghar.com/test.php
but it's not working... can anyone suggest what's wrong?
-
Jul 1, 2007, 10:11 #2
Any relevant php code?
Saul
-
Jul 1, 2007, 10:54 #3
- Join Date
- Aug 2004
- Location
- India
- Posts
- 94
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
whatever i have done can be seen in the Source Code of browser ..... nothing much in php .......
-
Jul 1, 2007, 11:05 #4
Then what is wrong with it?
Saul
-
Jul 1, 2007, 11:13 #5
- Join Date
- Aug 2004
- Location
- India
- Posts
- 94
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
on submitting I m trying to call function displayArtist()
which I have written inside HEAD
<SCRIPT>
function displayArtist()
{
<?php
echo("1234");
?>
}
</SCRIPT>
but it seems to be not calling the function......
here's the complete code:
PHP Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>
Jalsaghar: Artist and their Works
</title>
<SCRIPT>
function displayArtist()
{
<?php
echo("1234");
?>
}
</SCRIPT>
</head>
<body>
<?php
$sql = $db_object->query("Select distinct artistid from image");
echo("<form name=\"frmSearch\" action=\"\" method=\"POST\" enctype=\"multipart/form-data\" onsubmit=\"javascript:displayArtist();\">");
echo("<select name=\"vchArtist\">");
while($row = $sql->fetchRow())
{
$ArtistId = $row["artistid"];
echo("<option value=\"$ArtistId\">$ArtistId</option>");
}
echo("</select>");
echo("<input type=\"submit\" name=\"submit\" value=\"Submit\">");
echo("</form>");
?>
</body>
</html>
-
Jul 1, 2007, 11:19 #6
Look at the source, you've got:
Code:function displayArtist() { 1234 }
Saul
-
Jul 5, 2007, 10:38 #7
- Join Date
- Aug 2004
- Location
- India
- Posts
- 94
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
-
Jul 5, 2007, 12:09 #8
Try this article: http://www.sitepoint.com/article/bui...-ajax-web-apps
Saul
Bookmarks