Showing posts with label drop. Show all posts
Showing posts with label drop. Show all posts

Thursday, March 22, 2012

calling javascript on OnSelectedIndexChanged of a drop downlistbox

I have a dropdownlist and a text box.

Once i select the item on a dropdownlist, the control should skip to text box.

Here is the code and i get the error.

'onFocus' is not a member of 'ASP.test_aspx'.

can u plz help me out.

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title>Untitled Page</title>

<scriptlanguage="javascript">

function onFocus()

{

var control = document.getElementById("TextBox1");

if( control != null ) control.focus();

}

</script>

</head>

<body>

<formid="form1"runat="server">

<div>

<asp:DropDownListID="DropDownList1"runat="server"Width="161px"OnSelectedIndexChanged="onFocus()">

<asp:ListItem>Javed</asp:ListItem>

<asp:ListItem>Abid</asp:ListItem>

<asp:ListItem>sajid</asp:ListItem>

<asp:ListItem></asp:ListItem>

</asp:DropDownList>

<asp:TextBoxID="TextBox1"runat="server"></asp:TextBox></div>

</form>

</body>

</html>

The reason you are getting this type of error is because you try to associate (link) JS function with ASP event. when you declare event such as OnSelectedIndexChanged ASP searchs the code behind or C#/VB section for a handler to invoke once this event fires.

A very simple way to diffrentiate between HTML DOM events and ASP events is the case. Note that ASP is always MixCase.

sql

Friday, February 24, 2012

Calendar is only one.

How can I drop the same calendar dimention as filter AND columns?Can you explain in more detail what the report should look like? With the support for attribute hierarchies in AS 2005, you could drop different attributes as column and filter.

Calendar in parameter drop down

Hi all
Is it possiable to have a calendar drop down in a date parameter field? I
am not a programmer so be kind. This would be much easier for users than
typing in a date.
thanksThis, for me, was one of the more shocking revelations when I started
to use RS, but the answer is "no". It's pretty amazing to me that for
a tool that has so much promise, some very fundamental things like
this are lacking. In addition to the calendar control, another one
that we needed but couldn't use is a simple checkbox for a boolean.
And going a small step further, it is also surprising to realize that
you can't easily save the parameters a user enters so that they'll be
there for next time.
Still, hopefully these features are coming soon! :-)
Brad.
On Thu, 2 Sep 2004 10:44:39 -0700, "darwin" <dguillory @.
goodwillaz.org> wrote:
>Hi all
>Is it possiable to have a calendar drop down in a date parameter field? I
>am not a programmer so be kind. This would be much easier for users than
>typing in a date.
>thanks
>|||I think there us a work around for the problem of saving
user's input.
Write your own component which has functions that can take
in user's parameters as input and write code to save those
values in the database. Add a reference to this component
in your report and call the specific function to save
user's input.
Alternatively just write an SP which takes in these
parameters and write them into a table.
About the other points , even I would like to see those
features.
>--Original Message--
>This, for me, was one of the more shocking revelations
when I started
>to use RS, but the answer is "no". It's pretty amazing
to me that for
>a tool that has so much promise, some very fundamental
things like
>this are lacking. In addition to the calendar control,
another one
>that we needed but couldn't use is a simple checkbox for
a boolean.
>And going a small step further, it is also surprising to
realize that
>you can't easily save the parameters a user enters so
that they'll be
>there for next time.
>Still, hopefully these features are coming soon! :-)
>Brad.
>On Thu, 2 Sep 2004 10:44:39 -0700, "darwin" <dguillory @.
>goodwillaz.org> wrote:
>>Hi all
>>Is it possiable to have a calendar drop down in a date
parameter field? I
>>am not a programmer so be kind. This would be much
easier for users than
>>typing in a date.
>>thanks
>.
>