J
|
Jane 4/9/2008 |
Hi, $str = " <select onchange=\"window.location.href=this.options[this.selectedIndex].value;\"> <option value=\"\">Please select</option> <option value=\"website1_list.php\">website1</option> <option value=\"website1_list.php\">website2</option> </select>"; echo $str; |
S
|
stevenf author 4/9/2008 |
Hi, you can do it using custom event (Insert PHP code snippet option on the Visual Editor tab). Here is a sample:
|
J
|
Jane 4/9/2008 |
Hi, global $conn; $strSQL = "select field1,field2 from tablename"; $rs = db_query($strSQL,$conn); $data = db_fetch_array($rs); echo $data["field1"]; echo $data["field2"];
<option value=\"website1_list.php?field1=".$data["field1"]."\">website1</option>
$strWhereClause = whereAdd($strWhereClause,"field1=".$_REQUEST["field1"]); |
S
|
stevenf author 4/9/2008 |
Hi, to select values from database use this code: Then add parameter to the url: and check it in the Before SQL query event:
|
S
|
stevenf author 4/10/2008 |
I'll give it a shot. thanks jane <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=27843&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
|
S
|
stevenf author 4/11/2008 |
Hi I need to add a listbox where I can populate a table... For example, I have a table called websites and I need to listbox populated with it. So the table has for example: website1 website2 etc.. On select, I need to pay to list all records where website (selected) = website on the table. Can this be done pls? Thanks
|
S
|
stevenf author 4/11/2008 |
I really need help on this one please <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=27867&image=1&table=forumreplies' class='bbc_emoticon' alt=':unsure:' /> |
J
|
Jane 4/11/2008 |
Hi, global $conn; $strSQL = "select field1,field2 from tablename"; $rs = db_query($strSQL,$conn); $data = db_fetch_array($rs); $str = " <select onchange=\"window.location.href=this.options[this.selectedIndex].value;\"> <option value=\"\">Please select</option> <option value=\"website1_list.php?field1=".$data["field1"]."\">field1</option> <option value=\"website2_list.php?field1=".$data["field2"]."\">field2</option> </select>"; echo $str; |
S
|
stevenf author 4/11/2008 |
Hi, add these samples to your code where you create dropdown:
|
J
|
Jane 4/11/2008 |
You can use this code in your custom event. |
S
|
stevenf author 4/11/2008 |
Hi Jane, |
S
|
stevenf author 4/11/2008 |
Here is the code: |
J
|
Jane 4/11/2008 |
Steven, |
S
|
stevenf author 4/11/2008 |
Steven, it's difficult to tell you what's happening without seeing actual files. Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error. I'll find what's wrong with your project inspecting it at Demo account site.
|