G
Guest
Using C# and JavaScript Framework 2.0
My users want to be able to start a search by clicking the enter key. Since
the page uses View control, I placed an onkeypress event on the table for
each view to check for keyCode 13. If it detects the enter key, then it calls
a JS function that does some validation and then calls the button click that
should have been fired for the active view. For example:
document.getElementById("ctl03_btnSmartSearch").click()
Everything works great. Both my OnClientClick and OnClick attributes for the
button appear to fire. On the postback though, all my values are gone. I cant
even Request them. But if I physically click the same button with the mouse,
all my values are there. Is there a view state or something I missing that
needs to occur when I call the click via JS verses using the mouse to click
the button?
help
My users want to be able to start a search by clicking the enter key. Since
the page uses View control, I placed an onkeypress event on the table for
each view to check for keyCode 13. If it detects the enter key, then it calls
a JS function that does some validation and then calls the button click that
should have been fired for the active view. For example:
document.getElementById("ctl03_btnSmartSearch").click()
Everything works great. Both my OnClientClick and OnClick attributes for the
button appear to fire. On the postback though, all my values are gone. I cant
even Request them. But if I physically click the same button with the mouse,
all my values are there. Is there a view state or something I missing that
needs to occur when I call the click via JS verses using the mouse to click
the button?
help