|
if you want random numbers more than a single number then you can use:
var test:Number;
var str:String;
str = '';
// Loop for the count of the string that how long you want random number(i.e. 01234 or 98765 etc)
for(i = 0; i < 5; i++)
{
test = random(9); //will reurn random from 0 to 9
str += test.toString();
}
trace("Number String = " + str);
--------------------------------------------------------------------------------------------------
Hiral Shah
India
If you think that my answer is good enough and can be helpful for other then don't forget to vote.
|
|
|
|
|
|
I have a GridView that contains a few Template Columns. In one of my Template Columns I have a Button and a TextBox. When the user Clicks the button, I want to place a value into the TextBox next to it. In order to do that, I figured I could get the RowIndex of the GridView row containing the clicked Button. Then I could find the particular TextBox Control in that row and fill that TextBox with the value I wish.
How can I get the RowIndex from a GridView when a user Clicks a Button within in….on the Server Side.
Any help would be appreciated! Thanks
|
|
|
|
|
Try this
Protected Sub dgAdminList_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles dgAdminList.RowUpdating
Dim txtUserName As TextBox
txtUserName = dgAdminList.Rows(e.RowIndex).FindControl("txtAdminUName")
txtUserName.text = "Your Value"
End sub
|
|
|
|
|
Hi
I need one help from you,
We are using webdav method,
When reply a one mail, How to set the conversationIndex Property
through webdav method.
because we want track the conversation Mails thread,
Which property is to identify the thread mails
I saw some forums conversationindex property is used to identify the thread mails ( differ 5 character at end of every mail)
But when we use webdav method, the conversationIndex property is confusing .
What is the way to identify Thread Mails
How to identify first Mail of the Thread?
Any body please send reply me.
Arunkumar
|
|
|
|
|
The problem exists in IE6 where a button click event will trigger to open a window using "window.open..." where it pops up HTML pages but does not open up documents such as word.
Example:
Intended usage: The "window.open" should open a page where it will load a word document.
Current behaviour : It does not pop up as if a pop blocker has blocked from opening it.
Additional info: I'm using iframes.
Question : How can I open up the document. Can I avoid pop up blockers or trusted site credentials that block such activity etc.
I would apperciate if I could get an answer for this.
Thanks
|
|
|
|
|
A possible way around this would be to not use window.open, but rather use a link that has a target of _blank to open a new window for your document.
|
|
|
|
|
I guess I should try "Content-disposition: Attachment" something like that which force a "Save As" sort of a scenario. I can't use a link since it is in a menu item. So when I click the menu, it will fetch the relevant document.
|
|
|
|
|
Menus don't have links? Sh*t all these years... why didn't someone tell me??
Brad
Australian
- Bradml on "The ADOTD"
Hey all, did you just use/read an acronym? Pots it HERE, at the ADOTD[^]
|
|
|
|
|
A quick and drrrty way around this problem is to use a floating div containing an iFrame as your "popup"....gets round blockers, cos it's not actually a window.
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
I have modal window that is displayed with a initial set of data in a GridView. The user enters Filter Criteria into TextBoxs and presses a Filter button. I use some AJAX to query the DB. When I get the response I Programmatically remove all the rows of the GridView, then repopulate them with the return XML formatted data. That part works fine.
What I would like to do is add a OnClick event to each Row after I have rebuilt the GridView with data. I used the code below to loop through rows of the rebuilt GridView HTML. When the line "row.OnClick = RowAction('gv_BaseUOMLookUp', this, 'OnClick');" is encountered then the loop just stops. When I comment the line out the loop runs. I have no clue what to do now. It is almost as if the event is fired whn the function is added and that ends the loop???
Anyone please help. Thanks for your time
////////// CODE BELOW ///////////////////////////
function AddRowAction(GvName)
{ //alert("AddRowAction")
var tbl = window.document.getElementById(GvName);
var rows = tbl.getElementsByTagName('tr');
for(var i = 0; i < rows.length; i++)
{ alert(i)
var row = rows[i];
row.OnClick = RowAction('gv_BaseUOMLookUp', this, 'OnClick');
}
}
|
|
|
|
|
Does TR even have an onclick event?
What's the specific javascript error you're getting on that line? You can check with Firefox/Firebug extension or IE and click on the error icon at the bottom left of the status bar.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Yes, I have added a OnClick event to a Table Row during the RowCreated event of a GridView. The resulting HTML is below:
I am not receiving a runtime error at all actually. As I am looping through the Tables rows using DOM, I am attempting to add that event to the row. The Table most often has about 100 records or so. In a attempt to debug the issue, I looped through each row, with Javascript & DOM, simply to make sure I was iterating through the Table rows. That worked with no issue…no errors. Once I confirmed that I could do that, I then altered the code within the loop to add the OnClick event to each row I iterate through. Once the loop begins, it hits that new code and the loop terminates. The loop no longer iterates through all the rows. No error message comes as a result.
|
|
|
|
|
michaelastewartmas wrote: RowAction('gv_BaseUOMLookUp', this, 'OnClick');
This is where your problem lies...
The OnClick MEMBER of the DOM tr element, is a function pointer. What you're doing with the line above, is setting the value to the RETURN of RowAction...think if instead of RowAction, you'd written AddTwoNumbers(1, 2)...you'd expect the return value to be 3, and because of the assignment operator, the onclick member's value will of course be 3
To do what you want, either a)remove the parameters from the assignment - essentially then uses a memory address, or b) code something akin to the following:
<br />
row.OnClick = new function () {.........}<br />
Hope that helps...
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Great....I will give that a try. I think I understand what you are saying. Thanks for your time!
|
|
|
|
|
In a nutshell, I'm trying to find a way to embed binary data in my page without using an iframe. Here's a more detailed breakdown:
I have two content panels alongside each other. The first contains a dynamic menu structure allowing users to select a category which contains various reports. The second is a display area for the selected report. The reports themselves are in .pdf format, so up until now I've been using an iframe to display them as it's the easiest way to embed binary data.
Now suddenly three more tiers have been added to the menu, so that it extends across to the iframe. As I understand things, thanks to various limitations as soon as binary data is displayed in an iframe, the iframe itself automatically becomes the top level item in the z-index, so of course the menu is extending behind the displayed pdf.
I need some kind of workaround to ensure my menu will extend over the top of the pdf instead of behind it. Any thoughts or ideas on the subject would be greatly appreciated.
|
|
|
|
|
First of all I’m sorry if its not the right forum to ask this type of question, although seems most appropriate to me don’t wanna break any rules though. Anyway, someone approached me and asked to do web project for his business, before I give them answer however I thought it would be good to ask here as this board seems to have lots of knowledgeable posters. Very brief project description is little bit below but first I few questions:
1. knowing what is described below how long it should take to develop it?
2. How much in US$ would it cost?
3. The best approach, technologies asp .net? php or maybe servlets or something else?
4. What else shall I know before giving a quote and timeframe if its not possible at the moment?
5. anything else? contract maybe or sth?
At the moment I know this is for online catalogue for existing customers I also know they need...
User Registration – Login
Bulk upload and editing system
Order export facility: EXCEL
Category: Subcategory: Product
Product Search
Sales reporting
Promotional Codes
Site Map
Enquiry form
Manage back office
Admin Module
That’s all we know at the moment, thank you all for your help which is very much appreciated.
|
|
|
|
|
That's a very limited view of the project. If that s all you know then you can't really make a call on the price. Also you may not be a very good coder or you might be an excellent coder, this all make huge impacts.
I would use PHP though.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
is there anything specific I should ask you reckon? I guess it would be plenty but couuld you give me an idea please? thx
|
|
|
|
|
|
You can't work out what to charge until you know the client requirements in more depth. I would suggest that you find out the requirements in more depth - and only then can you work out how long this is likely to take you.
I'm going to upset Brad here suggest that you look at ASP.NET (version 2). You do get Membership and Role management by default with .NET 2, so your user management is taken care of for you pretty much out of the box. You also get the Site Map functionality out of this as well.
More importantly though, you need to find out what the client infrastructure is - if they want to host it on *nix servers, then you really should look at something like PHP or Ruby.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O'Hanlon wrote: Ruby
You disgust me
Brad
Australian
- unknown PHP Developer on "Job Prospect"
Requirement: * Experience working with XML, XSL, XPath
Comment: and other things starting with X.
|
|
|
|
|
Bradml wrote: Pete O'Hanlon wrote:
Ruby
You disgust me
Why? Ruby is the daughter of one of my best friends, and she's a cute little poppet.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thnx everyone, great tips, luckily I am not alone on this project and have a backup of experienced programmer but it was good to ask here anyway. Thank you again I really appreciate your help
|
|
|
|
|
Hi, I know it is a bit late,
I have worked on similar projects. So I could give you some clarity on what to do.
If these guys didnt give you the full spec, there is no use in making a price becuse you cannot estimate using the project scope (cost, time, quality).
And this will ultimately dig your own grave as late specification will happen , resulting in you coding for months and these guys smiling all the way to the bank.
Rather tell them you will work at a hourly rate, and document what you did in your time, if you spend 1:30 hours coding the login registration write it down, also show them these time allocation papers, and work on a payment on delivery terms, my first contract programming I did during colledge screwed me over big time, it was filled with late spec and resulted in me having to finish a collosal website for a small price , the time they gave me was a month but they only had the content and layout ready for me at week 3.
Remember engineers have a saying : 1.You can have it done fast, 2.you can have it done right, 3.you can have it done cheap, you can only choos 2 of the 3.
Le Roux Viljoen
Web Developer
PCW New Media
South African Branch
www.pcwnewmedia.com
|
|
|
|