|
okButton.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
That's a hell of a lot of parentNode references. Far to many.
At what point does the script fail? What is the error message?
only two letters away from being an asset
|
|
|
|
|
Yes you are right-a lot of parentNode references. But I have 11 variables to populate, this is why 11 times this is written. I have taken only 1 parentNode, but this has given me undefined for the variables. [I have used alert(variables).]
The script is ok for IE. But using Mozilla Firefox. This gives above error on the same point "undefined". Hence, not populating variables and the DB. Either "parentNode" not accepting or I miss the syntax. Please help me to solve this problem.
|
|
|
|
|
MSinha wrote: I have taken only 1 parentNode
okButton.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
Well of course there is only one parentNode for each object. However, it looks like you 11 levels deep. At that point you should just go directly to the element you are trying to get to, document.getElementById();
MSinha wrote: [I have used alert(variables).]
How about debugging in a more professional manner, like using a debugger. Alert is not a diagnostic tool.
only two letters away from being an asset
|
|
|
|
|
var segmentId = document.getElementById(containingCell.sourceSegmentId);
Using above, I gets null for the variable segmentId both in in IE7 and Mozilla Firefox. The version for FF is:(Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11). Please help me.
|
|
|
|
|
We have an in-house, client side grid thingy, a fancied up HTML table built by a DataRepeater, and do our own ajax using the onblur events of the input controls in that table.
Now I'd like to replace that grid with a DataList, to get a detail view for editing more details provided in the grid view, but I would still like to retain my existing in-grid editing as is, without postbacks, or having to enter or exit edit mode. Is there any way to combine these two? Can I gloo on an onblur event to the controls rendered by the DataList and retain my current ajax channel?
|
|
|
|
|
Am extremely sorry for posting my same query again. Thing is, i dint hav any solution. so i've made myself clear by posting the entire code. Plz try to answer my query if time n patience permits. Both the code inside code1 and code2 are not working. seperately i've checked it out.
]]>;
<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="Server">;
;
function length()
{
if(document.all('txtMessage').value.length>10)
{
alert('Too many characters')
}
}
<%script type="text/javascript">;
function length()
{
var a = document.getElementById("TextBox1").value.length;
if (a >10)
{
alert("Too many characters");
}
}
<asp:textbox id="TextBox1" runat="server" style="z-index: 100; left: 324px; position: absolute;<br mode=" hold=" /"> top: 128px" TextMode="MultiLine">
;
<asp:button id="Button1" runat="server" style="z-index: 102; left: 381px; position: absolute;<br mode=" hold=" /"> top: 210px" OnClientClick="length()"; Text="Button" >;
;
The most difficult phase of life is not when no one understands you ; It is when you don’t understand yourself.
|
|
|
|
|
Raam check first your javascript function is properly get called
comment out every thing and just put alert check are you getting the alert?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hi,
Firstly, I would suggest you rename your function as length is a DOM keyword. The below should work fine:
<script type="text/javascript"><br />
<!--<br />
function checkLength()<br />
{<br />
var a = document.getElementById("TextBox1").value.length;<br />
<br />
if (a > 10)<br />
alert("Too many characters");<br />
}<br />
</script><br />
Clean code is the key to happiness.
|
|
|
|
|
If you are using the Master Page then the id you are providing in the javascript function is wrong check the source code for the id
or you should provide be like this
document.getElementById(<%#TextBox1.ClientId%>).value.length;
as the id will be different
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
modified on Wednesday, January 30, 2008 10:27:58 AM
|
|
|
|
|
i have a gridview with two drop down lists. The first dropdown list filters the gridview perfectly the second doesn't filter at all.
Here is my sqldatasource info:
<br />
SelectCommand="SELECT * FROM [datatable] WHERE ([afield] = @afield) OR ([bfield] = @bfield) "><br />
<br />
SelectParameters<br />
ControlParameter ControlID="DropDownList1" Name="afield" PropertyName="SelectedValue" Type="String" /><br />
ControlParameter ControlID="DropDownList2" Name="bfield" PropertyName="SelectedValue" Type="String" /><br />
SelectParameters><br />
<br />
Dropdown lists:<br />
<br />
<asp:dropdownlist id="DropDownList1" runat="server" autopostback="True"><br />
<asp:listitem>Select an item</asp:listitem><br />
<asp:listitem>A</asp:listitem><br />
<asp:listitem>B</asp:listitem> <br />
</asp:dropdownlist><br /><br /><br />
<br />
<asp:dropdownlist id="DropDownList2" runat="server" autopostback="True"><br />
<asp:listitem>Select an item</asp:listitem><br />
<asp:listitem>Closed</asp:listitem><br />
<asp:listitem>Open</asp:listitem><br />
</asp:dropdownlist><br />
<br />
<br />
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load<br />
If DropDownList1.SelectedIndex.Equals(0) Then<br />
datatable.SelectCommand = ("SELECT * FROM [table]")<br />
GridView1.DataBind()<br />
<br />
End If<br />
<br />
End Sub
|
|
|
|
|
1st of all i have a project size approximatly less then 50.0 MB.
Build in VS2003 in ASP.Net / C#.
I m bored with the 1.1 environment and speed to work with it.
So I would like to convert the whole application to Framework 2.0, so i can work out it in VS2005
So which and what things sholud i keep in mind while converting.
What are the steps and how to make a complete Conversion?
Is it safe to do so? Or is it possible(Succesfully? )
Please show me the way...
Believe Yourself™ :->™
|
|
|
|
|
Ya you can convert it into 2.0 but there are many changes that you need to make which also depends on your requirement
Like Partial class,Master page,
There are many things if you really wany to take benefit of 2.0 you will have to work out for these things first then start converting page by page
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I have an experience in project that change 1.1 to 2.0
Yes, you need to know what the impact from new feature in framework 2.0
But you also need to know which classes that is gone in framework 2.0 because some dudes at microsoft change its name. if you have classes that have the same name with these classes, well, you will have the filling want to shot everyone like i did during in the process of changing their names, but if you layering your project (UI layer, business layer, data layer), this will not (too) concern you as well as i did while i was in the project.
you also have to replace some control that no longer recommended in vs 2005, like datagrid (gridview in 2005), or some object, like arraylist (collection in 2005).
as i'm always joke with my friend in project, it's not hard to convert from 1.1 to 2.0, the bug fixing that makes it so *** damned hard...
but i encourage you to try, you will get a good experience and small bump in your head cause you'll be banging your head to monitor...
i hope you'll try to convert it...
happy bugs fixing friend
|
|
|
|
|
Hi
I need to know who is viewing an ASP.Net page without the user knowing it. I can get the client IP address and host name(sometimes) but would like to get the username of the person logged in or any other info that identifies the person.
I know that this is possible if I am using Windows authentication or forms based authentication but I am using no authentication with anonymous access.
Any ideas on how to get this info without asking the person to log in?
Thanks
There are 10 types of people in the world, those who understand binary and those who dont.
|
|
|
|
|
Hi fellas.
I am a newbie with ASP.NET, I need to write a site with C#,
I am thinking of allowing users to customize their site with CSS.
However I want the users to be able to choose the colors via a palette. Is there even such as feature in VS.NET 2003? I really don't want the users to manually type in the hex colors themselves.
Any helpful links and resources?
Many many thanks!!!
|
|
|
|
|
Please Explain in brief...
I think u want to create a Control which has the color paletts embbeded in it?Is is that?
If that is not then u can go for color Picker and Rad Controls also can be useful.
Believe Yourself™ :->™
|
|
|
|
|
Hi, thanks for your reply.
I am just looking for something which allows the user to select the color they want.
I just want to pop up a little box, with many colors for the users to select. (Something like MSPaint)
Is there such a control in VS.net 2003? Thanks
|
|
|
|
|
I didn't forget to add the <%@page%>
Shimi
|
|
|
|
|
Did you forget to ask a question?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
pmarfleet (Paul Marfleet)
wrote: Did you forget to ask a question?
my question is in the title
Shimi
|
|
|
|
|
Shimi Weitzhandler wrote: my question is in the title
It should be in the body of the post.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
"when I change the file extension from html to aspx all the javascripts that are supposedn to design the page with XSL and HTC doesn't work."
next time I'll use the title textbox for a brief message and write the quetion in the body
now, could you please pay attention to my problem
Shimi
|
|
|
|
|
You can't just change a file extension and expect it to work... That's how the server knows how to serve your page.
|
|
|
|
|
Paddy Boyd wrote: You can't just change a file extension and expect it to work...
why?
usually, when I change the extension to .aspx, I just have to add the <%@page%> tag
and it works.
when the 's property 'language' is set to javascript the server automatically knows that it's client code.
only in this case I'm in now it does not work.
<div class="ForumSig">Shimi</div>
|
|
|
|
|
Sorry, read that wrong, thought you were changing from aspx to html. Can you debug it at all?
|
|
|
|