Javascript - ExtJS - Creating Hyperlinks With A Function?

Dec 16, 2010

I'm trying to build an edit column, but my routine isn't quite right for some reason. My value of "store" is not returning anything like I thought it would.

function editLinkRenderer(value, metadata, record, rowIndex, colIndex, store) {
if (store == V2020.ServiceStore)
return '<a href="javascript:editServices(' + value + ')">Edit</a>';
else if (store == V2020.PriceStore)
return '<a href="javascript:editPrice(' + value + ')">Edit</a>';
else if (store == V2020.PromoStore)
return '<a href="javascript:editPromo(' + value + ')">Edit</a>';
return "Edit";
}

I'm using it in my gridpanel like so:

{ header: "Edit", width: 60, dataIndex: 'serviceID', sortable: false, renderer: editLinkRenderer },

View 2 Replies


Similar Messages:

Javascript - ExtJS - Getting ID Of Record That Was Just Saved?

Dec 13, 2010

I need to save some data and return the ID that is created in the SQL 2005 database. I need the ID to pass to another object before saving that so I can associate them correctly.

What is the best way to accomplish this with Ext? Is there anything built into the Framework that makes this simple?

function AddPromotionType() {
var currentDate = new Date();
var newTypeJsonObject = {
promotionTypeId: '0',
promotionType: Ext.getCmp('txtPromoType').getValue(),
updatedBy: userid,

[Code]....

View 1 Replies

Javascript - Accessing Value From ExtJS Radio Button?

Sep 22, 2010

So I declare an ExtJS radio button object like this:

.AddExtObject("{xtype:'radiogroup', ref:'../AndOr', defaults:{name:'rdo-payee2'}, width:120, items:[{boxLabel:'And', checked:true, inputValue:'and'},{boxLabel:'Or', inputValue:'or'}]}")

When I do this:

if (checkWin.Payee2.AndOr.getValue() == 'and') {
fundingRec.set('IsPayee2RequiredToSign', '1');
} else {

[code]...

View 1 Replies

Javascript - ExtJS Combobox Sometimes Hides Behind Window Greyed Out?

Sep 27, 2010

So the code below is called when a user selects Save on an ExtJS popup modal window. This window ONLY contains a combobox. Now, sometimes when a user saves this, and then re-opens it later on, the combobox will appear BEHIND the window all grayed out, unable to get to. Other times, it will be fine and work, and no difference in events happening either time, just complete utter inconsistency.Does anyone know what this could be?

var changeProductOK = function() {
var win = getChangeProductWindow();
if (win.subProductId.getValue() == '') {

[code]...

View 1 Replies

Web Forms :: Creating Unique Details Pages From Databound Hyperlinks?

Mar 15, 2011

I'm currently making a site that is supposed to generate search results from a separate assembly, with a gridview that has links to each robot. The links from the gridview are supposed to link to a unique robot details page, as well as display another gridview to all related robots from the set, like this:

[IMG]http://www.sawauto.com/uploader/up/2011-03-14_132416.jpg[/IMG]

how to display unique detail pages. So far, I only have a details page template, but I'm trying to figure out how I can display the data dynamically, depending on which robot was selected from the main search.

Here are my Default.aspx and Details.aspx mark-ups so far:

Default Pastebin
Details Pastebin

And the resulting Default and Details pages:

[IMG]http://www.sawauto.com/uploader/up/2011-03-14_133933.jpg[/IMG]
[IMG]http://www.sawauto.com/uploader/up/2011-03-14_133107.jpg[/IMG]

View 1 Replies

Web Forms :: Getting Error Calling Javascript Function From Another Javascript Function

Jan 3, 2011

Getting error calling Javsscript function from another Javascript function

[Code]....

View 4 Replies

Call Javascript Function And Server Side Function From Linkbutton

Jan 27, 2010

<asp:LinkButton CssClass="button" ID="btnApply" runat="server" OnClick="btnApply_Click()" OnClientClick="Apply1('btnApply')" >
hi ihave this functin in .vb file
Protected Sub btnApply_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnApply.Click
end sub

and javascript function also in aspx

function ApplySummerization(id)
{
alert("hai");
}

View 4 Replies

How To Replace A Function Name Using JavaScript And Have It Be Recognized As A Function

Aug 25, 2010

I am trying to replace the JavaScript onclick event handler in ASP.NET that is added to a button control when using validation controls. This is what is output into the HTML from ASP.NET in this scenario:

<input type="image" name="ibSubmit1" id="ibSubmit1" src="button-green-submit.gif" onclick="showProgress1();WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ibSubmit1", "", true, "Group1", "", false, false))" style="border-width:0px;" />

I have looked pretty estensively, and unfortunately there doesn't seem to be a way to modify the function server side before it is injected into the page.

Since I am developing a control and desire it to be non-invasive and self contained, and I am interested in obtaining the validationGroup parameter of the WebForm_PostBackOptions object, it seems that the easiest solution would be to use JavaScript to replace the WebForm_DoPostBackWithOptions function name with my custom wrapper function and leave all of the rest of the parameter information intact - then I can extract the information I am interested in, call my custom functions, and then forward the call on to WebForm_DoPostBackWithOptions.

NOTE: I am using jQuery to build my custom function, so if there is an easier way to do this with jQuery it is an option I will consider.

Here is the code I tried to replace the onclick event handler (not working):

$('[onclick*=WebForm_DoPostBackWithOptions]').each(function() {
var txt = this.onclick;
txt = txt + '';
txt = txt.replace('WebForm_DoPostBackWithOptions','ml_DoPostBackWithOptions');
this.onclick = eval(txt);
});

Using alert(), I verified that the text is being changed correctly, however whether or not I use the eval() function, the onclick handler doesn't seem to recognize it as JavaScript.

I thought of using a regular expression to get the validationGroup value, but this seems like it will be far more elegant and flexible if I can get it working...

Note: If there is a way for my control to interrogate the page it is on to find all of the buttons that will post back (regardless of what type of buttons they are) so I can retrieve the property server-side, this is also something I will consider.

View 3 Replies

Call Codebehind If Javascript Doesn't Exist In Browser - Else Javascript Function

Sep 29, 2010

In asp.net page, How can i call the javascript methods for form processing-submitting if the user browser supports javascript and use code behind events if the browser does not support javascript.I have the javascript code to send the form data to an ajax server page using jquery. Don't know how to invoke the needed one based on the browsers javascript availability

View 1 Replies

JavaScript - User Control JavaScript Function Doesn't Run

Sep 22, 2010

I have the function put here like below:

$(document).ready(function () {
UserControlNameInit();
});

The script are put in the following and the block is in the .ascx page.

<script type="text/javascript">
</script>

However, the function UserControlNameInit() does not run when the page loads. It is showing in the page source. I can still call this function through FireBug console by manually typing the name of the function.

I did the same way with other user controls, and it works. Just 1-3 user controls are not working...

View 1 Replies

Creating Dynamic Buttons To Call A CodeBehind Function?

Mar 29, 2011

So I have a page that is rendering data from an MSSQL instance into an HTML table. The last cell has a button to download an uploaded file from the database which is created manually during the table creation so I can enter the recordid as a parameter of the button.

The upload and download functions work perfectly fine. The problem is that I cannot get my dynamically created button to work . All it does is post back but I never get the actual file to send from the server. (Although I verified it works through other means). Any suggestions would be great, I've litterally spent all day on this. below are a few code snippets of the different methods i've tried.

RenderControl. This is great but it loses the onclick method

c# Code:

[code]....

View 2 Replies

Web Forms :: Creating A Front Page News Function With C#?

Oct 29, 2010

I was wondering how to create a front page news function with C# as the language.

Basically I want to be able to use a one of my forums in the category "Site Discussion" called "News" as a way to connect with the front page (homepage) of the site to display a few of the newest news articles each with a title, image, and a short blurb of what the post is about. Also I want them to have a link that connects to the news post in the forums.

***NOTE*** I am using YAF (Yet Another Forum) for my forums.

An example of this from another site is [URL]

As you can see in the above site in the "Today's Top Stories" section it shows 4 news posts (1 main, and 3 other top stories) and if you click on them it links to the news post (which is also accessible via the forums in the news section).

This is basically what I want to incorporate into my site, but using the YAF forums, note an admin console is also needed to do this, I have a serperate admin console that I will set-up for it basically that's when you write it and from there it displays on the front page and in the forums.

View 8 Replies

Creating A Function To Calculate Two Database Columns / Values?

May 11, 2010

I am using ASP.NET 2008 Visual Basic Language. I tried to create a function that multiply two values from two different tables and get the result presented in a label. The value is retrieved by referring to the primary key after the user selects from a DropDownList which is in another page using sessions.

I tried to build this code in the Load_Page event but it didn't display for me the total.

[Code]....

View 4 Replies

ADO.NET :: Creating A Generic Function - Data Access Layer

Feb 1, 2011

I have written the following functions(1 & 2) in a class file(say abc.vb) to execute a sql statement in code behind.

[Code]....

View 35 Replies

C# - Creating Multiline Textbox Using Html.Helper Function?

Feb 16, 2011

I usually find my answers at stackoverflow but this one has bugged me for a couple of days now. I am trying to create a multiline Textbox using ASP.NET MVC with the following code.

<%= Html.TextBox("Body", null, new { TextBoxMode = "MultiLine", Columns = "55px", Rows = "10px" })%>

It just shows up a single line fixed sized textbox. on the other hand

<asp:TextBox runat="server" ID="Body" TextMode="MultiLine" Columns="55" Rows="10"></asp:TextBox>

renders the right view, but in the controller's post method with formCollection named form

form["Body"];

returns a null value.

View 2 Replies

Security :: Creating A Validateuser (username) Function - Validation Without A Password?

Mar 22, 2010

I have an application with a custom mebership (I'm still working on it). There is some funcionality in the application for asociating users. This means that (if already associated) one user could switch to some other user with just a click.

My question is:

Can I do a function that would allow me to authenticate one user without sending the password as a parameter?

View 1 Replies

Cannot Access Post Data From ExtJs

Jan 10, 2010

I am using EXT JS and .NET, Basically I am loading a JSON object into the POST and trying to send this to my asp.net page. I assign the JSON object into the ExtJS 'jsonData' parameter

[code]....

So then in VS am trying to extract this data from the .NET (HttpWebRequest) Request object. I have scoured the object for this post data and cannot seem to find it anywhere. i figured it would be in my Request.Params property, but no luck. not anywhere that i can find.

View 1 Replies

ExtJs Grid Acting Very Strange

Oct 18, 2010

So I have two pictures of the weirdness that is occuring.As you can see in the picture above, the scroll bar on the right hand side is being cut off a little bit by the screen, and even when you scroll to the right, you don't get the bar back, it remains cut off.

Here is the other scenario:

Here, you can see that when I scroll down in this grid, the scroll bar kind of fits into the bottom of the grid and doesn't even go all the way down. You need to manually click into the grid and hit the down arrow to get the rest of the way down.

Edit: Here is the code to generate the grid (Ext created through VB controls):

Dim VehicleOptionsGrid As New Akcelerant.Framework.WebControls.Grids.Grid
With VehicleOptionsGrid
.ID = "VehicleOptionsGrid"[code].....

View 1 Replies

DataSource Controls :: Creating Cluster Index From View With Aggregate Function?

Mar 5, 2010

Here is my code in SQL

[Code]....

Error i am facing is :Msg 8668, Level 16, State 0, Line 2Cannot create the clustered index 'RateViewIndex' on view 'NoteToPass.dbo.RateView' because the select list of the view contains an expression on result of aggregate function or grouping column. Consider removing expression on result of aggregate function or grouping column from select list.

View 4 Replies

Add Custom Properties Into Control Objects In ExtJs

Jan 25, 2010

How can I add custom properties into control objects in ExtJs.

For example :

[code]....

This control comes from server dynamically and I want to write my custom property as well like below :

[code]....

I tried it but it said undefined. Normally since JavaScript is loose, I can easily modify objects but in this case it wouldn't work the way I expected.

View 1 Replies

Use Client Side Library (JQuery Or ExtJS)

Feb 23, 2010

For a slick UI, I am deciding between using a client side library (JQuery or ExtJS) or go with the AJAX Control toolkit. I understand that the widgets supported by ExtJS rich library does not match what's there in the toolkit. What are the pros of cons of using one over the other?

View 3 Replies

ExtJS Window Show Markup Already On Page?

Feb 23, 2010

The page markup:

<table style="display: none" id="myTable" runat="server">
<tr>
<td>First Name</td>
<td><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Last Name</td>
<td><asp:TextBox ID="TextBox2" runat="server"></asp:TextBox></td>
</tr>.....

View 1 Replies

C# - Creating An Executable Script Which Accesses Aspx Form Components And Runs Function?

Jul 28, 2010

I have created and application which contains a gridview that is populated by an SQL database. I built a function which converts the gridview into an excel file and stores it on the server.

I would just like to know how I can write an executable script(which I will set to run at a certain time on the server) that will access the gridview in the .aspx file containing the gridview and run the convertToExcel() function located in the .cs file attached to the .aspx file and then close.

View 1 Replies

Creating An LDAP Class That Contains A Function That Returns The Managers Username Of The Current User?

Jan 26, 2011

I'm creating an LDAP class that contains a function that returns the managers username of the current user.

I know that I can use the "manager" attribute to return CN="name", OU="group", DC="company" etc.I specifically want the managers username, does anyone know if there is an attribute string that I can send to LDAP that specifically gets the managers username only? If not, is there an alternative method to do so?

View 2 Replies

C# - Post In EXTJS Forums ,To Know Abt Logging And Exception Handling Is Available?

Apr 9, 2010

I need to know, whether extjs 3.1 is available of exception handling and logging build in library .Like Logging the exception as log file , with the specification of error whether it is major or minor or critical or info.new log file creating on specified size exceeded. etc...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved