Write In Jquery
Sep 17, 2010<a href="" onclick="openMyModal('~/DocMove.aspx?a=5'); return false;">Document Move</a>
onclick="openMyModal('~/DocMove.aspx?a='); return false;
var= 12
onclick event with parameter pass in
ocMove.aspx?a=f
<a href="" onclick="openMyModal('~/DocMove.aspx?a=5'); return false;">Document Move</a>
onclick="openMyModal('~/DocMove.aspx?a='); return false;
var= 12
onclick event with parameter pass in
ocMove.aspx?a=f
i'm trying to write out an html output using jquery from a table
see below
[Code]....
On the alert msg i can print out
[Code]....
But i don't want to append it to any <div> or any element.I just want it to output the html to the screen.
I'm doing tis because i have a jquery that displays the blockquotes and if i have a parent DIV or any other element it doesn't work.
How can i achieve this
how to use jquery to write sql queries. consider a webservice call using jquery to asp.net webservice, sending an sql query and getting back the results in json format. but there's a problem with the connection string because it must not be available if a user views the source of the page.
View 1 RepliesUPDATE:
The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the service type with RequirementsMode setting as 'Allowed' or 'Required'.
when i try to access wcf service i get this error: the reason is HttpContext.Current is null, what should i do in this case?
Object reference not set to an instance of an object.
System.Web.Script.Serialization.JavaScriptSerializer s = new System.Web.Script.Serialization.JavaScriptSerializer();
Person p = new Person() { FirstName = "First name", LastName= "last name" };
string json = s.Serialize(p);
System.Web.HttpContext.Current.Response.Write("jsoncallback" + json);} //error
How to create progressbar in jquery + Asp.net(C#) without adding progress plunging.
View 2 RepliesIs it mandatory to write $(document).ready(function () {... }) every time ?
Can't we do it without this line?
I am trying to write an ajax based tooltip for a website. The JS file searches the html page for certain keywords, which are fetched from an xml file. The keywords are searched using searchhighlight Jquery plugin. Then I use ajax to fetch the description of that keyword (or help) from aspx file(which just parses the xml doc for description of keyword)
I have been able to do everything except position the call to my mousehover functions. What has been happening is, when I hover over the first word, the tooltip gets displayed properly, but when I go over to the next word, the first tooltip gets displayed for a split second before the new tooltip loads. how to resolve the issue and make my code run smoothly? Here is the js file:
[Code]....
i need to be able to expose information to a page, and I need to write the information in xml on my webserver which will be dynamically created from the database.
I need to use json to pass the data from the screen back to the server two way communication xms back and forth. Is it actually any good using a wcf endpoint to serve the json back to the page and use query with wcf? Is this possible?
Or is it easier to use standard pages .aspx and just do a call to a url and get the json with jquery....
We will probably want to send this information to other locations at some point in the future too....
I have a usercontrol with an asp.net checkbox in it. I'm attempting to write a jquery script to convert that normal checkbox into a three-state checkbox. The states are 'checked', 'unchecked', and 'intermediate'. Clicking on an intermediate state should change the state to checked, clicking on an unchecked state should change the state to checked, and clicking on the checked state should change the state to unchecked. My idea was to be able to insert a normal asp.net checkbox into the page and then call the jquery function to make it three-state.
Here's my jquery function, which is rough but working:
function SetTriStateCheckBox(checkboxfinder, initialval, originalCkbxUniqueID) {
var i = 0;
var chks = $(checkboxfinder);
if (initialval){ chks.val(initialval); }
chks.hide().each(function() {
var img = $('<img class="tristate_image" src="../Images/tristateimages/' + $(this).val() + '.gif" />');
$(this).attr("checked", ($(this).val()=="unchecked"?"false":"true"));
$(this).attr("name", "input" + i + "image" + i);
img.attr("name", "" + i + "image" + i);
i++;
$(this).before(img);
});
$(".tristate_image").click(function() {
t = $("[name='input" + $(this).attr("name") + "']");
var tval = t.val();
$(this).attr("src", "../Images/tristateimages/" + (tval=="checked" ? "unchecked" : "checked") + ".gif");
switch (tval) {
case "unchecked":
t.val("checked").attr("checked", "true");
break;
case "intermediate":
t.val("checked").attr("checked", "true");
break;
case "checked":
t.val("unchecked").removeAttr("checked");
}
setTimeout('__doPostBack('' + originalCkbxUniqueID + '','')', 0);
});
}
Here's a simplified version of my OnPreRender event handler which registers a startup script:
protected override void OnPreRender(EventArgs e)
{
string tristatescript = " SetTriStateCheckBox('input[id$="ckbx1"]', 'intermediate','"
+ ckbx1.UniqueID + "'); ";
ScriptManager.RegisterStartupScript(this, this.GetType(), "ckbx1_tristate", tristatescript, true);
base.OnPreRender(e);
}
Everything seems to work correctly, except that I'm not hitting the event handler of the original checkbox when I post back, after clicking my newly inserted image. It does hit Page_Load. If I take out the .hide() part of the jquery, and click on the original checkbox, Request.Params['__EVENTTARGET'] is the same as when clicking the newly inserted image.
I am working on a feature to throw a warning message if the user has unsaved values in a form. I can see that in the next post there is a explanation about how to do that [URL]now the problem is that i need to do the same but using a ascx control and i don't know where put the next code in my ascx control.
<body onunload="checkSave()">
NB: I'm working on dnn so that i don't have any change to add this code in the parent page of the control.
I need to to export a file to the user. It takes 1-2 min to generate the file so I'd like to have the page go into a kind-of modal mode with a layover on the page and a 'Working' spinner showing. The problem is I can't make the modal stuff go away after Save File dialog is closed.
How can I remove the layover after the dialog is done?
Suppose we want to select the data from the database then we write the query for that. Example:
SqlConnection con=new SqlConnection(Connetion name) string selectPkId = @"SELECT PK_ID FROM TABLE" SqlCommand cmd=new SqlCommand(selectPkId ,con);
So,my question is that why we basically use @ before the sql query.If I don't use @ before that then it again work fine (does not give any error), then what is need of using "@"?
I am reading in a file into a string. Then I am writing this string to a stream. I know this code works fine.
The only problem that I have is with the line that write the data in chunks where the parameters is not supported for the Write method.
The line that has the problem is this line. What do I need to change here?
OutPut.Write(buffer, 0, Math.Min(to_write, WRITE_CHUNK));
[Code]....
i am calling a function which is inside Homescroll.ascx.cs from Homescroll.ascx so i wrote on Homescroll.ascx as <% Response.Write(scroll()); %> but all this is in update panel,and i am getting errors. so is their any other way to call function from homescroll.ascx to homescroll.ascx.cs,instead of response.write();
View 3 RepliesI want to write a page where user's can write a blog post and publish it to the blog. I've downloaded blog engine .NET and looked at the code and I like the way they do it, but it's completely an overkill of what I need. What I need is only a title, author, date, and the blog post it self. I don't even want users to post comments or anything like that. My approach is to save all those blog post information into an xml and then when a page loads it loops around those xml files to show the blog post.
View 1 Replieshow can I create stored procedure and write my select statement in it, I know how to create dataset then put type stored procedure and assign it to the sp ... what I want is writing my sp... how can I make it ?
check the following code, this is what I want to write put I don't know where or how !
CREATE STORED PROCEDURE SP_CATEGORY
@CATEGORY VARCHAR(30)
AS
BEGIN
SELECT LATIN_NAME, ENGLISH_NAME, ARABIC_NAME, CATEGORY
FROM FLORA, CATEGORY_LIST
WHERE FLORA.CATEGORY=CATEGORY_LIST.CATEGORY_NAME AND CATEGORY_LIST.CATEGORY_NAME IN (SELECT * FROM SPLITLIST(@CATEGORY, ','))
END
where can I write this code ?!
what is difference between Response.write and Response.output.write
View 2 Replieswhich is the best way to learn Jquery....and what all topics I need to cover to learn Jquery in full...so I could code like a pro.
View 2 Replies to directly get all elements in a form who contains a non html attribute ?
<input .... customAttribute="validateMe">
So I could find all input elements that will require validation.And use this in a loop to add validation to the input's found :
$('input').attr("customAttribute").val() == "validateMe"
I could also write every validation for each object separately, I have only a few elements who uses a required validation but it would be nice that I could do this in one shot instead of repeating the $("input").rules("add .....
how to save and retrive date in database using jquery ajex asp.net ,JSOn,XML
View 2 RepliesI am using jQuery for custom sorting my <ul><li> list.But I have a problem. I can sort and move those <li>-s but problem is I don't know how to update database with new order integers.Example of html ul li:
[Code]....
This is an example of my li element.. I have id=43, thats Id of picture in database.I use this javascript for trying to somehow make array and read that id into array:
[Code]....
Problem is I don't know exactly what am I doing wrong, because my event doesn't fire, when I press "update button.. Update button fires "update" function on click:
[Code]....
I hope someone will try to explain.Do codebehind and html needs to be in the same document? Can I use ascx and use "update" button there, to fire aspx methode?
I have 2 update panels where the server-side button (in a jQuery accordion) in the first update panel should update the second update panel.When the button is clicked, jQuery hides the accordion and displays a results div. This all works fine client side to be fair to IE. The server-side onclick event does not fire though in IE. In Firefox it does! The first update panel is displayed below, here the "btnGenerateReport" event should fire server side.
[Code]....
To add confusion ... if I comment out '$accordion.toggle($effect);' lines then the second update panel does get updated.I'm not sure what other information I can give here. I'm stumped as to why this works with Firefox and not IE.
one juvenile question , i am having a asp.net intranet application which is using jquery, instead of ref jquery to every page, i decided it to put it on the master page inside the script manager scriptReference tag. note not all pages of my application requires jquery, so is it a wise thing to do, or it will affect the performance,
View 2 RepliesIf I use jQuery AJAX to call a specific ASP.NET page method how to have that method return a value back to the AJAX method that called it?
Update
My situation is I have an existing web application with many existing methods. I would like to be able to use jQuery to execute some of these methods and then update the UI with the results. My mandate is to stay away from ASP.NET AJAX and stick with jQuery. Management is concerned about continued development and support with ASP.NET AJAX from Microsoft. I agree with them.
On my page I have textbox in which user enters value. When 3 values are entered the autocomplete panel shows.In the panel the names and surnames of all available people are shown bassed on the value user enters. Bellow each name and surname is picture of each "candidate". However images are stored on another server (using https "protection") and some people don't have picture.
onerror="this.onerror=null;this.src='../Pics/Errors/NoPic.jpg'"
into <img> tags in Web Handler.