try to update this
<form onsubmit="return false" id="frm">
On Feb 17, 2009 10:04am, HK <
harlan...@gmail.com> wrote:
> Thanks. That helped me out quite a bit.
>
> Now I'm having a problem where Firefox 3.x is always showing a blank error message when I submit the search.
>
>
> On Mon, Feb 16, 2009 at 9:19 PM, Michal Gabrukiewicz
mga...@gmail.com> wrote:
>
>
> Hi Harlan,
>
> I would recomment having a quick read through
http://www.ajaxed.org/articles/Getting-Started/ .. this helps you to get ajaxed running ..
>
>
>
>
>
> for your specific problem you would ideally use pageparts ... (check page part section in
http://www.ajaxed.org/article/AJAX/11/)
>
> just name your function Function pagePart_fGetHTMLData() and remove its argument (you will be able to access the argument through POST variables)..
>
>
>
>
> after that you will able to call it from client side ...
>
> basically your solution would look like this
>
> >
>
>
> set page = new AjaxedPage
> page.defaultStructure = true
> page.draw()
>
> sub main() %>
>
>
>
>
>
> button type="button" onclick="ajaxed.callback('fGetHTMLData', 'content')">content 1button>
>
>
>
>
>
> div id="content">div>
>
>
>
> end sub
>
> sub pagePart_fGetHTMLData()
>
>
>
> Dim con, rst, sSQL, sSQLWhere, s
>
> Set con = Server.CreateObject("ADODB.Connection")
>
>
>
> con.open Session("sMainDBConString")
>
>
> sSQLWhere = " WHERE itemname like '%" & page.RF("q") & "'%"
>
>
> sSQL = "SELECT * FROM tblInventory" & sSQLWhere
>
>
> Set rst = Server.CreateObject("ADODB.Recordset")
>
>
> rst.open sSQL, con, 1, 3
>
>
>
>
>
> If rst.EOF = False or rst.BOF = False Then
>
>
> s = "
> "
>
>
> s = s & "Item"
>
>
>
>
>
> rst.MoveFirst
>
>
> While not rst.EOF
>
>
> s = s & ""
>
>
> s = s & "" & rst.Fields("ItemName").value & "
>
> td>"
>
>
>
>
>
> rst.MoveNext
>
>
> Wend
>
>
>
>
>
> s = s & ""
>
>
> Else
>
>
> s = "No Data Found"
>
>
> End If
>
>
>
>
>
>
> response.write(s)
>
> end sub
> %>
>
>
> On Tue, Feb 17, 2009 at 6:32 AM, HK
Harlan...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>
> I have a basic HTML page (no ASP or VBScript yet) with a form. The
>
>
> form has one text box that takes a single search term. There is also a
>
>
> submit button.
>
>
>
>
>
> Now I want the submit button to call a server-side function that looks
>
>
> something like this and display the HTML that gets returned:
>
>
>
>
>
>
>
>
> Function fGetHTMLData(sSearch)
>
>
>
>
>
> Dim con, rst, sSQL, sSQLWhere, s
>
>
> Set con = Server.CreateObject("ADODB.Connection")
>
>
> con.open Session("sMainDBConString")
>
>
> sSQLWhere = " WHERE itemname like '%" & sSearch & "'%"
>
>
> sSQL = "SELECT * FROM tblInventory" & sSQLWhere
>
>
> Set rst = Server.CreateObject("ADODB.Recordset")
>
>
> rst.open sSQL, con, 1, 3
>
>
>
>
>
> If rst.EOF = False or rst.BOF = False Then
>
>
> s = "
> "
>
>
> s = s & "Item"
>
>
>
>
>
> rst.MoveFirst
>
>
> While not rst.EOF
>
>
> s = s & ""
>
>
> s = s & "" & rst.Fields("ItemName").value & "
>
> td>"
>
>
>
>
>
> rst.MoveNext
>
>
> Wend
>
>
>
>
>
> s = s & ""
>
>